-
Notifications
You must be signed in to change notification settings - Fork 20
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
Option to avoid download python exe from https://github.com/indygreg/python-build-standalone #154
Comments
@darcy-shen that's a no-go. The whole point of scie-pants is that it ships with a Python interpreter you, as the consumer, are unaware of. It is absolutely not intended to work with an external interpreter. Do you actually care about the interpreter it uses, or just that it doesn't download the interpreter dynamically? If its the latter, that can be accomodated. Right now we just ship a "thin" scie that does not include the Python interpreter - to save space - but downloads it as needed instead. We can also ship "fat" scies that include the interpreter. That said, downloads will still happen (of wheels) when a new Pants version is installed. I guess what I really need here is more explanation of why you want to avoid https://github.com/indygreg/python-build-standalone - due to the technology, due to the runtime use of the network, or some other reason? |
I have found a better way to install Python, see pantsbuild/pants#17962
Yes, it can be unstable for me. The network is not guaranteed to be stable. |
That's a great idea. |
Instead of using raw `scie-jump` and a hand-crafted JSON lift manifest, use `science` and a TOML lift mabifest to build `scie-pants`. The `science` tool and its more friendly interface are the present and future of end-user scie construction. We convert here and gain a few things: + A manifest format we can comment. + Abstraction over platforms and PBS details. + Support for embedded build provenanace information for more comprehensive black box debugability. + A clean path to publishing both "thin" and "fat" binaries and solving pantsbuild#154.
Instead of using raw `scie-jump` and a hand-crafted JSON lift manifest, use `science` and a TOML lift manifest to build `scie-pants`. The `science` tool and its more friendly interface are the present and future of end-user scie construction. We convert here and gain a few things: + A manifest format we can comment. + Abstraction over platforms and PBS details. + Support for embedded build provenanace information for more comprehensive black box debugability. + A clean path to publishing both "thin" and "fat" binaries, solving #154.
With scie-pants now converted to science for building its scie, creating fat scies for release is as easy as adding scie-pants/package/src/scie_pants.rs Lines 37 to 61 in 14ed784
The question that needs to be considered is whether to make the fat scie fully fat (Also include I'll leave all this for others to kvetch over and implement. |
I like to use termux on my android phone, but it is a quirky environment. Most apps require patching to support the prefixed/relocated location for libs and other lookup paths. I can't use scie-pants because the underlying crates can't find resolve.conf and related networking bits, so dns lookups fail. Even if the networking bits were resolved, PBS does not have a build for termux (astral-sh/python-build-standalone#176 and astral-sh/python-build-standalone#87). However, I finally found a pre-built python 3.9 interpreter for termux, so I would love to make scie-pants just use that. Relevant links:
To install these deb files I run |
@cognifloyd could |
Sweet. That's a helpful knob I didn't realize existed. So, I can now bypass the networking bits, but I think termux has to patch locking in Python to work with Android's libc, so I run into this error with the vanilla PBS:
This is the python compile/configure option that I think PBS is missing: edit: no it is probably not that patch. I think the issue is that the python binary can't find libc as it is linked against glibc not the android libc. I can't even run the PBS python binary that scie unpacked.)
Vs the termux build:
|
You point it at a |
SCIE checks a hash of the file, so that won't work. 😞 Lines 96 to 99 in d336b8f
|
Doh. Forgot about that. Lol- Well, it sure is being secure at least. 😅 |
For example, in Github Action, we'd prefer to install the python needed by Pants itself by
actions/setup-python
.The text was updated successfully, but these errors were encountered: