Support PathResource that comes from egg#139
Closed
palexander wants to merge 2 commits into
Closed
Conversation
Contributor
|
Thanks for the report; I am able to repro simply with boto. With wheel: mba=pex=; pex boto -o /tmp/boto.pex
mba=pex=; PEX_SCRIPT=glacier /tmp/boto.pex | head -5
glacier <command> [args]
Commands
vaults - Operations with vaultsWith egg: mba=pex=; pex boto --no-wheel -o /tmp/boto.pex
mba=pex=; PEX_SCRIPT=glacier /tmp/boto.pex
Traceback (most recent call last):
File ".bootstrap/_pex/pex.py", line 319, in execute
File ".bootstrap/_pex/pex.py", line 254, in _wrap_coverage
File ".bootstrap/_pex/pex.py", line 286, in _wrap_profiling
File ".bootstrap/_pex/pex.py", line 356, in _execute
File ".bootstrap/_pex/pex.py", line 389, in execute_script
_pex.pex.NotFound: Could not find script glacier in pex!Let me dig in to see what precisely is going on (since I believe we have test coverage for this) and then I will address your PR. |
Contributor
|
Confirmed -- we were only testing zip-safe eggs/wheels in |
wickman
added a commit
to wickman/pex
that referenced
this pull request
Aug 11, 2015
lorencarvalho
added a commit
to lorencarvalho/pex
that referenced
this pull request
Oct 8, 2015
* upstream/master: Migrate to the new travis-ci infra. [docs] update header in index.rst Add docs, change default behavior to use namesake command as pex. bdist_pex: Nicer output filename Don't choke if pkg has no console_scripts Allows --pex-args to take an argument Initial implementation of bdist_pex. Fix missed mock of safe_mkdir. Pin pytest to 2.5.2. Add pex-identifying User-Agent to requests sessions. Fix the docs release headers. Normalize all names in ResolvableSet. Fixes pex-tool#147. Release 1.0.3 Fix pex-tool#139: PEX_SCRIPT fails for scripts from not-zip-safe eggs. Fix a logging typo when determining the minimum sys.path Remove unnecessary stderr print on SystemExit().code == None Bump the pre-release version and update the change log. Accomodate OSX `Python` python binaries. Release 1.0.2 Address pex-tool#141. Update version.py to reflect 1.0.2.dev0. Fix from_env to capture only explicitly set values.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I was seeing failures when creating an entry point to a script that was included in an egg. I'm not super familiar with the pex internals, but it seemed to only happen when the pex was actually executing (IE it found the script during the build process but not during execution).
My guess is that the eggs get converted to a PathResource at some point and since the PathResource is treated the same as a WheelResource it fails on paths that came from eggs because the scripts directory is in a different location.
My fix was to try both finding scripts from an egg location and from a wheel location when a PathResource is found. I'm happy to add/update tests if you can point me to the relevant ones.