Skip to content
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

Subpar alternative/comparison documentation #636

Closed
Code0x58 opened this issue Dec 18, 2018 · 3 comments · Fixed by #2466
Closed

Subpar alternative/comparison documentation #636

Code0x58 opened this issue Dec 18, 2018 · 3 comments · Fixed by #2466

Comments

@Code0x58
Copy link

copied over from issue on website repo pantsbuild/pantsbuild.github.io/issues/10 for exposure

The PEX Design page doesn't list subpar as an alternative, although it seems to be.

I don't know how much is configurable between the two, or how different situations are handled (such as C extensions). It looks like pex isn't very portable, but handles dependencies at least a bit differently.

Does anyone know the two well enough to be able to give a fairly detailed comparison on the practical differences in the website repo?

@jsirois
Copy link
Member

jsirois commented Dec 21, 2018

The PEX Design page doesn't list subpar as an alternative, although it seems to be.

PEX was designed in 2010 and 1st open sourced in 2011; so subpar was not an alternative at the time [1]. PARs were still a Google internal-only thing at that point; although they were known and served as inspiration with the key difference that Google controlled their underlying OS and so could more easily package an interpreter into the archive. Out here in the wild west, this is trickier since we'd need to be able to package up an interpreter for OSX, various linuces and - someday - windows. As such a specific non-goal of pex was tackling embedding an interpreter. Instead, pex tries to support interpreter constraints via various means so the "right" interpreter is picked from the host environment. Additionally, pex has supported multi-platform pexes from ~day one. The idea here is native deps for multiple platforms are embedded in a single pex. This primarily allowed building a pex on, say a linux CI machine, but having the resulting binary work on linux and OSX. I know ~nothing about subpar so can't say much more.

[1] google/subpar@e1f097e

@jsirois
Copy link
Member

jsirois commented Jul 15, 2024

I'm re-opening since #2096 is about to ship and I'll let the PR closing that issue close this as well for better cross-reference.

@jsirois jsirois reopened this Jul 15, 2024
jsirois added a commit to jsirois/pex that referenced this issue Jul 15, 2024
You can now specify `--scie {eager,lazy}` when building a PEX file and
one or more additional native executable PEX scies will be produced
along side the PEX file. These PEX scies will contain a portable CPython
interpreter from [Python Standalone Builds][PBS] in the `--scie eager`
case and will instead fetch a portable CPython interpreter just in time
on first boot on a given machine if needed in the `--scie lazy` case.

Although Pex will pick the target platforms and target portable CPython
interpreter version automatically, if more control is desired over which
platforms are targeted and which Python version is used, then
`--scie-platform`, `--scie-pbs-release`, and `--scie-python-version` can
be specified.

Closes pex-tool#636
Closes pex-tool#1007
Closes pex-tool#2096

[PBS]: https://github.com/indygreg/python-build-standalone
jsirois added a commit that referenced this issue Jul 17, 2024
You can now specify `--scie {eager,lazy}` when building a PEX file and
one or more additional native executable PEX scies will be produced
along side the PEX file. These PEX scies will contain a portable CPython
interpreter from [Python Standalone Builds][PBS] in the `--scie eager`
case and will instead fetch a portable CPython interpreter just in time
on first boot on a given machine if needed in the `--scie lazy` case.

Although Pex will pick the target platforms and target portable CPython
interpreter version automatically, if more control is desired over which
platforms are targeted and which Python version is used, then
`--scie-platform`, `--scie-pbs-release`, and `--scie-python-version` can
be specified.

Closes #636
Closes #1007
Closes #2096

[PBS]: https://github.com/indygreg/python-build-standalone
@jsirois
Copy link
Member

jsirois commented Jul 17, 2024

With the release of Pex 2.11.0, you can now add --par {eager,lazy} to your Pex command line and get a PEX with interpreter included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants