-
-
Notifications
You must be signed in to change notification settings - Fork 586
Allow using a locally installed Python runtime as a full toolchain #2070
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
Comments
I have no proposal for a concrete API but some related thoughts. 1 ) 2 ) 3 ) |
Synopsis of what arrdem on slack told me about their setup:
The basic way they've set things up is:
Insofar as this FR is concerned, I think the main things of interest are:
|
Yes. Using local toolchains is something users will have to opt-into in some fashion.
This is outside the scope of this issue. This is just about being able to make a locally installed Python runtime understood by Bazel. Something like this mostly be the purview of the pip.parse/pypi integration, which decides the where and how of 3rd party dependencies. (To a smaller extent, the purview of
I agree in principle, but we'll see how well it works out in practice. |
I second this point. Even without support for host toolchains, being able to set target_compatible_with, exec_compatible_with and target_settings for the hermetic toolchains without having to do the toolchain definition and registration steps manually would help me immediately in the projects I am working with. An open design decision is for me replacing vs extending. |
My usecase is fairly straightforward - I want to import a Paraview install and use their pvpython wrapper to be able to use a prebuilt environment that includes the paraview libraries; building paraview from source is complex and porting that to build in Bazel is complex due to the number of dependencies and its heavy reliance on CMake. In my case I just have a few standalone scripts that I need to run and so I'd like to be able to use the hermetic toolchain for my other targets but be able to select this toolchain for a few of my targets. |
) This adds docs and public APIs for using a locally installed python for a toolchain. Work towards #2070 --------- Co-authored-by: Ignas Anikevicius <[email protected]>
This feature request has come up a few time from different places.
The basic request is to have an option other than the hermetic runtimes, typically a Python runtime that is locally installed. Some of the reasons this is appealing:
pyenv
or venv activation.Making a local runtime have the same capabilities as a hermetic runtime is sort of possible today, but requires quite a bit of setup, and I think maybe loading a few private bzl files.
PR #2000 lays the ground work for most of it. What's now missing is a public API for it and figuring out what knobs (if any) it needs.
For at least early testing, we're thinking to have a flag control what type of runtime is selected.
But, during our maintainers meeting, two big questions came up:
So, if you have use cases, please post them here. It'll help us figure out what capabilities are needed.
The text was updated successfully, but these errors were encountered: