PEP517
PEP517
Posted May 22, 2025 5:14 UTC (Thu) by geofft (subscriber, #59789)In reply to: PEP517 by sam_c
Parent article: Recent disruptive changes from Setuptools
My first reading of the comment linked from the comment thread you linked (https://github.com/pypa/packaging-problems/issues/576#iss...) is that while `setup.py install` is happy to put files in an OS-owned directory, pip is not, and for reasons like this, "distro maintainers hate pip because it does NOT do what distro maintainer want." If I'm reading this right, this is exactly backwards: pip's refusal to put files in OS-owned directories started out as a patch from distro maintainers overriding the behavior of upstream pip, because they specifically wanted pip to stop overwriting OS-owned files. That change slowly got upstreamed in a form that hopefully let the OS maintainers drop their patches.
A little later in that thread it's mentioned that "python setup.py install" is used to install e.g. systemd units in /lib. The reason setup.py was able to do this is that it was just an ordinary Python script - but that gives you a way forward; the ability to run ordinary Python scripts has not been deprecated, no matter how much setuptools being invoked through an ordinary script has been deprecated. Is there a path forward where your setup.py script does not use setuptools (which is a Python-packaging-specific tool) but uses generic Python functionality like open("/lib/...", "w")?
(There may be a need for a library that handles some of the details of doing this, like destdir; I think one could write such a library and have it be far simpler and far more useful for this purpose than setuptools.)
Or am I misunderstanding the problem?
