-
Notifications
You must be signed in to change notification settings - Fork 77
Allow customization of locations #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
In #1, we addressed a similar issue on PyPy, where downstream packagers were patching the install command for PyPy. With the help of that team, we were able to distill changes that enabled those behaviors on PyPy using the |
I'd like to only have Fedora as an example. The fact that pypy and some distros need to modify this space is a hint that it is also needed by other systems – current and future; in distro defaults or in individual systems. I don't think we realistically can do a survey of all the modifications and integrate them into setuptools. Tzu-ping Chung suggested that the information can be moved to * I think I saw read this one of the Discourse threads, but I lost the link |
I fervently agree. And for a system like this to work, you probably need to have some body that establishes a standard for tools to follow, and then setuptools can honor that standard. Given the challenges inherent in designing and gathering consensus on such a standard, my instinct is to start by taking the defacto standard of distutils and extend it to be more configurable. The suggestions of making these values available through sysconfig or site.py sound suitable. |
Since this is something that needs to be done as distutils is deprecated/removed from the stdlib and moved to PyPA, it seems to me that the discussions should be either in a CPython space (where it's moving from) or in this repo (where it's moving to). I also think that some kind of shared design document would be helpful. From the discussions around PEP 632, it sounds like the PEP is not a good place for that. Is there a better place? |
I share the intent to help users not to brick their system, having similar patches in Debian and Ubuntu. The proposed solution however makes 'unix_local' use the same location as somebody doing ./configure --prefix=/usr/local. Note that --prefix=/usr/local is implicit ( the default). You would now have a common modules dir for two different Python installations. I remember @warsaw suggested to use different locations for that. |
From Setuptools 50.1.0:
In Fedora we currently patch
distutils.commands.install
so that packages install by the user go to/usr/local/
, but packages installed system-wide go to/usr/
.This avoids nearly all cases where users brick their system with
sudo pip install
. Details here.With
SETUPTOOLS_USE_DISTUTILS=local
, the customization is ignored.In hindsight, patching
distutils
is probably not the best way to customize install locations. But I'm not aware of a better way. It is currently done this way in at least Fedora & Debian; PyPI'sdistutils.commands.install
also differs from CPython's.The text was updated successfully, but these errors were encountered: