-
Notifications
You must be signed in to change notification settings - Fork 134
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
With python3 use default venv module. #71
Conversation
looks good, any idea if/how we can automatically test this in a sensible manner? |
Yeah, there're 2 improvements I would like to add, but haven't found the
On Friday, 4 March 2016, Ronny Pfannschmidt [email protected]
|
I tried a few things but I didn't find an approach that would make it better than the way I'm doing it now, simply by trying to invoke the module. It's tricky to invoke python from a python script to get its version correctly, and it doesn't make the code any shorter/better in my point of view. |
Note, this also requires a few minor modifications in get-pipsi.py. The issue also allows to avoid installing |
@mikek I updated |
If the venv module is found, use it to create the virtual env, otherwise fallback to use virtualenv. An new paramater --virtualenv is available to force the use of virtualenv. Fixes mitsuhiko#70
51150c9
to
4922041
Compare
@@ -45,6 +45,15 @@ def command_exists(cmd): | |||
return False | |||
|
|||
|
|||
def is_python3(): | |||
try: |
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.
Why not use return sys.version_info > (3, 0, 0)
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.
because python
may not be sys.executable
^^
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.
Makes sense, thanks.
This PR should be closed in favor of #76 and #91. Unless the |
If the venv module is found, use it to create the virtual env, otherwise fallback to use virtualenv. An new paramater --virtualenv is available to force the use of virtualenv.
It fixes the problem on OSX #70