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

poetry virtualenv python is not used #8

Open
ruidc opened this issue Aug 3, 2021 · 2 comments
Open

poetry virtualenv python is not used #8

ruidc opened this issue Aug 3, 2021 · 2 comments

Comments

@ruidc
Copy link

ruidc commented Aug 3, 2021

It's likely what is referred to in the TODOs, but how can I use this to execute the poetry virtualenv python instead of the platform python?

@ruidc ruidc changed the title poetry virtualenv binary is not used poetry virtualenv python is not used Aug 3, 2021
@NathanHowell
Copy link
Contributor

@ruidc indeed, this repo doesn't have any Python toolchain support. if this is something you can help with we'd be happy to take a PR. for reference, we've been using (more or less) https://gist.github.com/NathanHowell/5cf4a353a8dd3a1025e682c4707d5bac to wire up a virtualenv toolchain specifically for Bazel.

it may be easy to get the Poetry venv path and use that instead, however the package layout used by rules_poetry does not match a standard venv. this was done to allow fine grained dependencies in Bazel sandboxes (only packages used by a target are in the PYTHONPATH), versus a standard venv where all packages will be available to all targets (regardless of deps). there may be a creative solution to get this behavior with a standard venv tho too, I just haven't found it yet.

@ruidc
Copy link
Author

ruidc commented Aug 3, 2021

Thanks for the prompt reply - at the moment I'm still trying to understand the potential suitability of Bazel to our existing stack and have had no contact with Bazel (or poetry until recently). I did also find https://github.com/Mousius/rules_python_poetry and https://github.com/martinxsliu/rules_python_poetry and trying to cross compare.

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

No branches or pull requests

2 participants