-
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
Source-less distribution support #148
Comments
Apart from the merge conflict which would need to be addressed, this PR doesn't deal with the I don't see why this is necessary, though. The |
That sounds sensible but what we have struggled with in buildroot is to discover what .py files are scripts, not to be byte-compiled. There was a discussion if those scripts should be installed to The thread for that discussion is http://lists.busybox.net/pipermail/buildroot/2022-August/648686.html, if anyone is interested, Do you have any other ideas how to handle this in a more generic way than special casing this one file for both pep517 and pip (and any other build tool that decides to vendor pep517)? (Interestingly a somewhat related issue has just been opened for pip pypa/pip#11406) |
Nope, I think special-casing is the right thing to do here. |
I'm happy enough to have the special case inside pep517, as #130 implements, if that's the easiest way to do it. I just hadn't got round to looking at it (there's way more stuff to do than time in the day to do it). |
it does run as a module though...
It's not immediately clear to me why
So, either the module import path could be hardcoded and exec'd via This team obviously understands the architecture of their code better than i do, but is there some expectation that the file yielded by |
There's no guarantee that the in-proc script is being run by the Python installation that has I suggest we stop debating theory here, and if you want this, get #130 working and test it in various sourceless environments (including some complex pip builds, which means you'll need to set up a copy of pip with the patched version vendored in) to confirm it works. |
Shouldn't you just be using entry points, our pep517 infrastructure uses installer which should support those?
I'm confused here, buildroot doesn't really support pip in general and also doesn't vendor pep517(buildroot uses normal unvendored pep517 for the pep517 build frontend). |
This is talking about using pip on the target. (In combination with venv most likely) |
That's not really maintained AFAIU, and is unlikely to work properly due to the lack of a target compiler. Why are you trying to use pip on the target? I typically just sync/share a project source tree from my development system to buildroot and run the project without installing if I need to do development testing on my target system, there's other techniques as well that one can use depending on requirements. |
I'll give you the OpenWrt answer here (which may be similar to Buildroot's): at least in the OpenWrt case, since it's a distribution (on it's own) running on routers, you get users wanting to run Python on it and have some basic way of writing scripts, and if possible install (Python-only) packages via pip. Even the ability to install Python only packages on the device was enough (for most users; I suspect [1] ) . At least that was the idea back in ~2015. I don't have an answer as to why people want to run pip on the routers, (i.e.) on systems with 64 MB of RAM, and 8-16 MB of flash, but they do. Packaging pip2 & pip3 alongside Python2/3 opens the gate to not having to maintain many packages in the OpenWrt buildsystem. Otherwise, if people want some Python package, they need to package it via OpenWrt's build-system (which can be cumbersome for your average hobbyist). Luckily, there's no more Python2 these days, which (as a maintainers) means half-work (no more need to care about Py2 compatibility for each Python2 variant). [1] I say that "I suspect", because over time, people never told me what they do, just what doesn't work. Silence also means "it's probably working" Hope this helps :) |
You don't really need pip for that though, you can just copy a virtualenv from a build host or use various other techniques.
Buildroot doesn't really support openwrt style package installation in general. |
Yeah, but the average use-case for OpenWrt is:
|
I will correct this here, and say that I don't know what the average use-case for OpenWrt is (because I have no data) :) |
Currently pep517 installs fail when running from a source-less python distribution because pep517 tries to run a .py file which doesn't exist in the source-less install.
There has been some recent discussion around the support status of this with the reiterated conclusion that this is an officially supported (but somewhat discouraged) method of running cpython.
There's been an attempt to resolve this here but that hasn't gotten any feedback: #130 Would that be a sensible way to solve the problem or should another approach be taken?
The python distribution in question here is provided by the embedded buildroot distribution. (Though openwrt seems to run into the same problem as seen in the PR above),
The text was updated successfully, but these errors were encountered: