]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
python: avoid long paths
authorLoic Dachary <ldachary@redhat.com>
Mon, 21 Mar 2016 21:54:41 +0000 (22:54 +0100)
committerLoic Dachary <ldachary@redhat.com>
Tue, 22 Mar 2016 19:37:23 +0000 (20:37 +0100)
As a temporary measure because it overflows when jenkins tries to build
in a deep path. Run make with:

make CEPH_BUILD_VIRTUALENV=/tmp

and it will use these directories instead of the default.

Signed-off-by: Loic Dachary <loic@dachary.org>
src/Makefile-env.am
src/ceph-detect-init/Makefile.am
src/ceph-detect-init/run-tox.sh
src/ceph-disk/Makefile.am
src/ceph-disk/run-tox.sh
src/tools/setup-virtualenv.sh

index cf5a69298b366212f282c9aa7dfbbcc185759bbc..cb77d9da4a4a15ac1df8d20c062f25e98b6d2547 100644 (file)
@@ -299,3 +299,5 @@ DENCODER_DEPS =
 
 
 radoslibdir = $(libdir)/rados-classes
+
+CEPH_BUILD_VIRTUALENV = .
index 0c8372f3c75d087d4c8a50d18f5b8d2eff54688d..8ddcb1eaeae0a13c9e753d9a4c67db17bf1519d1 100644 (file)
@@ -53,13 +53,15 @@ EXTRA_DIST += \
        ceph-detect-init/tests/test_all.py \
        ceph-detect-init/tox.ini
 
-ceph-detect-init-all: ceph-detect-init/virtualenv
+export CEPH_DETECT_INIT_VIRTUALENV = ${CEPH_BUILD_VIRTUALENV}/ceph-detect-init-virtualenv
 
-ceph-detect-init/virtualenv:
-       cd $(srcdir)/ceph-detect-init ; ../tools/setup-virtualenv.sh ; test -d wheelhouse && export NO_INDEX=--no-index ; virtualenv/bin/pip install $$NO_INDEX --use-wheel --find-links=file://$$(pwd)/wheelhouse -e .
+ceph-detect-init-all: ${CEPH_DETECT_INIT_VIRTUALENV}
+
+${CEPH_DETECT_INIT_VIRTUALENV}:
+       cd $(srcdir)/ceph-detect-init ; ../tools/setup-virtualenv.sh ${CEPH_DETECT_INIT_VIRTUALENV} ; test -d wheelhouse && export NO_INDEX=--no-index ; ${CEPH_DETECT_INIT_VIRTUALENV}/bin/pip install $$NO_INDEX --use-wheel --find-links=file://$$(pwd)/wheelhouse -e .
 
 ceph-detect-init-clean:
-       cd $(srcdir)/ceph-detect-init ; python setup.py clean ; rm -fr wheelhouse .tox build virtualenv .coverage *.egg-info
+       cd $(srcdir)/ceph-detect-init ; python setup.py clean ; rm -fr wheelhouse .tox build ${CEPH_DETECT_INIT_VIRTUALENV} .coverage *.egg-info
 
 ceph-detect-init-install-data:
        cd $(srcdir)/ceph-detect-init ; \
index 6a8e0735d55508ae8931ed723453a82994bb2014..133326404573b9ba3f2242ba2c33d5be1af73338 100755 (executable)
 #
 
 # run from the ceph-detect-init directory or from its parent
+: ${CEPH_DETECT_INIT_VIRTUALENV:=ceph-detect-init-virtualenv}
 test -d ceph-detect-init && cd ceph-detect-init
-source virtualenv/bin/activate
-tox > virtualenv/tox.out 2>&1
+source ${CEPH_DETECT_INIT_VIRTUALENV}/bin/activate
+tox > ${CEPH_DETECT_INIT_VIRTUALENV}/tox.out 2>&1
 status=$?
-grep -v InterpreterNotFound < virtualenv/tox.out
+grep -v InterpreterNotFound < ${CEPH_DETECT_INIT_VIRTUALENV}/tox.out
 exit $status
index ec3ea5de2a4ac88018e61d87e248cf5174f86412..900630382a1371d570de8add94a69bf689f80652 100644 (file)
@@ -29,13 +29,15 @@ EXTRA_DIST += \
        ceph-disk/tests/test_main.py \
        ceph-disk/tox.ini
 
-ceph-disk-all: ceph-disk/virtualenv
+export CEPH_DISK_VIRTUALENV = ${CEPH_BUILD_VIRTUALENV}/ceph-disk-virtualenv
 
-ceph-disk/virtualenv:
-       cd $(srcdir)/ceph-disk ; ../tools/setup-virtualenv.sh ; test -d wheelhouse && export NO_INDEX=--no-index ; virtualenv/bin/pip install $$NO_INDEX --use-wheel --find-links=file://$$(pwd)/wheelhouse -e .
+ceph-disk-all: ${CEPH_DISK_VIRTUALENV}
+
+${CEPH_DISK_VIRTUALENV}:
+       cd $(srcdir)/ceph-disk ; ../tools/setup-virtualenv.sh ${CEPH_DISK_VIRTUALENV} ; test -d wheelhouse && export NO_INDEX=--no-index ; ${CEPH_DISK_VIRTUALENV}/bin/pip install $$NO_INDEX --use-wheel --find-links=file://$$(pwd)/wheelhouse -e .
 
 ceph-disk-clean:
-       cd $(srcdir)/ceph-disk ; python setup.py clean ; rm -fr wheelhouse .tox build virtualenv .coverage *.egg-info
+       cd $(srcdir)/ceph-disk ; python setup.py clean ; rm -fr wheelhouse .tox build ${CEPH_DISK_VIRTUALENV} .coverage *.egg-info
 
 ceph-disk-install-data:
        cd $(srcdir)/ceph-disk ; \
index 1d2b30fc06468e64e4653f4bedd909fa6fd5c44f..1979af83dbcc23a9b5029578cffbec190fb8fef4 100755 (executable)
 #
 
 # run from the ceph-disk directory or from its parent
+: ${CEPH_DISK_VIRTUALENV:=ceph-disk-virtualenv}
 test -d ceph-disk && cd ceph-disk
-source virtualenv/bin/activate
-tox > virtualenv/tox.out 2>&1
+source ${CEPH_DISK_VIRTUALENV}/bin/activate
+tox > ${CEPH_DISK_VIRTUALENV}/tox.out 2>&1
 status=$?
-grep -v InterpreterNotFound < virtualenv/tox.out
+grep -v InterpreterNotFound < ${CEPH_DISK_VIRTUALENV}/tox.out
 exit $status
index f1c3f9ac852edca1f5c0606e777c51ec9e51bbab..62789d41d98350359fbb1de9a1388b8947369918 100755 (executable)
 # GNU Library Public License for more details.
 #
 
-rm -fr virtualenv
-virtualenv virtualenv
-. virtualenv/bin/activate
+DIR=$1
+rm -fr $DIR
+mkdir -p $DIR
+virtualenv $DIR
+. $DIR/bin/activate
 # older versions of pip will not install wrap_console scripts
 # when using wheel packages
-pip --log virtualenv/log.txt install --upgrade 'pip >= 6.1'
+pip --log $DIR/log.txt install --upgrade 'pip >= 6.1'
 if test -d wheelhouse ; then
     export NO_INDEX=--no-index
 fi
-pip --log virtualenv/log.txt install $NO_INDEX --use-wheel --find-links=file://$(pwd)/wheelhouse --upgrade distribute
-pip --log virtualenv/log.txt install $NO_INDEX --use-wheel --find-links=file://$(pwd)/wheelhouse 'tox >=1.9' 
+pip --log $DIR/log.txt install $NO_INDEX --use-wheel --find-links=file://$(pwd)/wheelhouse --upgrade distribute
+pip --log $DIR/log.txt install $NO_INDEX --use-wheel --find-links=file://$(pwd)/wheelhouse 'tox >=1.9'
 if test -f requirements.txt ; then
-    pip --log virtualenv/log.txt install $NO_INDEX --use-wheel --find-links=file://$(pwd)/wheelhouse -r requirements.txt
+    pip --log $DIR/log.txt install $NO_INDEX --use-wheel --find-links=file://$(pwd)/wheelhouse -r requirements.txt
 fi