Commit e56b43a9 by Chip Warden Committed by Sébastien Eustace

Suggested fix for Issue #59 (#60)

* Install using Python version running get-poetry.py script.

* Fix Homebrew distutils issue.

* Revert --install-options; breaks building wheels.
parent 8708540f
...@@ -119,6 +119,7 @@ def temporary_directory(*args, **kwargs): ...@@ -119,6 +119,7 @@ def temporary_directory(*args, **kwargs):
class Installer: class Installer:
CURRENT_PYTHON = sys.executable
METADATA_URL = 'https://pypi.org/pypi/poetry/json' METADATA_URL = 'https://pypi.org/pypi/poetry/json'
VERSION_REGEX = re.compile( VERSION_REGEX = re.compile(
'v?(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:\.(\d+))?' 'v?(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:\.(\d+))?'
...@@ -197,7 +198,7 @@ class Installer: ...@@ -197,7 +198,7 @@ class Installer:
dist = os.path.join(dir, 'dist') dist = os.path.join(dir, 'dist')
print(' - Getting dependencies') print(' - Getting dependencies')
self.call( self.call(
'python', '-m', 'pip', 'install', 'poetry=={}'.format(version), self.CURRENT_PYTHON, '-m', 'pip', 'install', 'poetry=={}'.format(version),
'--target', dist '--target', dist
) )
...@@ -243,7 +244,7 @@ class Installer: ...@@ -243,7 +244,7 @@ class Installer:
) )
self.call( self.call(
'python', '-m', 'pip', 'install', self.CURRENT_PYTHON, '-m', 'pip', 'install',
'--upgrade', '--upgrade',
'--no-deps', '--no-deps',
os.path.join(dir, 'poetry-{}-{}.whl'.format(version, tag)) os.path.join(dir, 'poetry-{}-{}.whl'.format(version, tag))
......
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