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

Isolated wheel building ignores rules_python-provided PYTHONPATH #754

Closed
dflems opened this issue Jul 13, 2022 · 2 comments
Closed

Isolated wheel building ignores rules_python-provided PYTHONPATH #754

dflems opened this issue Jul 13, 2022 · 2 comments
Labels
Can Close? Will close in 30 days if there is no new activity

Comments

@dflems
Copy link

dflems commented Jul 13, 2022

pip_repository goes through the effort of building PYTHONPATH using its vendored dependencies like setuptools. This is used in pip_repository and whl_library.

By default, it also passes --isolated to pip wheel, thereby ignoring the environment variables that it just set, so when wheels are built, the setuptools from rules_python is not used, instead the interpreter uses whatever setuptools is available to it.

Is this intended? For now I'm just setting isolated = False, but I would assume that rules_python would try and use the vendored python libraries for the sake of consistency, even when building wheels in isolated mode.

Context: Latest setuptools (63.1.0) is broken on non-homebrew macOS python 3.9 installations. I noticed that pip wheel was failing because of this and it was unexpectedly using this version rather than the one vendored in rules_python.

@hrfuller hrfuller self-assigned this Jul 13, 2022
@groodt
Copy link
Collaborator

groodt commented Jul 15, 2022

Is this intended?

I think in general, yes. I don't think the rules should be imposing dependencies on the users of the rules. Perhaps one idea would be to supply an additional lockfile for "build requirements" that get installed first before pip wheel is run? Or maybe only the version of setuptools to preinstall?

I agree that it's not great that it's not consistent between PYTHONPATH and the usage of pip wheel.

The situation where these rules fallback to running builds when they encounter sdist is an unfortunate situation of python packaging. These rules really work best when used with --only-binary=:all:.

@groodt groodt added the Can Close? Will close in 30 days if there is no new activity label Aug 14, 2022
@github-actions
Copy link

This issue was automatically closed because it went 30 days without a reply since it was labeled "Can Close?"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Can Close? Will close in 30 days if there is no new activity
Projects
None yet
Development

No branches or pull requests

3 participants