Skip to content

Commit

Permalink
Merge pull request #9024 from gem/fix-installation-mismatch
Browse files Browse the repository at this point in the history
In `devel` or `devel_server` installations, read requirements from `master` if `--version` is not passed to `install.py`
  • Loading branch information
ptormene authored Sep 21, 2023
2 parents a9c6164 + da77ac6 commit 5b62fc3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,13 @@ def ensure(pip=None, pyvenv=None):
% sys.executable))


def get_branch(version):
def get_branch(version, inst):
"""
Convert "version" into a branch name
"""
if version is None:
if (inst is devel or inst is devel_server):
return 'master'
# retrieve the tag name of the current stable version
with urlopen('https://pypi.org/pypi/openquake.engine/json') as resp:
content = resp.read()
Expand Down Expand Up @@ -381,7 +383,7 @@ def install(inst, version):
'pip', 'wheel'])

# install the requirements
branch = get_branch(version)
branch = get_branch(version, inst)
if sys.platform == 'darwin':
mac = '_' + platform.machine(), # x86_64 or arm64
else:
Expand Down

0 comments on commit 5b62fc3

Please sign in to comment.