]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: install teuthology using pip
authorKefu Chai <kchai@redhat.com>
Fri, 22 Nov 2019 17:14:15 +0000 (01:14 +0800)
committerNathan Cutler <ncutler@suse.com>
Thu, 21 May 2020 13:12:42 +0000 (15:12 +0200)
* install teuthology using pip
* do not install the dependencies manually, it's error-prone
  to maintain two copies of requirements.txt

Fixes: https://tracker.ceph.com/issues/42969
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 68527ab83a77d20b779759581ce0b8844991231b)

Conflicts:
src/pybind/mgr/dashboard/run-backend-api-tests.sh
7567948ba05a78a5a61010994e43e8a78641970c is not being backported to
  nautilus

src/pybind/mgr/dashboard/run-backend-api-tests.sh

index 5ce957f0b9f062a075dc40a36b195c1a01fdb3cc..b2e9451e2893eff0e136edff9fa554c5ac8cba6c 100755 (executable)
@@ -43,49 +43,15 @@ get_build_py_version() {
 
 setup_teuthology() {
     TEMP_DIR=`mktemp -d`
-    TEUTHOLOGY_PY_REQS="
-apache-libcloud==2.2.1
-asn1crypto==0.22.0
-backports.ssl-match-hostname==3.5.0.1
-bcrypt==3.1.4
-certifi==2018.1.18
-cffi==1.10.0
-chardet==3.0.4
-configobj==5.0.6
-cryptography==2.1.4
-enum34==1.1.6
-gevent==1.2.2
-greenlet==0.4.13
-idna==2.5
-ipaddress==1.0.18
-Jinja2==2.9.6
-manhole==1.5.0
-MarkupSafe==1.0
-netaddr==0.7.19
-packaging==16.8
-paramiko==2.4.0
-pexpect==4.4.0
-psutil==5.4.3
-ptyprocess==0.5.2
-pyasn1==0.2.3
-pycparser==2.17
-PyNaCl==1.2.1
-pyparsing==2.2.0
-python-dateutil==2.6.1
-PyYAML==3.12
-requests==2.18.4
-six==1.14.0
-urllib3==1.22
-"
-
     cd $TEMP_DIR
+
     virtualenv --python=${TEUTHOLOGY_PYTHON_BIN:-/usr/bin/python} venv
     source venv/bin/activate
     pip install 'setuptools >= 12'
-    eval pip install $TEUTHOLOGY_PY_REQS
-    pip install -r $CURR_DIR/requirements.txt
-
-    git clone --depth 1 https://github.com/ceph/teuthology.git
+    pip install git+https://github.com/ceph/teuthology#egg=teuthology[test]
+    pushd $CURR_DIR
+    pip install -r requirements.txt -c constraints.txt
+    popd
 
     deactivate
 }
@@ -148,7 +114,7 @@ run_teuthology_tests() {
         export PYBIND=$BUILD_DIR/src/pybind
         pybind_dir=$PYBIND
     fi
-    export PYTHONPATH=$TEMP_DIR/teuthology:$source_dir/qa:$BUILD_DIR/lib/cython_modules/lib.${CEPH_PY_VERSION_MAJOR}/:$pybind_dir:$python_common_dir:${COVERAGE_PATH}
+    export PYTHONPATH=$source_dir/qa:$BUILD_DIR/lib/cython_modules/lib.${CEPH_PY_VERSION_MAJOR}/:$pybind_dir:$python_common_dir:${COVERAGE_PATH}
     export RGW=${RGW:-1}
 
     export COVERAGE_ENABLED=true