Open Kcchouette opened 1 year ago
First, I don't recommend installing Python packages manually with sudo
because that will install files on your system that your package manager won't know about. Instead, omit the sudo
to make a user installation.
Second, please try again with the updated instructions after #653 has been merged.
Third, you'd generally be more interested in installing trackma using your system's package manager and the trackma
AUR package.
First, I don't recommend installing Python packages manually with
sudo
because that will install files on your system that your package manager won't know about. Instead, omit thesudo
to make a user installation.Second, please try again with the updated instructions after #653 has been merged.
Third, you'd generally be more interested in installing trackma using your system's package manager and the
trackma
AUR package.
System package manager that installs packages built with python setup.py install
which relies on setup.py which was nonchalantly nuked in https://github.com/z411/trackma/commit/084e3511673dfa9673fa6cf85c58ee8b3ef637ec
How are we supposed to package it in distros now?
See https://wiki.archlinux.org/title/Python_package_guidelines#Standards_based_(PEP_517) for the relevant instructions for Arch packaging (and the code of the trackma-git
package).
Edit: see also the PyPA packaging guide
See https://wiki.archlinux.org/title/Python_package_guidelines#Standards_based_(PEP_517) for the relevant instructions for Arch packaging (and the code of the
trackma-git
package).Edit: see also the PyPA packaging guide
I'm using openSUSE on Open Build Service. It has %pyproject_wheel
& %pyproject_install
macros to supposedly replace %python_build
& %python_install
BUT have not seen a single official or unofficial package use it. When trying out it tried to make builds for absent versions of python without automatically pulling the dependencies and there is not obvious example to make a proper spec-file. But openSUSE manuals are traditionally written in weird impenetrable style that loses the point and may be factually wrong even when not obsolete.
It's actually in the repo but was not found by web-search for some reason.python-poetry-core
seems to be a hard dependency for such build and it's not in any of official repos which means it has to be packaged too and for all distro-supported versions of python. And who knows what absent dependencies it may have.
I doubt that distros would change entire way of handling python packages for an app that is barely maintained or absent from official repos altogether. Personally, for my package I just put back the removed file and left it as is.
Using setup.py
to install packages has been deprecated a while ago and PEP-517 is the way forward. This is nothing that is specific for trackma, it's a general movement in the Python world and setup.py
is not coming back, if you ask me.
I find it concerning that OpenSUSE wouldn't have any packaging guidelines or a single package using this new build format. Unfortunately, my experience with OpenSUSE is exactly zero, so I can't provide any help with it.
System package manager that installs packages built with
python setup.py install
which relies on setup.py which was nonchalantly nuked in 084e351 How are we supposed to package it in distros now?
That was me bringing the package up to Python standards. I'm sorry it's causing problems with packaging on OpenSUSE, but distros ought to move forward when standards are set.
Instead of substituting the removed setup.py
back in, why not pip install --user poetry
in the build process, and then use poetry
to build normally?
EDIT: Did not see the edit. EDIT2: Could you also link the package?
Using
setup.py
to install packages has been deprecated a while ago and PEP-517 is the way forward. This is nothing that is specific for trackma, it's a general movement in the Python world andsetup.py
is not coming back, if you ask me.
If trackma is the only package in the whole OBS that demands it, I'd call that very specific.
I find it concerning that OpenSUSE wouldn't have any packaging guidelines or a single package using this new build format. Unfortunately, my experience with OpenSUSE is exactly zero, so I can't provide any help with it.
openSUSE always had graphomaniac manuals that are bloated but written in obscurantist style full of inaccuracies, holes, logical leaps and obsolete incorrect statements. What's worse is that macros for using in spec-files are even more impenetrable, so working examples are the best bet. But I haven't seen any.
That was me bringing the package up to Python standards. I'm sorry it's causing problems with packaging on OpenSUSE, but distros ought to move forward when standards are set.
The adage about "Mohammad and the mountain" comes to mind.
Instead of substituting the removed setup.py back in, why not pip install --user poetry in the build process, and then use poetry to build normally?
What average users definitively should not be doing is crapping their /home directory with 3rd-party managers and unnecessary copies of dependencies. This is MacOS & Windows habit stemming from dll-hell and lack of proper system management.
EDIT2: Could you also link the package?
However, just for the heck of it, I tried out to make a working package in new style. It was a complete shit-show but in the end it worked. I present you with this ugly monstrosity which is bloated and overly complex in comparison to the original:
What average users definitively should not be doing is crapping their /home directory with 3rd-party managers and unnecessary copies of dependencies. This is MacOS & Windows habit stemming from dll-hell and lack of proper system management.
However, just for the heck of it, I tried out to make a working package in new style. It was a complete shit-show but in the end it worked. I present you with this ugly monstrosity which is bloated and overly complex in comparison to the original: trackma.spec
Are you even happy with openSUSE? This seems like a lot of work to get one thing building and working correctly. I've looked into OBS in the past to automate Prism Launcher builds across distros and maintained versions of distros, but the syntax and the macros really put me off.