-
-
Notifications
You must be signed in to change notification settings - Fork 258
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
Implement bdist_pex. #149
Merged
Merged
Implement bdist_pex. #149
Conversation
This file contains 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
self._write(pex_builder, target, script=name) | ||
else: | ||
# The package has no namesake entry point, so build an environment pex. | ||
# TODO(wickman) Is this a reasonable default behavior? Should we fall back |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its a reasonable default.
Prevents this error: $ python setup.py bdist_pex --pex-args='-r gunicorn-req.txt -r ipython-req.txt' usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help error: option --pex-args must not have an argument
Prevents this error: $ python setup.py bdist_pex --pex-args="--index-url=http://packages.corp.surveymonkey.com/index" running bdist_pex Traceback (most recent call last): File "setup.py", line 5, in <module> pbr=True File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup dist.run_commands() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/Users/marca/dev/git-repos/pex/pex/commands/bdist_pex.py", line 64, in run if len(self.distribution.entry_points['console_scripts']) == 1: KeyError: 'console_scripts'
1. Include version number in output filename, like `sdist` and `bdist_wheel` do. 2. Output the actual filename that we are writing to, including the `bdist_dir`. Instead of this: $ python setup.py bdist_pex --pex-args="--index-url=http:/myindex" running bdist_pex Writing environment pex into dummysvc.pex we get this: $ python setup.py bdist_pex --pex-args="--index-url=http://myindex" running bdist_pex Writing environment pex into /Users/marca/dev/surveymonkey/DummySvc/dist/dummysvc-0.0.4.dev53.pex
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.
This is my cut at bdist_pex with @msabramo's fixes rebased on top. The main question is if the implemented/documented behavior is sane. It seems reasonable to me but I'm also unsure about what potential customers think.
Addresses feature request #99.