[issue43976] Allow Python distributors to add custom site install schemes

2022-02-15 Thread Stefano Rivera
Change by Stefano Rivera : -- nosy: +stefanor ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue43976] Allow Python distributors to add custom site install schemes

2022-01-25 Thread Frederik Rietdijk
Frederik Rietdijk added the comment: In Nixpkgs we install every Python package under a unique prefix, a so-called Nix store path. If we were to use sysconfig for installing packages, then we'd need to be able to dynamically set the paths. This was also discussed as part of the Installer pro

[issue43976] Allow Python distributors to add custom site install schemes

2022-01-05 Thread Jason R. Coombs
Jason R. Coombs added the comment: I don't have a good answer, but given the title of this issue (which is specifically scoped to site install schemes), I'm tempted to say we should deal with prefixes in a separate, perhaps broader issue, and there address the reported issue (that a user's p

[issue43976] Allow Python distributors to add custom site install schemes

2022-01-04 Thread Miro Hrončok
Miro Hrončok added the comment: In Fedora 36+ / Python 3.10+ we now use an install_scheme that looks like this: 'purelib': '{base}/local/lib/python{py_version_short}/site-packages', 'platlib': '{platbase}/local/{platlibdir}/python{py_version_short}/site-packages', 'scripts': '{base

[issue43976] Allow Python distributors to add custom site install schemes

2021-09-22 Thread Jason R. Coombs
Jason R. Coombs added the comment: Here's what I propose: 1. In pypa/distutils, add support for honoring the proposed install schemes (based on PR 25718). Merge with Setuptools. 2. Add whatever ugly hacks are needed to pypa/distutils to honor other Debian-specific behaviors (revive https://g

[issue43976] Allow Python distributors to add custom site install schemes

2021-09-21 Thread Jason R. Coombs
Jason R. Coombs added the comment: > In the short term, and possible for the long term, Debian can continue to > patch the install routine... The problem with this approach is Setuptools is attempting to adopt distutils by exposing its own vendored copy of distutils as `distutils` (top-level

[issue43976] Allow Python distributors to add custom site install schemes

2021-09-01 Thread Filipe Laíns
Filipe Laíns added the comment: Matthias, can you check if bpo-44982 solves your issues related to the conflicts you were experiencing for the Debian patching? If so, it would unblock this issue. I am probably gonna discuss this proposal with the conda-forge folks next week, to get some feed

[issue43976] Allow Python distributors to add custom site install schemes

2021-08-25 Thread jakirkham
Change by jakirkham : -- nosy: +jakirkham ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue43976] Allow Python distributors to add custom site install schemes

2021-08-10 Thread xrcg
xrcg added the comment: s/possible/possibly/ -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue43976] Allow Python distributors to add custom site install schemes

2021-08-10 Thread xrcg
xrcg added the comment: I haven’t read everything in this convo, but it looks like the changes proposed here cover all known downstream users other than Debian. Is that correct? Would these changes break Debian’s customizations substantially more than they’ll already be broken by the distuti

[issue43976] Allow Python distributors to add custom site install schemes

2021-08-10 Thread Filipe Laíns
Filipe Laíns added the comment: Hi Jason, thank you. I already tried 1), but could not convince Matthias on an alternative way to achieve the result that Debian wants. If you want, maybe you and I could try restarting those discussions. 2) is fine, but I am not the one that will me maintaini

[issue43976] Allow Python distributors to add custom site install schemes

2021-08-06 Thread Jason R. Coombs
Change by Jason R. Coombs : -- versions: +Python 3.11 -Python 3.10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue43976] Allow Python distributors to add custom site install schemes

2021-08-06 Thread Jason R. Coombs
Jason R. Coombs added the comment: Thanks Filipe for the summary. I was unsure the status. Even if we grant that Debian is too intrusive in its patching of distutils, it's Python and distutils that are making the change here, so it's not unreasonable for Python to maintain feature parity wit

[issue43976] Allow Python distributors to add custom site install schemes

2021-08-06 Thread Filipe Laíns
Filipe Laíns added the comment: Yes, but in the process of deprecating disutils, some internals were changed to stop relying on it. This will cause a lot of downstream patches to break. I you are not modifying CPython, you don't need to worry, but if you are, then you should have a look and fi

[issue43976] Allow Python distributors to add custom site install schemes

2021-08-06 Thread Filipe Laíns
Filipe Laíns added the comment: s/still/stay/ -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue43976] Allow Python distributors to add custom site install schemes

2021-08-06 Thread xrcg
xrcg added the comment: @FFY00: Thanks for the info. >From what I quickly read, 3.10 will only deprecate distutils, and the removal >is scheduled for 3.12. Is that correct? If so, the impending release of 3.10 >shouldn’t be a problem, as there are 2 more releases before distutils will be >re

[issue43976] Allow Python distributors to add custom site install schemes

2021-08-06 Thread Filipe Laíns
Filipe Laíns added the comment: I find it very difficult. I would be a bit anxious merging the code this close to the final release, so I imagine the release managers would be much more. Anyway, this is the current state of this issue from my perspective: As far as I understand, progress is c

[issue43976] Allow Python distributors to add custom site install schemes

2021-08-06 Thread xrcg
xrcg added the comment: What is the probability that custom site install schemes will be supported without requiring a patch before distutils is removed? -- nosy: +xrcg ___ Python tracker __

[issue43976] Allow Python distributors to add custom site install schemes

2021-05-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Steve: I think the point of discussing whether "pip install" can be used to manage system wide packages is moot. It's been like that for ages, not only for pip, but also for the distutils setup.py install process and the old Makefile.pre.in approach before

[issue43976] Allow Python distributors to add custom site install schemes

2021-05-05 Thread Steve Dower
Steve Dower added the comment: >> The best option for restricting the import while still having it be a Python >> import is to find the file (if it's present in the expected location under >> sys.whatever), and then use importlib to import it: >> https://docs.python.org/3/library/importlib.html

[issue43976] Allow Python distributors to add custom site install schemes

2021-05-05 Thread Filipe Laíns
Filipe Laíns added the comment: We cannot change how `sudo pip install` fundamentally works because there are too many people depending on it, and even if we could, this is not the place :P I think we went a little off-topic here, so let's get back to the discussion. > The best option for res

[issue43976] Allow Python distributors to add custom site install schemes

2021-05-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 05.05.2021 10:29, Christian Heimes wrote: > > I mean that Steve and you are talking about different things. Could be. I was addressing the point Steve made about not allowing or making it hard to run "pip install" as root user. > Neither Steve nor you

[issue43976] Allow Python distributors to add custom site install schemes

2021-05-05 Thread Christian Heimes
Christian Heimes added the comment: I mean that Steve and you are talking about different things. Neither Steve nor you or I are are Linux distro packaging experts. I suggest that we listen to the expertise of downstream packagers like Filipe or Miro. They deal with packaging on a daily basi

[issue43976] Allow Python distributors to add custom site install schemes

2021-05-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 05.05.2021 10:01, Christian Heimes wrote: > >> "as root" imply that there's no user site-packages directory at all > ^ > > Steve is talking about user site-packages, not global site-packages directory. You me

[issue43976] Allow Python distributors to add custom site install schemes

2021-05-05 Thread Christian Heimes
Christian Heimes added the comment: > "as root" imply that there's no user site-packages directory at all ^ Steve is talking about user site-packages, not global site-packages directory. -- nosy: +christian.heimes ___

[issue43976] Allow Python distributors to add custom site install schemes

2021-05-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 04.05.2021 22:58, Steve Dower wrote: >> "pip install as root" will need to continue to work and thus distros >> need to get a way to make sure that it doesn't corrupt the system >> installed packages > > Excuse my ignorance, but does "as root" imply tha

[issue43976] Allow Python distributors to add custom site install schemes

2021-05-04 Thread Steve Dower
Steve Dower added the comment: > "pip install as root" will need to continue to work and thus distros > need to get a way to make sure that it doesn't corrupt the system > installed packages Excuse my ignorance, but does "as root" imply that there's no user site-packages directory at all? I'

[issue43976] Allow Python distributors to add custom site install schemes

2021-05-04 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 04.05.2021 22:29, Steve Dower wrote: > > Would "pip install --user ..." in a Docker container also work, though? > Presumably all the filesystem paths are being redirected anyway, so is there > a difference? > > (My assumption is that "--user" would

[issue43976] Allow Python distributors to add custom site install schemes

2021-05-04 Thread Steve Dower
Steve Dower added the comment: Would "pip install --user ..." in a Docker container also work, though? Presumably all the filesystem paths are being redirected anyway, so is there a difference? (My assumption is that "--user" would essentially become the default if you're using the OS provi

Re: [issue43976] Allow Python distributors to add custom site install schemes

2021-05-04 Thread M.-A. Lemburg
On 04.05.2021 22:07, Steve Dower wrote: > > Perhaps what I'm suggesting here is that I don't see any reason for "sudo pip > install ..." into a distro-installed Python to ever need to work, and would > be quite happy for it to just fail miserably every time (which is already the > case for the

[issue43976] Allow Python distributors to add custom site install schemes

2021-05-04 Thread Steve Dower
Steve Dower added the comment: > I'd rather not have a new option here ... Perhaps what I'm suggesting here is that I don't see any reason for "sudo pip install ..." into a distro-installed Python to ever need to work, and would be quite happy for it to just fail miserably every time (which

[issue43976] Allow Python distributors to add custom site install schemes

2021-05-04 Thread Steve Dower
Steve Dower added the comment: The best option for restricting the import while still having it be a Python import is to find the file (if it's present in the expected location under sys.whatever), and then use importlib to import it: https://docs.python.org/3/library/importlib.html#importin

[issue43976] Allow Python distributors to add custom site install schemes

2021-05-04 Thread Filipe Laíns
Filipe Laíns added the comment: > My biggest concern is with the bare "import _vendor_config", which I'd prefer > to have restricted to a fixed location, rather than being influenced by > environment variables and other options. We already have an issue with > readline being imported from any

[issue43976] Allow Python distributors to add custom site install schemes

2021-05-04 Thread Petr Viktorin
Petr Viktorin added the comment: Sorry for not getting to this sooner, but 5 days is really tight for such a change. With -S/-I, It would be great if sys.path only included packages installed as part of the OS, and not those installed by `sudo pip`. (Or `pip --user`, but that's covered).

[issue43976] Allow Python distributors to add custom site install schemes

2021-05-03 Thread Steve Dower
Steve Dower added the comment: Yes, I saw some of the latest changes in the PR. My biggest concern is with the bare "import _vendor_config", which I'd prefer to have restricted to a fixed location, rather than being influenced by environment variables and other options. We already have an is

[issue43976] Allow Python distributors to add custom site install schemes

2021-05-03 Thread Filipe Laíns
Filipe Laíns added the comment: FYI, I have change the implementation to split the extra install schemes and extra schemes activated on site. This still makes sense over sitecustomize because we want the packages to be included in site.getsitepackages -- we want the vendor packages to essenti

[issue43976] Allow Python distributors to add custom site install schemes

2021-05-03 Thread Steve Dower
Steve Dower added the comment: > Making sysconfig look at sitecustomize seems like the wrong approach. I mean, you're literally customizing the site, so having it be done from sitecustomize doesn't seem terribly wrong. But I agree, I'd rather see the code in sitecustomize poke paths into sys

[issue43976] Allow Python distributors to add custom site install schemes

2021-04-30 Thread Terry J. Reedy
Change by Terry J. Reedy : -- title: Introduce mechanism to allow Python distributors to add custom site install schemes -> Allow Python distributors to add custom site install schemes ___ Python tracker ___