Setuptools build shim doesn't actually install script
See original GitHub issueI’m trying to upgrade the Arch Linux AUR package to 53.0 and something isn’t right. Because it’s still basically the only Python ecosystem that manages installs to alternate roots correctly almost all package builds use setuptools. The package as downloaded from PyPi does have a flit
generated setup.py
file. To my eye it even looks right, it has the packages and entry_points that I would expect to see. However when running python setup.py install --root=...
I do not get any /usr/bin/weasyprint
script as everything up through 52.x has been doing and I would expect to see now.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Pyenv shim not created when installing package using setup.py
When I install a package into a pyenv environment by using ./setup.py install , the package's script is not added to pyenv's shim...
Read more >Pip without setuptools, could the experience be improved?
Hello. In Fedora, our pip package Recommends setuptools. Practically that means: Majority of users who install pip will get setuptools by ...
Read more >Latest version install script errors on installation... - pixls.us
I am getting the followig error when installing the latest RFD via provided install.py. System: Host: maxg-pc-mint Kernel: 5.4.0-90-generic x86_64 bits: 64 ...
Read more >History - setuptools 65.6.3.post20221216 documentation
#1527: Removed bootstrap script. Now Setuptools requires pip or another pep517-compliant builder such as 'build' to build. Now Setuptools can be installed ......
Read more >Error about installation dolfinx0.5.1 on Ubuntu 18.04
ERROR: Failed building wheel for petsc Running setup.py clean for petsc ... `setup.py` so # setuptools doesn'"'"'t think the script is `-c`.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Wow, just wow. So much missing the point! Nobody is down on the tooling rewrites, we just need a tool. To quote something buried in those threads:
That was two years ago and the issues is still not addressed. The new tooling handles the user-space and venv style installations nicely, but does not meet this use case. The
installer
and other work-arounds have huge drawbacks and are clearly written as if the thing they are doing shouldn’t be done.For anybody else hitting this issue for this package, this problem can be fixed by monkey patching the Flit generated script. It is loading the even more legacy distutils as a shim but passing it data meant for setuputils! It works fine and the binary is installed if you just swap out the library for the one that Flit should be importing all along. The upstream rational for leaving this clear mistake is just weird (and probably more political than technical but I don’t feel like going deeper down the rabbit hole).
Wow. ❤️. Thanks a lot for sharing.
The macros in pyproject-rpm-macros could be really useful for other distributions. But, of course, it would be actually hard to use the same scripts everywhere because of differences between distributions. That’s where the distributions and the Python team will have to work closely together, but it won’t be easy: distributions have different points of view about a lot of things (filesystem paths, package formats…), and they definitely have different points of view about Python packaging too.
Fedora’s workflow uses
pip wheel
andpip install
, with some adjustments made for Fedora’s needs. Most of this code is actually useless for WeasyPrint (as it handles specificsetup.py
andsetup.cfg
hacks too), and we can assume that it will become more and more simple with time, now that the format is specified.I really hope that other distributions will follow this path. Fedora won’t have to change anything when Flit will remove setup.py, because the wheel+install steps will be exactly the same. Distributions relying on another workflow may have to make new adjustments again, just as they did for years with setuptools workarounds. I’m really sorry for them 😢 and hope that they’ll find a clean solution soon.
If you’re a distribution packager, we’re really open to discussion: come talk on our Gitter room, or open a dedicated issue in this repository. We’re closing this issue for now, as a workaround has been given for setuptools users, and some hints have been given for a more reliable packaging.