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

Support vendoring of the Python interpreter #10447

Closed
danieljanes opened this issue Jul 24, 2020 · 2 comments · Fixed by #18352
Closed

Support vendoring of the Python interpreter #10447

danieljanes opened this issue Jul 24, 2020 · 2 comments · Fixed by #18352

Comments

@danieljanes
Copy link

Some rule sets for Bazel support vendoring of the Python interpreter itself:
https://github.com/dropbox/dbx_build_tools
https://github.com/dillon-giacoppo/rules_python_external

The motivation for doing so is to have more deterministic builds and a smaller diff between dev and prod environments. Are there any plans to support this in Pants?

@valeraz
Copy link

valeraz commented Feb 24, 2023

+1 to this request. Doing this would enable us (Slack mobile developer experience) to get out of the business of managing docker (which is heavy and has performance implications) in our CI environment just to make sure that the correct version of python is there.

@kaos
Copy link
Member

kaos commented Feb 24, 2023

See #18352 ;)

the timing for that comment was exceptional.. :)

thejcannon added a commit that referenced this issue Mar 5, 2023
… impl) (#18352)

Fixes #10447

Adding the ability for an optional union (`PythonProvider`) implementer
to return a `PythonExecutable` (newly outfitted with
`append_only_caches`) so that Python for user code can be supplied
completely by rule-code. Additionally added a `pyenv` union
implementation.

The dirty details are:
- Python is essentially NOT relocatable (hats off to IndyGreg). Python
itself, as well as ecosystem tools, are baked with assumptions about
absolute paths.
- Python installation is not atomic. That means we do our work behind a
lock. We run the bash script on every session, but it should be fast as
it only does the work if the target python doesnt exist.

---------

Co-authored-by: Andreas Stenius <git@astekk.se>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants