-
Notifications
You must be signed in to change notification settings - Fork 52
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
Support for alternative installation schemes #120
Comments
This also plays into vendor layout customizations, they could add their layouts to Python and then select them with this option. |
This should already be possible via the API, which takes a mapping containing the installation scheme’s resolved paths: https://installer.readthedocs.io/en/latest/api/destinations/#installer.destinations.SchemeDictionaryDestination Could you be a bit more specific about what you are trying to do, and what you’re requesting here? |
I’m just guessing but maybe the goal is to install packages to the user site with the CLI. Currently |
Yes, that is not the goal of destdir. I think this would look something like |
I’m more inclined to think Right now only |
Base is never overridden by --destdir as they do conceptually different things. e.g.
Specifically, base for a system installation is /usr, so that fills out as
destdir=./foo prepends to that, so you end up with
And then you pack up the ./foo directory into a system image and install it as an overlay onto / so that the final product gets files in /usr/lib/python3.10/site-packages
This is a hard command-line API violation, based on the incorrect notion that destdir is intended to override
This is just a standard slippery slope. I fully believe in the ability of this project's maintainers to make rules and stick with them, and people already wanted to do all those things you fear, but their suggestions were rejected. Accepting mostly-unrelated features should not necessitate backing down on previous stances taken. And the use case of this ticket is pretty clearly defined. It allows the CLI to ask sysconfig for one of a radio list of installation layouts. The two example cases given are:
A radio list of schemes known to sysconfig is a pretty significant difference from "next thing you know, people will be asking to support arbitrary format-string definition of the install environment". |
I’d like to request folks to hold off going this direction in the discussion, based off of a guess. I specifically asked for details, to better understand why OP wants this. Let’s wait for OP (or someone else who wants this functionality) to elaborate why they want it. |
I've been trying to learn a bit more about python's packaging internals and I found myself reading |
The obvious way is to use the Python API I guess (which is the primary intention to the project). I’m not saying a CLI flag as you proposed isn’t useful though! |
Other use-case for this is allowing vendor to install to their custom schemes, something that our proposal to standardize vendor patching (https://gist.github.com/jaraco/b48e1acd05ecd3e54ddf0f04f91065c3) relies on. I think this is a very significant use-case, and is simple enough to support. |
If someone wants to file a PR implementing such a flag, please feel welcome to do so! |
Cross referencing #145, which takes this a step further -- let's bring over all the logic that pip has currently, for locating files, and move it into this library. |
From using this in Linux, it seems like the installation scheme used here is always "posix_prefix." I think it would be helpful to have the option to use "posix_user" too!
The text was updated successfully, but these errors were encountered: