Browse Source

Merge "Install pip packages during requirements build"

Zuul 5 months ago
parent
commit
1986e62249
1 changed files with 11 additions and 0 deletions
  1. 11
    0
      scripts/requirements.sh

+ 11
- 0
scripts/requirements.sh View File

@@ -29,6 +29,17 @@ export CASS_DRIVER_BUILD_CONCURRENCY=8
29 29
 # NOTE(hrw): Drop python packages requested by monasca_analytics. Their
30 30
 # build time is huge and on !x86 we do not get binaries from Pypi.
31 31
 egrep -v "(scipy|scikit-learn)" /upper-constraints.txt | split -l1
32
+
33
+# NOTE(aostapenko): When a package uses the variable 'setup_requires' in 'setup.py', 'pip wheel'
34
+# dependency management will be overridden, resulting in possible incompatibilities
35
+# between packages. Installing packages using upper-constraints.txt before building the wheels
36
+# ensures the correct package versions will be available and installed locally.
37
+# https://pip.readthedocs.io/en/stable/user_guide/#installation-bundles
38
+# This allows to work around such issues as https://github.com/lxc/pylxd/issues/308
39
+if [ ! -z "${PIP_PACKAGES}" ]; then
40
+  pip install -c /upper-constraints.txt ${PIP_PACKAGES}
41
+fi
42
+
32 43
 echo uwsgi enum-compat ${PIP_PACKAGES} | xargs -n1 | split -l1 -a3
33 44
 ls -1 | xargs -n1 -P20 -t bash -c 'pip wheel --no-deps --wheel-dir / -c /upper-constraints.txt -r $1 || echo %1 >> /failure' _ | tee /tmp/wheels.txt
34 45
 

Loading…
Cancel
Save