You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:.
pip_repository
goes through the effort of buildingPYTHONPATH
using its vendored dependencies likesetuptools
. This is used inpip_repository
andwhl_library
.By default, it also passes
--isolated
topip wheel
, thereby ignoring the environment variables that it just set, so when wheels are built, thesetuptools
fromrules_python
is not used, instead the interpreter uses whateversetuptools
is available to it.Is this intended? For now I'm just setting
isolated = False
, but I would assume thatrules_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 thatpip wheel
was failing because of this and it was unexpectedly using this version rather than the one vendored inrules_python
.The text was updated successfully, but these errors were encountered: