-
Notifications
You must be signed in to change notification settings - Fork 21
Add virtualenv package to dependencies list #49
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
Open
dolfinus
wants to merge
1
commit into
sjkingo:master
Choose a base branch
from
dolfinus:missing_virtualenv_dependency
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+139
−19
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,102 @@ | ||
| !/tests/bin/ | ||
| *$py.class | ||
| *,cover | ||
| *.bak | ||
| *.egg | ||
| *.egg-info/ | ||
| *.iws | ||
| *.launch | ||
| *.log | ||
| *.manifest | ||
| *.mo | ||
| *.pot | ||
| *.py[cod] | ||
| *.pyc | ||
| /build/ | ||
| /dist/ | ||
| *.pydevproject | ||
| *.sage.py | ||
| *.so | ||
| *.spec | ||
| *.swp | ||
| *.tmp | ||
| *~.nib | ||
| .Python | ||
| .buildpath | ||
| .cache | ||
| .cache-main | ||
| .classpath | ||
| .coverage | ||
| .coverage.* | ||
| .cproject | ||
| .eggs/ | ||
| .env | ||
| .externalToolBuilders/ | ||
| .factorypath | ||
| .hypothesis/ | ||
| .idea/ | ||
| .idea/**/dataSources.ids | ||
| .idea/**/dataSources.local.xml | ||
| .idea/**/dataSources.xml | ||
| .idea/**/dataSources/ | ||
| .idea/**/dynamic.xml | ||
| .idea/**/gradle.xml | ||
| .idea/**/libraries | ||
| .idea/**/mongoSettings.xml | ||
| .idea/**/sqlDataSources.xml | ||
| .idea/**/tasks.xml | ||
| .idea/**/uiDesigner.xml | ||
| .idea/**/workspace.xml | ||
| .idea/dictionaries | ||
| .idea/replstate.xml | ||
| .idea/sonarlint | ||
| .idea/vcs.xml | ||
| .idea_modules/ | ||
| .installed.cfg | ||
| .ipynb_checkpoints | ||
| .loadpath | ||
| .metadata | ||
| .project | ||
| .pydevproject | ||
| .python-version | ||
| .recommenders | ||
| .recommenders/ | ||
| .ropeproject | ||
| .settings/ | ||
| .target | ||
| .texlipse | ||
| .tox/ | ||
| .venv | ||
| .vscode | ||
| .webassets-cache | ||
| .worksheet | ||
| /out/ | ||
| /site | ||
| ENV/ | ||
| __pycache__/ | ||
| atlassian-ide-plugin.xml | ||
| build/ | ||
| celerybeat-schedule | ||
| cmake-build-debug/ | ||
| com_crashlytics_export_strings.xml | ||
| coverage.xml | ||
| crashlytics-build.properties | ||
| crashlytics.properties | ||
| dags/*.py | ||
| develop-eggs/ | ||
| dist/ | ||
| downloads/ | ||
| eggs/ | ||
| env/ | ||
| lib/ | ||
| lib64/ | ||
| local.properties | ||
| local_settings.py | ||
| nosetests.xml | ||
| parts/ | ||
| pip-log.txt | ||
| sdist/ | ||
| target/ | ||
| tmp/ | ||
| var/ | ||
| venv/ | ||
| wheels/ | ||
| /virtualenv_api.egg-info/ |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| include README.rst requirements.txt | ||
| exclude tests.py | ||
| recursive-exclude * __pycache__ | ||
| recursive-exclude * *.pyc | ||
| recursive-exclude * *.pyo | ||
| recursive-exclude * *.orig |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| six | ||
| virtualenv |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -77,11 +77,6 @@ def root(self): | |
| """The root directory that this virtual environment exists in.""" | ||
| return os.path.split(self.path)[0] | ||
|
|
||
| @property | ||
| def name(self): | ||
| """The name of this virtual environment (taken from its path).""" | ||
| return os.path.basename(self.path) | ||
|
|
||
| @property | ||
| def _logfile(self): | ||
| """Absolute path of the log file for recording installation output.""" | ||
|
|
@@ -92,22 +87,28 @@ def _errorfile(self): | |
| """Absolute path of the log file for recording installation errors.""" | ||
| return os.path.join(self.path, 'build.err') | ||
|
|
||
| @property | ||
| def _virtualenv(self): | ||
| """The arguments used to call virtualenv.""" | ||
|
|
||
| return [sys.executable, '-m', 'virtualenv'] | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because now we can be sure that |
||
|
|
||
| def _create(self): | ||
| """Executes `virtualenv` to create a new environment.""" | ||
| if self.readonly: | ||
| raise VirtualenvReadonlyException() | ||
| args = ['virtualenv'] | ||
|
|
||
| args = [] | ||
| if self.system_site_packages: | ||
| args.append('--system-site-packages') | ||
| if self.python is None: | ||
| args.append(self.name) | ||
| else: | ||
| args.extend(['-p', self.python, self.name]) | ||
| proc = subprocess.Popen(args, cwd=self.root, stdout=subprocess.PIPE, stderr=subprocess.PIPE) | ||
| if self.python is not None: | ||
| args.extend(['-p', self.python]) | ||
|
|
||
| proc = subprocess.Popen(self._virtualenv + args + [self.path], stdout=subprocess.PIPE, stderr=subprocess.PIPE) | ||
| output, error = proc.communicate() | ||
| returncode = proc.returncode | ||
| if returncode: | ||
| raise VirtualenvCreationException((returncode, output, self.name)) | ||
| raise VirtualenvCreationException((returncode, output, self.path)) | ||
| self._write_to_log(output, truncate=True) | ||
| self._write_to_error(error, truncate=True) | ||
|
|
||
|
|
||
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.
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.
virtualenv can handle absolute path of a target directory, let's use it instead of relative one.