-
Notifications
You must be signed in to change notification settings - Fork 1
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
Distribute binary version that doesn't require a system python #145
Comments
See prior discussion here, including some possibly-out-of-date discussion on:
|
Rust has Tier 2 support for M1 currently: https://doc.rust-lang.org/beta/rustc/platform-support.html. AIUI that means it should work. Python is reported to work on M1 too, but there's no official build. However, an x86 build should run just fine on the M1, AIUI. We're not doing anything complex in opensafely-cli itself - that's all off boarded to docker.
Yes, in terms of prioritisation. But unless we move to only supporting gitpod/Code Spaces, this work is still useful. Currently, job-runner python code base has to maintain compatibility with python 3.8 and 3.9 (we should really add 3.10 and soon 3.11 to that) to support installing it on whatever version of system python users have installed. Fixing this ticket would allow job-runner and opensafely-cli codebases to just support a single python version, and use that in prod and in opensafely-cli. |
3.9.1 (released 7th December 2020) brought official support for Apple Silicon (that's M1 and M2 chips) via the universal2 builds of the runtime. |
This would also solve for the broken-on-macos This invocation of pip is incompatible with our documented method of installing opensafely-cli on macOS. |
I think we should not use pipx in the docs. It adds no value to the specific case of opensafely-cli, which has no dependencies by design and thus does not need to be installed in an isolated venv anyway. |
Very good point! Those docs predate our vendoring of dependencies, which is why we went with pipx. Captured in opensafely/documentation#1026 |
We currently distribute opensafely-cli via pip. This is not great:
Ideally, we would distribute opensafely-cli as a binary, which:
a) includes the specific version of python we want to use
b) includes all the dependencies at build time
c) is platform specific so we can use C dependencies
One promising avenue for this is pyoxidizer. This is a rust tool chain that builds a platform specific binary with your code, deps, and a python interpreter (with only the parts of stdlib that your code uses).
The text was updated successfully, but these errors were encountered: