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

pip_import: Let users override system Python via PYTHON env var #179

Closed
wants to merge 1 commit into from
Closed

pip_import: Let users override system Python via PYTHON env var #179

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Apr 16, 2019

CentOS 6 provides Python 2.6.6, which is too old to satisfy pip_import's
dict comprehension requirement. I need some way to point pip_import to
an alternate Python distribution.

This change adds system Python override to pip_import and whl_library
via the PYTHON environment variable.

Resolves #178.

CentOS 6 provides Python 2.6.6, which is too old to satisfy `pip_import`'s
dict comprehension requirement.  I need some way to point `pip_import` to
an alternate Python distribution.

This change adds system Python override to `pip_import` and `whl_library`
via the `PYTHON` environment variable.

Resolves #178.
@brandjon
Copy link
Member

Hi Ryan, thanks for the PR. The recently merged #252 allows you to include a python_interpreter attr, and we're about to add a pip3_import (#256) as a wrapper.

Compared with those approaches, this one allows the user to easily inject an alternate Python interpreter by setting an env var. But I don't think it's necessary to directly support that use case if we have an attribute users can set in their WORKSPACE. Note that the env var behavior can now be obtained by writing a macro wrapper around pip_import.

In light of this, I'll let #256 mark this PR closed.

@brandjon brandjon mentioned this pull request Nov 13, 2019
@ghost
Copy link
Author

ghost commented Nov 14, 2019

In light of this, I'll let #256 mark this PR closed.

Sounds good.

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

Successfully merging this pull request may close these issues.

Allow users to override system Python
3 participants