Commit 141504dc authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

Heptapod CI: a single pip call for HGitaly and py-heptapod

It should be a bit faster, and pip 20.3 will perform a better
analysis of dependencies with a single call.

--HG--
branch : heptapod-stable
parent a65c04743e12
...@@ -80,10 +80,15 @@ HG_CMD = (HG_BIN, ...@@ -80,10 +80,15 @@ HG_CMD = (HG_BIN,
'--config', 'extensions.topic=', '--config', 'extensions.topic=',
) )
PYTHON_COMPONENTS = {
'py-heptapod': PY_HEPTAPOD_CLONE_PATH,
'hgitaly': HGITALY_CLONE_PATH,
}
# yes, Mercurial is readily available in GitLab base CI image! # yes, Mercurial is readily available in GitLab base CI image!
# It is installed in the Python 3.8 interpreter # It is installed in the Python 3.8 interpreter
for slug, target in (('py-heptapod', PY_HEPTAPOD_CLONE_PATH), for slug, target in PYTHON_COMPONENTS.items():
('hgitaly', HGITALY_CLONE_PATH)):
if os.path.exists(target): if os.path.exists(target):
print("Updating %s clone at %s" % (slug, target)) print("Updating %s clone at %s" % (slug, target))
subprocess.check_call(HG_CMD + ('-R', target, 'pull')) subprocess.check_call(HG_CMD + ('-R', target, 'pull'))
...@@ -100,9 +105,12 @@ for slug, target in (('py-heptapod', PY_HEPTAPOD_CLONE_PATH), ...@@ -100,9 +105,12 @@ for slug, target in (('py-heptapod', PY_HEPTAPOD_CLONE_PATH),
print("Current revision for %s:" % target) print("Current revision for %s:" % target)
subprocess.check_call(HG_CMD + ('-R', target, 'log', '-r', '.')) subprocess.check_call(HG_CMD + ('-R', target, 'log', '-r', '.'))
pip_cmd = (PIP_BIN, 'install', '-e', target) pip_cmd = [PIP_BIN, 'install', '--upgrade']
print("Installing %s: %r" % (slug, pip_cmd)) for target in PYTHON_COMPONENTS.values():
subprocess.check_call(pip_cmd) pip_cmd.extend(('-e', target))
print("Installing Python Heptapod components: %r" % pip_cmd)
subprocess.check_call(pip_cmd)
pip_logging_cmd = (PIP_BIN, 'install', 'hg-loggingmod') pip_logging_cmd = (PIP_BIN, 'install', 'hg-loggingmod')
print("Installing hg-loggingmod: " + repr(pip_logging_cmd)) print("Installing hg-loggingmod: " + repr(pip_logging_cmd))
......
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