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

The vendor script should support skip markers. #649

Closed
jsirois opened this issue Jan 22, 2019 · 1 comment
Closed

The vendor script should support skip markers. #649

jsirois opened this issue Jan 22, 2019 · 1 comment
Assignees

Comments

@jsirois
Copy link
Member

jsirois commented Jan 22, 2019

Right now, running tox -evendor modifies pex/environment.py:

$ git diff pex/environment.py
diff --git a/pex/environment.py b/pex/environment.py
index e161254..aff4d9e 100644
--- a/pex/environment.py
+++ b/pex/environment.py
@@ -32,12 +32,12 @@ from pex.util import CacheHelper, DistributionHelper
 
 def _import_pkg_resources():
   try:
-    import pkg_resources
+    import pex.third_party.pkg_resources as pkg_resources
     return pkg_resources, False
   except ImportError:
     from pex import third_party
     third_party.install(expose=['setuptools'])
-    import pkg_resources
+    import pex.third_party.pkg_resources as pkg_resources
     return pkg_resources, True

It should not touch these particular imports; so some mechanism to tell it to skip is needed. Something like a # vendor:skip should do.

@jsirois
Copy link
Member Author

jsirois commented Jan 22, 2019

This is needed to support #650

@jsirois jsirois self-assigned this Jan 22, 2019
jsirois added a commit to jsirois/pex that referenced this issue Jan 22, 2019
This affords adding a CI check to ensure we never commit vendored code
with modifications beyond import re-writes.

Fixes pex-tool#649
Fixes pex-tool#650
jsirois added a commit that referenced this issue Jan 23, 2019
This affords adding a CI check to ensure we never commit vendored code
with modifications beyond import re-writes.

And for this first burn of the new CI check to go green, the edit of
vendored wheel code in 16cfd97 is undone by a fresh run of
`tox -evendor`.

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

No branches or pull requests

1 participant