Skip to content

Conversation

@dolfinus
Copy link

Hello.

This package is directly calling virtualenv executable. But it could be not installed in the current environment. Especially in case of Python 3 there it was replaced with new system package venv.

My proposal is to all virtualenv package to a list of dependencies instead of adding some checks if package is present or not. Also virtualenv is already falling back to venv in case of Python 3, so there is no need to perform such a check manually.

@dolfinus dolfinus force-pushed the missing_virtualenv_dependency branch from d2fe9ca to d72d049 Compare May 13, 2021 23:28
def _virtualenv(self):
"""The arguments used to call virtualenv."""

return [sys.executable, '-m', 'virtualenv']
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because now we can be sure that virtualenv is installed into the same environment as the current package, we can call it directly. Otherwise it is possible to receive some strange caused by wrong PATH value or too old virtualenv package.

return os.path.split(self.path)[0]

@property
def name(self):
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant