]> git.proxmox.com Git - ceph.git/blob - ceph/install-deps.sh
bump version to 18.2.2-pve1
[ceph.git] / ceph / install-deps.sh
1 #!/usr/bin/env bash
2 #
3 # Ceph distributed storage system
4 #
5 # Copyright (C) 2014, 2015 Red Hat <contact@redhat.com>
6 #
7 # Author: Loic Dachary <loic@dachary.org>
8 #
9 # This library is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU Lesser General Public
11 # License as published by the Free Software Foundation; either
12 # version 2.1 of the License, or (at your option) any later version.
13 #
14 set -e
15 DIR=/tmp/install-deps.$$
16 trap "rm -fr $DIR" EXIT
17 mkdir -p $DIR
18 if test $(id -u) != 0 ; then
19 SUDO=sudo
20 fi
21 # enable UTF-8 encoding for programs like pip that expect to
22 # print more than just ascii chars
23 export LC_ALL=C.UTF-8
24
25 ARCH=$(uname -m)
26
27 function in_jenkins() {
28 test -n "$JENKINS_HOME"
29 }
30
31 function munge_ceph_spec_in {
32 local with_seastar=$1
33 shift
34 local with_zbd=$1
35 shift
36 local for_make_check=$1
37 shift
38 local OUTFILE=$1
39 sed -e 's/@//g' < ceph.spec.in > $OUTFILE
40 # http://rpm.org/user_doc/conditional_builds.html
41 if $with_seastar; then
42 sed -i -e 's/%bcond_with seastar/%bcond_without seastar/g' $OUTFILE
43 fi
44 if $with_zbd; then
45 sed -i -e 's/%bcond_with zbd/%bcond_without zbd/g' $OUTFILE
46 fi
47 if $for_make_check; then
48 sed -i -e 's/%bcond_with make_check/%bcond_without make_check/g' $OUTFILE
49 fi
50 }
51
52 function munge_debian_control {
53 local version=$1
54 shift
55 local control=$1
56 case "$version" in
57 *squeeze*|*wheezy*)
58 control="/tmp/control.$$"
59 grep -v babeltrace debian/control > $control
60 ;;
61 esac
62 echo $control
63 }
64
65 function ensure_decent_gcc_on_ubuntu {
66 in_jenkins && echo "CI_DEBUG: Start ensure_decent_gcc_on_ubuntu() in install-deps.sh"
67 # point gcc to the one offered by g++-7 if the used one is not
68 # new enough
69 local old=$(gcc -dumpfullversion -dumpversion)
70 local new=$1
71 local codename=$2
72 if dpkg --compare-versions $old ge ${new}.0; then
73 return
74 fi
75
76 if [ ! -f /usr/bin/g++-${new} ]; then
77 $SUDO tee /etc/apt/sources.list.d/ubuntu-toolchain-r.list <<EOF
78 deb [lang=none] http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu $codename main
79 deb [arch=amd64 lang=none] http://mirror.nullivex.com/ppa/ubuntu-toolchain-r-test $codename main
80 EOF
81 # import PPA's signing key into APT's keyring
82 cat << ENDOFKEY | $SUDO apt-key add -
83 -----BEGIN PGP PUBLIC KEY BLOCK-----
84 Version: SKS 1.1.6
85 Comment: Hostname: keyserver.ubuntu.com
86
87 mI0ESuBvRwEEAMi4cDba7xlKaaoXjO1n1HX8RKrkW+HEIl79nSOSJyvzysajs7zUow/OzCQp
88 9NswqrDmNuH1+lPTTRNAGtK8r2ouq2rnXT1mTl23dpgHZ9spseR73s4ZBGw/ag4bpU5dNUSt
89 vfmHhIjVCuiSpNn7cyy1JSSvSs3N2mxteKjXLBf7ABEBAAG0GkxhdW5jaHBhZCBUb29sY2hh
90 aW4gYnVpbGRziLYEEwECACAFAkrgb0cCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRAe
91 k3eiup7yfzGKA/4xzUqNACSlB+k+DxFFHqkwKa/ziFiAlkLQyyhm+iqz80htRZr7Ls/ZRYZl
92 0aSU56/hLe0V+TviJ1s8qdN2lamkKdXIAFfavA04nOnTzyIBJ82EAUT3Nh45skMxo4z4iZMN
93 msyaQpNl/m/lNtOLhR64v5ZybofB2EWkMxUzX8D/FQ==
94 =LcUQ
95 -----END PGP PUBLIC KEY BLOCK-----
96 ENDOFKEY
97 $SUDO env DEBIAN_FRONTEND=noninteractive apt-get update -y || true
98 $SUDO env DEBIAN_FRONTEND=noninteractive apt-get install -y g++-${new}
99 fi
100 }
101
102 function ensure_python3_sphinx_on_ubuntu {
103 in_jenkins && echo "CI_DEBUG: Running ensure_python3_sphinx_on_ubuntu() in install-deps.sh"
104 local sphinx_command=/usr/bin/sphinx-build
105 # python-sphinx points $sphinx_command to
106 # ../share/sphinx/scripts/python2/sphinx-build when it's installed
107 # let's "correct" this
108 if test -e $sphinx_command && head -n1 $sphinx_command | grep -q python$; then
109 $SUDO env DEBIAN_FRONTEND=noninteractive apt-get -y remove python-sphinx
110 fi
111 }
112
113 function install_pkg_on_ubuntu {
114 in_jenkins && echo "CI_DEBUG: Running install_pkg_on_ubuntu() in install-deps.sh"
115 local project=$1
116 shift
117 local sha1=$1
118 shift
119 local codename=$1
120 shift
121 local force=$1
122 shift
123 local pkgs=$@
124 local missing_pkgs
125 if [ $force = "force" ]; then
126 missing_pkgs="$@"
127 else
128 for pkg in $pkgs; do
129 if ! apt -qq list $pkg 2>/dev/null | grep -q installed; then
130 missing_pkgs+=" $pkg"
131 in_jenkins && echo "CI_DEBUG: missing_pkgs=$missing_pkgs"
132 fi
133 done
134 fi
135 if test -n "$missing_pkgs"; then
136 local shaman_url="https://shaman.ceph.com/api/repos/${project}/master/${sha1}/ubuntu/${codename}/repo"
137 in_jenkins && echo -n "CI_DEBUG: Downloading $shaman_url ... "
138 $SUDO curl --silent --fail --write-out "%{http_code}" --location $shaman_url --output /etc/apt/sources.list.d/$project.list
139 $SUDO env DEBIAN_FRONTEND=noninteractive apt-get update -y -o Acquire::Languages=none -o Acquire::Translation=none || true
140 $SUDO env DEBIAN_FRONTEND=noninteractive apt-get install --allow-unauthenticated -y $missing_pkgs
141 fi
142 }
143
144 boost_ver=1.79
145
146 function clean_boost_on_ubuntu {
147 in_jenkins && echo "CI_DEBUG: Running clean_boost_on_ubuntu() in install-deps.sh"
148 # Find currently installed version. If there are multiple
149 # versions, they end up newline separated
150 local installed_ver=$(apt -qq list --installed ceph-libboost*-dev 2>/dev/null |
151 cut -d' ' -f2 |
152 cut -d'.' -f1,2 |
153 sort -u)
154 # If installed_ver contains whitespace, we can't really count on it,
155 # but otherwise, bail out if the version installed is the version
156 # we want.
157 if test -n "$installed_ver" &&
158 echo -n "$installed_ver" | tr '[:space:]' ' ' | grep -v -q ' '; then
159 if echo "$installed_ver" | grep -q "^$boost_ver"; then
160 return
161 fi
162 fi
163
164 # Historical packages
165 $SUDO rm -f /etc/apt/sources.list.d/ceph-libboost*.list
166 # Currently used
167 $SUDO rm -f /etc/apt/sources.list.d/libboost.list
168 # Refresh package list so things aren't in the available list.
169 $SUDO env DEBIAN_FRONTEND=noninteractive apt-get update -y || true
170 # Remove all ceph-libboost packages. We have an early return if
171 # the desired version is already (and the only) version installed,
172 # so no need to spare it.
173 if test -n "$installed_ver"; then
174 $SUDO env DEBIAN_FRONTEND=noninteractive apt-get -y --fix-missing remove "ceph-libboost*"
175 fi
176 }
177
178 function install_boost_on_ubuntu {
179 in_jenkins && echo "CI_DEBUG: Running install_boost_on_ubuntu() in install-deps.sh"
180 # Once we get to this point, clean_boost_on_ubuntu() should ensure
181 # that there is no more than one installed version.
182 local installed_ver=$(apt -qq list --installed ceph-libboost*-dev 2>/dev/null |
183 grep -e 'libboost[0-9].[0-9]\+-dev' |
184 cut -d' ' -f2 |
185 cut -d'.' -f1,2)
186 if test -n "$installed_ver"; then
187 if echo "$installed_ver" | grep -q "^$boost_ver"; then
188 return
189 fi
190 fi
191 local codename=$1
192 local project=libboost
193 local sha1=892ab89e76b91b505ffbf083f6fb7f2a666d4132
194 install_pkg_on_ubuntu \
195 $project \
196 $sha1 \
197 $codename \
198 check \
199 ceph-libboost-atomic${boost_ver}-dev \
200 ceph-libboost-chrono${boost_ver}-dev \
201 ceph-libboost-container${boost_ver}-dev \
202 ceph-libboost-context${boost_ver}-dev \
203 ceph-libboost-coroutine${boost_ver}-dev \
204 ceph-libboost-date-time${boost_ver}-dev \
205 ceph-libboost-filesystem${boost_ver}-dev \
206 ceph-libboost-iostreams${boost_ver}-dev \
207 ceph-libboost-program-options${boost_ver}-dev \
208 ceph-libboost-python${boost_ver}-dev \
209 ceph-libboost-random${boost_ver}-dev \
210 ceph-libboost-regex${boost_ver}-dev \
211 ceph-libboost-system${boost_ver}-dev \
212 ceph-libboost-test${boost_ver}-dev \
213 ceph-libboost-thread${boost_ver}-dev \
214 ceph-libboost-timer${boost_ver}-dev
215 }
216
217 function install_libzbd_on_ubuntu {
218 in_jenkins && echo "CI_DEBUG: Running install_libzbd_on_ubuntu() in install-deps.sh"
219 local codename=$1
220 local project=libzbd
221 local sha1=1fadde94b08fab574b17637c2bebd2b1e7f9127b
222 install_pkg_on_ubuntu \
223 $project \
224 $sha1 \
225 $codename \
226 check \
227 libzbd-dev
228 }
229
230 motr_pkgs_url='https://github.com/Seagate/cortx-motr/releases/download/2.0.0-rgw'
231
232 function install_cortx_motr_on_ubuntu {
233 if dpkg -l cortx-motr-dev &> /dev/null; then
234 return
235 fi
236 if [ "$(lsb_release -sc)" = "jammy" ]; then
237 install_pkg_on_ubuntu \
238 cortx-motr \
239 39f89fa1c6945040433a913f2687c4b4e6cbeb3f \
240 jammy \
241 check \
242 cortx-motr \
243 cortx-motr-dev
244 else
245 local deb_arch=$(dpkg --print-architecture)
246 local motr_pkg="cortx-motr_2.0.0.git3252d623_$deb_arch.deb"
247 local motr_dev_pkg="cortx-motr-dev_2.0.0.git3252d623_$deb_arch.deb"
248 $SUDO curl -sL -o/var/cache/apt/archives/$motr_pkg $motr_pkgs_url/$motr_pkg
249 $SUDO curl -sL -o/var/cache/apt/archives/$motr_dev_pkg $motr_pkgs_url/$motr_dev_pkg
250 # For some reason libfabric pkg is not available in arm64 version
251 # of Ubuntu 20.04 (Focal Fossa), so we borrow it from more recent
252 # versions for now.
253 if [[ "$deb_arch" == 'arm64' ]]; then
254 local lf_pkg='libfabric1_1.11.0-2_arm64.deb'
255 $SUDO curl -sL -o/var/cache/apt/archives/$lf_pkg http://ports.ubuntu.com/pool/universe/libf/libfabric/$lf_pkg
256 $SUDO apt-get install -y /var/cache/apt/archives/$lf_pkg
257 fi
258 $SUDO apt-get install -y /var/cache/apt/archives/{$motr_pkg,$motr_dev_pkg}
259 $SUDO apt-get install -y libisal-dev
260 fi
261 }
262
263 function version_lt {
264 test $1 != $(echo -e "$1\n$2" | sort -rV | head -n 1)
265 }
266
267 function ensure_decent_gcc_on_rh {
268 local old=$(gcc -dumpversion)
269 local dts_ver=$1
270 if version_lt $old $dts_ver; then
271 if test -t 1; then
272 # interactive shell
273 cat <<EOF
274 Your GCC is too old. Please run following command to add DTS to your environment:
275
276 scl enable gcc-toolset-$dts_ver bash
277
278 Or add the following line to the end of ~/.bashrc and run "source ~/.bashrc" to add it permanently:
279
280 source scl_source enable gcc-toolset-$dts_ver
281 EOF
282 else
283 # non-interactive shell
284 source /opt/rh/gcc-toolset-$dts_ver/enable
285 fi
286 fi
287 }
288
289 for_make_check=false
290 if tty -s; then
291 # interactive
292 for_make_check=true
293 elif [ $FOR_MAKE_CHECK ]; then
294 for_make_check=true
295 else
296 for_make_check=false
297 fi
298
299 if [ x$(uname)x = xFreeBSDx ]; then
300 $SUDO pkg install -yq \
301 devel/babeltrace \
302 devel/binutils \
303 devel/git \
304 devel/gperf \
305 devel/gmake \
306 devel/cmake \
307 devel/nasm \
308 devel/boost-all \
309 devel/boost-python-libs \
310 devel/valgrind \
311 devel/pkgconf \
312 devel/libedit \
313 devel/libtool \
314 devel/google-perftools \
315 lang/cython \
316 databases/leveldb \
317 net/openldap24-client \
318 archivers/snappy \
319 archivers/liblz4 \
320 ftp/curl \
321 misc/e2fsprogs-libuuid \
322 misc/getopt \
323 net/socat \
324 textproc/expat2 \
325 textproc/gsed \
326 lang/gawk \
327 textproc/libxml2 \
328 textproc/xmlstarlet \
329 textproc/jq \
330 textproc/py-sphinx \
331 emulators/fuse \
332 java/junit \
333 lang/python36 \
334 devel/py-pip \
335 devel/py-flake8 \
336 devel/py-tox \
337 devel/py-argparse \
338 devel/py-nose \
339 devel/py-prettytable \
340 devel/py-yaml \
341 www/py-routes \
342 www/py-flask \
343 www/node \
344 www/npm \
345 www/fcgi \
346 security/nss \
347 security/krb5 \
348 security/oath-toolkit \
349 sysutils/flock \
350 sysutils/fusefs-libs \
351
352 # Now use pip to install some extra python modules
353 pip install pecan
354
355 exit
356 else
357 [ $WITH_SEASTAR ] && with_seastar=true || with_seastar=false
358 [ $WITH_ZBD ] && with_zbd=true || with_zbd=false
359 [ $WITH_PMEM ] && with_pmem=true || with_pmem=false
360 [ $WITH_RADOSGW_MOTR ] && with_rgw_motr=true || with_rgw_motr=false
361 source /etc/os-release
362 case "$ID" in
363 debian|ubuntu|devuan|elementary|softiron)
364 echo "Using apt-get to install dependencies"
365 # Put this before any other invocation of apt so it can clean
366 # up in a broken case.
367 clean_boost_on_ubuntu
368 $SUDO apt-get install -y devscripts equivs
369 $SUDO apt-get install -y dpkg-dev
370 ensure_python3_sphinx_on_ubuntu
371 case "$VERSION" in
372 *Bionic*)
373 ensure_decent_gcc_on_ubuntu 9 bionic
374 [ ! $NO_BOOST_PKGS ] && install_boost_on_ubuntu bionic
375 $with_zbd && install_libzbd_on_ubuntu bionic
376 ;;
377 *Focal*)
378 ensure_decent_gcc_on_ubuntu 11 focal
379 [ ! $NO_BOOST_PKGS ] && install_boost_on_ubuntu focal
380 $with_zbd && install_libzbd_on_ubuntu focal
381 ;;
382 *Jammy*)
383 [ ! $NO_BOOST_PKGS ] && install_boost_on_ubuntu jammy
384 $SUDO apt-get install -y gcc
385 ;;
386 *)
387 $SUDO apt-get install -y gcc
388 ;;
389 esac
390 if ! test -r debian/control ; then
391 echo debian/control is not a readable file
392 exit 1
393 fi
394 touch $DIR/status
395
396 in_jenkins && echo "CI_DEBUG: Running munge_debian_control() in install-deps.sh"
397 backports=""
398 control=$(munge_debian_control "$VERSION" "debian/control")
399 case "$VERSION" in
400 *squeeze*|*wheezy*)
401 backports="-t $codename-backports"
402 ;;
403 esac
404
405 # make a metapackage that expresses the build dependencies,
406 # install it, rm the .deb; then uninstall the package as its
407 # work is done
408 build_profiles=""
409 if $for_make_check; then
410 build_profiles+=",pkg.ceph.check"
411 fi
412 if $with_seastar; then
413 build_profiles+=",pkg.ceph.crimson"
414 fi
415 if $with_pmem; then
416 build_profiles+=",pkg.ceph.pmdk"
417 fi
418
419 in_jenkins && cat <<EOF
420 CI_DEBUG: for_make_check=$for_make_check
421 CI_DEBUG: with_seastar=$with_seastar
422 CI_DEBUG: with_jaeger=$with_jaeger
423 CI_DEBUG: build_profiles=$build_profiles
424 CI_DEBUG: Now running 'mk-build-deps' and installing ceph-build-deps package
425 EOF
426
427 $SUDO env DEBIAN_FRONTEND=noninteractive mk-build-deps \
428 --build-profiles "${build_profiles#,}" \
429 --install --remove \
430 --tool="apt-get -y --no-install-recommends $backports" $control || exit 1
431 in_jenkins && echo "CI_DEBUG: Removing ceph-build-deps"
432 $SUDO env DEBIAN_FRONTEND=noninteractive apt-get -y remove ceph-build-deps
433 if [ "$control" != "debian/control" ] ; then rm $control; fi
434
435 # for rgw motr backend build checks
436 if $with_rgw_motr; then
437 install_cortx_motr_on_ubuntu
438 fi
439 ;;
440 rocky|centos|fedora|rhel|ol|virtuozzo)
441 builddepcmd="dnf -y builddep --allowerasing"
442 echo "Using dnf to install dependencies"
443 case "$ID" in
444 fedora)
445 $SUDO dnf install -y dnf-utils
446 ;;
447 rocky|centos|rhel|ol|virtuozzo)
448 MAJOR_VERSION="$(echo $VERSION_ID | cut -d. -f1)"
449 $SUDO dnf install -y dnf-utils selinux-policy-targeted
450 rpm --quiet --query epel-release || \
451 $SUDO dnf -y install --nogpgcheck https://dl.fedoraproject.org/pub/epel/epel-release-latest-$MAJOR_VERSION.noarch.rpm
452 $SUDO rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$MAJOR_VERSION
453 $SUDO rm -f /etc/yum.repos.d/dl.fedoraproject.org*
454 if test $ID = centos -a $MAJOR_VERSION = 8 ; then
455 # Enable 'powertools' or 'PowerTools' repo
456 $SUDO dnf config-manager --set-enabled $(dnf repolist --all 2>/dev/null|gawk 'tolower($0) ~ /^powertools\s/{print $1}')
457 dts_ver=11
458 # before EPEL8 and PowerTools provide all dependencies, we use sepia for the dependencies
459 $SUDO dnf config-manager --add-repo http://apt-mirror.front.sepia.ceph.com/lab-extras/8/
460 $SUDO dnf config-manager --setopt=apt-mirror.front.sepia.ceph.com_lab-extras_8_.gpgcheck=0 --save
461 $SUDO dnf -y module enable javapackages-tools
462 elif test $ID = rhel -a $MAJOR_VERSION = 8 ; then
463 dts_ver=11
464 $SUDO dnf config-manager --set-enabled "codeready-builder-for-rhel-8-${ARCH}-rpms"
465 $SUDO dnf config-manager --add-repo http://apt-mirror.front.sepia.ceph.com/lab-extras/8/
466 $SUDO dnf config-manager --setopt=apt-mirror.front.sepia.ceph.com_lab-extras_8_.gpgcheck=0 --save
467 $SUDO dnf -y module enable javapackages-tools
468 fi
469 ;;
470 esac
471 munge_ceph_spec_in $with_seastar $with_zbd $for_make_check $DIR/ceph.spec
472 # for python3_pkgversion macro defined by python-srpm-macros, which is required by python3-devel
473 $SUDO dnf install -y python3-devel
474 $SUDO $builddepcmd $DIR/ceph.spec 2>&1 | tee $DIR/yum-builddep.out
475 [ ${PIPESTATUS[0]} -ne 0 ] && exit 1
476 if [ -n "$dts_ver" ]; then
477 ensure_decent_gcc_on_rh $dts_ver
478 fi
479 IGNORE_YUM_BUILDEP_ERRORS="ValueError: SELinux policy is not managed or store cannot be accessed."
480 sed "/$IGNORE_YUM_BUILDEP_ERRORS/d" $DIR/yum-builddep.out | grep -i "error:" && exit 1
481 # for rgw motr backend build checks
482 if ! rpm --quiet -q cortx-motr-devel &&
483 { [[ $FOR_MAKE_CHECK ]] || $with_rgw_motr; }; then
484 $SUDO dnf install -y \
485 "$motr_pkgs_url/isa-l-2.30.0-1.el7.${ARCH}.rpm" \
486 "$motr_pkgs_url/cortx-motr-2.0.0-1_git3252d623_any.el8.${ARCH}.rpm" \
487 "$motr_pkgs_url/cortx-motr-devel-2.0.0-1_git3252d623_any.el8.${ARCH}.rpm"
488 fi
489 ;;
490 opensuse*|suse|sles)
491 echo "Using zypper to install dependencies"
492 zypp_install="zypper --gpg-auto-import-keys --non-interactive install --no-recommends"
493 $SUDO $zypp_install systemd-rpm-macros rpm-build || exit 1
494 munge_ceph_spec_in $with_seastar false $for_make_check $DIR/ceph.spec
495 $SUDO $zypp_install $(rpmspec -q --buildrequires $DIR/ceph.spec) || exit 1
496 ;;
497 *)
498 echo "$ID is unknown, dependencies will have to be installed manually."
499 exit 1
500 ;;
501 esac
502 fi
503
504 function populate_wheelhouse() {
505 in_jenkins && echo "CI_DEBUG: Running populate_wheelhouse() in install-deps.sh"
506 local install=$1
507 shift
508
509 # although pip comes with virtualenv, having a recent version
510 # of pip matters when it comes to using wheel packages
511 PIP_OPTS="--timeout 300 --exists-action i"
512 pip $PIP_OPTS $install \
513 'setuptools >= 0.8' 'pip >= 21.0' 'wheel >= 0.24' 'tox >= 2.9.1' || return 1
514 if test $# != 0 ; then
515 pip $PIP_OPTS $install $@ || return 1
516 fi
517 }
518
519 function activate_virtualenv() {
520 in_jenkins && echo "CI_DEBUG: Running activate_virtualenv() in install-deps.sh"
521 local top_srcdir=$1
522 local env_dir=$top_srcdir/install-deps-python3
523
524 if ! test -d $env_dir ; then
525 python3 -m venv ${env_dir}
526 . $env_dir/bin/activate
527 if ! populate_wheelhouse install ; then
528 rm -rf $env_dir
529 return 1
530 fi
531 fi
532 . $env_dir/bin/activate
533 }
534
535 function preload_wheels_for_tox() {
536 in_jenkins && echo "CI_DEBUG: Running preload_wheels_for_tox() in install-deps.sh"
537 local ini=$1
538 shift
539 pushd . > /dev/null
540 cd $(dirname $ini)
541 local require_files=$(ls *requirements*.txt 2>/dev/null) || true
542 local constraint_files=$(ls *constraints*.txt 2>/dev/null) || true
543 local require=$(echo -n "$require_files" | sed -e 's/^/-r /')
544 local constraint=$(echo -n "$constraint_files" | sed -e 's/^/-c /')
545 local md5=wheelhouse/md5
546 if test "$require"; then
547 if ! test -f $md5 || ! md5sum -c $md5 > /dev/null; then
548 rm -rf wheelhouse
549 fi
550 fi
551 if test "$require" && ! test -d wheelhouse ; then
552 type python3 > /dev/null 2>&1 || continue
553 activate_virtualenv $top_srcdir || exit 1
554 python3 -m pip install --upgrade pip
555 populate_wheelhouse "wheel -w $wip_wheelhouse" $require $constraint || exit 1
556 mv $wip_wheelhouse wheelhouse
557 md5sum $require_files $constraint_files > $md5
558 fi
559 popd > /dev/null
560 }
561
562 # use pip cache if possible but do not store it outside of the source
563 # tree
564 # see https://pip.pypa.io/en/stable/reference/pip_install.html#caching
565 if $for_make_check; then
566 mkdir -p install-deps-cache
567 top_srcdir=$(pwd)
568 export XDG_CACHE_HOME=$top_srcdir/install-deps-cache
569 wip_wheelhouse=wheelhouse-wip
570 #
571 # preload python modules so that tox can run without network access
572 #
573 find . -name tox.ini | while read ini ; do
574 preload_wheels_for_tox $ini
575 done
576 rm -rf $top_srcdir/install-deps-python3
577 rm -rf $XDG_CACHE_HOME
578 type git > /dev/null || (echo "Dashboard uses git to pull dependencies." ; false)
579 fi
580
581 in_jenkins && echo "CI_DEBUG: End install-deps.sh" || true