-
Notifications
You must be signed in to change notification settings - Fork 49
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
Don't pip install without user knowledge and allow to opt out #81
Comments
This is an absolute blocker for any future distribution acceptance of pep517 in the linux packaging environment (speaking only for archlinux here, but I'd imagine other distros will feel the same). If pep517.build requires pip, we won't use pep517.build... |
Hmm, looks like in theory we could write our own tool which wraps around |
Yes, we could, it would be relatively simple. The thing here is that I think it should be provided by the upstream. I don't see any reason why distributions should need to maintain their own python packaging stack. |
Why is |
See the issue I linked. TLDR: pip has too many dependencies, we would need to bootstrap every single one of them. I still fail to understand why is |
Pip itself is not acceptable for reasons elaborated upon in the linked setuptools issue. |
|
Maybe it was a mistake to make the high-level
|
(I'll try to get round to documenting this expectation more clearly) |
Specifically, what, though? I assume distros want to handle dependencies entirely through their own package systems - we're obviously not going to abstract over apt/yum/conda/etc., and I doubt you'd use it if we did. Once you've got all the build dependencies installed, you can pretty much just call |
A simple interface to just build wheels.
I don't want it to touch package management at all. If a needed dependency is missing it just errors out. It's a build system...
Yes, I just want this -- parse But I guess if you don't want it here, I can maintain it separately.
I am aware. |
I guess the answer to that is "because that functionality doesn't exist in this library (yet, and maybe never will)". @takluyver It does feel like there's some restructuring we should do here, as the current situation is clearly setting people's expectations incorrectly 🙁 I've raised #82 to discuss this. |
I think the easiest way to fix this is to not ship any commands, make them just examples. |
I had pondered trying to submit a patch to make pip_install() only invoke pip if the build requires were not available, but then I hit the snag of I cannot figure out a way to check a requirement specifier to see if it exists, other than apparently to use a pkg_resources WorkingSet (code soup). importlib.metadata can take a name and produce a found distribution and its version, but how do I compare this... |
This is pretty trivial in Python code, so I guess you mean you want a little wrapper to do it from a shell script? I wouldn't be against putting something at that level into |
With pypa/build on it's way, I think the underlying issue here will be resolved. And, #82 probably captures the rest of the relevant parts of this issue. Closing! |
It seems like
pep517.build
andpep517.check
will runpip install
on their own without ever telling anything to the user, and there's no way to disable this.Linux distributions often need a tool that simply builds a wheel, one that does not go run things like
pip install
on our backs. A lot of the reasons have been outlined in pypa/setuptools#2080. The problem is not just it is using pip, it's that it is fetching sources from the internet and installing packages without I ever tell it to do it. When I make a distribution package I want to be the one fetching and verifying all sources, and I want to be in control of what is installed to the filesystem.All I need is a simple build system without many dependencies (because we will need to bootstrap those, which is a lot of work). It should not do any package management, just build what I ask it to. It will fail if there are missing build dependencies.
And I believe this should be the default behavior, I think
python -m pep517.*
should be a build system first (actually, I think it should only be a build system but I don't think you agree). If a user wants to install a project from source, pip works, but please let's not add pip as a dependency at this level. If you really want pip to be run I would suggest adding a command-line option that would enable that behavior.Right now
python -m pep517.build
will error out because pip is not installed:There is no reason for pip to be there if I have every build dependency already.
Just a note on the shape python packaging is taking. I believe everything here should be modular, having a build system and installer, and then a package manager. I think pip should offload the work to these tools and just deal it the package management (fetching sources, managing dependencies, etc.).
The text was updated successfully, but these errors were encountered: