-
-
Notifications
You must be signed in to change notification settings - Fork 259
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
pex 1.6.1 cannot build cryptography 2.5 #661
Labels
Comments
I spiked on this yesterday and ammended the venording code to omit conditional vendored imports of the form: if "__PEX_UNVENDORED__" in __import__("os").environ:
import pkg_resources
else:
import pex.third_party.pkg_resources as pkg_resources This allows exposing the vendored dists in un-vendored mode to run installs with by:
This will also remove one of the hardest to grok bits of pex where it concocts a substitute setup.py that sets up sys.path and then hands off to the underlying setup.py. I'll cleanup that spike and prep a PR. |
jsirois
added a commit
to jsirois/pex
that referenced
this issue
Feb 6, 2019
Now that pex vendors setuptools and wheel, we build / install sdists with potentially fragile import semantics for these two distributions. In particular, we trip up against this when trying to build cryptography. Robustify installs by de-vendoring setuptools and wheel when used in an install context. In order to support de-vendoring make the method of import conditional on an environment variable instead of attempting to re-write vendored imports at runtime. Fixes pex-tool#661
jsirois
added a commit
to jsirois/pex
that referenced
this issue
Feb 7, 2019
Now that pex vendors setuptools and wheel, we build / install sdists with potentially fragile import semantics for these two distributions. In particular, we trip up against this when trying to build cryptography. Robustify installs by de-vendoring setuptools and wheel when used in an install context. In order to support de-vendoring make the method of import conditional on an environment variable instead of attempting to re-write vendored imports at runtime. Fixes pex-tool#661
jsirois
added a commit
that referenced
this issue
Feb 7, 2019
Now that pex vendors setuptools and wheel, we build / install sdists with potentially fragile import semantics for these two distributions. In particular, we trip up against this when trying to build cryptography. Robustify installs by de-vendoring setuptools and wheel when used in an install context. In order to support de-vendoring make the method of import conditional on an environment variable instead of attempting to re-write vendored imports at runtime. Fixes #661
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The mechanics here are subtle - setuptools does a build isolation dance involving unimports that interacts in a fragile way with its monkey-patching of distutils. We see a failure like so due to the unimporting interaction with the monkeypatches:
The text was updated successfully, but these errors were encountered: