add_custom_target(ceph-detect-init
COMMAND
${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh ${CEPH_DETECT_INIT_VIRTUALENV} &&
- ${CEPH_DETECT_INIT_VIRTUALENV}/bin/pip install --disable-pip-version-check --no-index --use-wheel --find-links=file:${CMAKE_SOURCE_DIR}/src/ceph-detect-init/wheelhouse -e .
+ ${CEPH_DETECT_INIT_VIRTUALENV}/bin/pip install --no-index --use-wheel --find-links=file:${CMAKE_SOURCE_DIR}/src/ceph-detect-init/wheelhouse -e .
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/ceph-detect-init
COMMENT "ceph-detect-init is being created")
add_dependencies(tests ceph-detect-init)
add_custom_target(ceph-disk
COMMAND
${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh ${CEPH_DISK_VIRTUALENV} &&
- ${CEPH_DISK_VIRTUALENV}/bin/pip install --disable-pip-version-check --no-index --use-wheel --find-links=file:${CMAKE_SOURCE_DIR}/src/ceph-disk/wheelhouse -e .
+ ${CEPH_DISK_VIRTUALENV}/bin/pip install --no-index --use-wheel --find-links=file:${CMAKE_SOURCE_DIR}/src/ceph-disk/wheelhouse -e .
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/ceph-disk
COMMENT "ceph-disk is being created")
add_dependencies(tests ceph-disk)
mkdir -p $DIR
virtualenv --python python2.7 $DIR
. $DIR/bin/activate
+
+if pip --help | grep -q disable-pip-version-check; then
+ DISABLE_PIP_VERSION_CHECK=--disable-pip-version-check
+else
+ DISABLE_PIP_VERSION_CHECK=
+fi
+
# older versions of pip will not install wrap_console scripts
# when using wheel packages
-pip --disable-pip-version-check --log $DIR/log.txt install --upgrade 'pip >= 6.1'
+pip $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install --upgrade 'pip >= 6.1'
+
+if pip --help | grep -q disable-pip-version-check; then
+ DISABLE_PIP_VERSION_CHECK=--disable-pip-version-check
+else
+ DISABLE_PIP_VERSION_CHECK=
+fi
+
if test -d wheelhouse ; then
export NO_INDEX=--no-index
fi
-pip --disable-pip-version-check --log $DIR/log.txt install $NO_INDEX --use-wheel --find-links=file://$(pwd)/wheelhouse 'tox >=1.9'
+pip $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install $NO_INDEX --use-wheel --find-links=file://$(pwd)/wheelhouse 'tox >=1.9'
if test -f requirements.txt ; then
- pip --disable-pip-version-check --log $DIR/log.txt install $NO_INDEX --use-wheel --find-links=file://$(pwd)/wheelhouse -r requirements.txt
+ pip $DISABLE_PIP_VERSION_CHECK --log $DIR/log.txt install $NO_INDEX --use-wheel --find-links=file://$(pwd)/wheelhouse -r requirements.txt
fi