Commit 47f52900 by Sébastien Eustace

Fix call to venv binaries on windows

parent 91abdc34
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
- Fixed built wheels not getting information from the virtualenv. - Fixed built wheels not getting information from the virtualenv.
- Fixed building wheel with conditional extensions. - Fixed building wheel with conditional extensions.
- Fixed missing files in built wheel with extensions. - Fixed missing files in built wheel with extensions.
- Fixed call to venv binaries on windows
[0.6.2] - 2018-03-19 [0.6.2] - 2018-03-19
......
...@@ -36,9 +36,12 @@ class Venv: ...@@ -36,9 +36,12 @@ class Venv:
if self._venv: if self._venv:
self._venv = Path(self._venv) self._venv = Path(self._venv)
self._windows = sys.platform == 'win32'
self._bin_dir = None self._bin_dir = None
if venv: if venv:
bin_dir = 'bin' if sys.platform != 'win32' else 'Scripts' bin_dir = 'bin' if not self._windows else 'Scripts'
self._bin_dir = self._venv / bin_dir self._bin_dir = self._venv / bin_dir
self._version_info = None self._version_info = None
...@@ -254,7 +257,7 @@ class Venv: ...@@ -254,7 +257,7 @@ class Venv:
if not self.is_venv(): if not self.is_venv():
return bin return bin
return str(self._bin_dir / bin) return str(self._bin_dir / bin + ('.exe' if self._windows else ''))
def is_venv(self) -> bool: def is_venv(self) -> bool:
return self._venv is not None return self._venv is not None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment