]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
pybind: Prefer using $TMPDIR if available
authorAnirudha Bose <ani07nov@gmail.com>
Mon, 4 Jul 2016 09:09:07 +0000 (14:39 +0530)
committerAnirudha Bose <ani07nov@gmail.com>
Mon, 4 Jul 2016 09:09:07 +0000 (14:39 +0530)
Signed-off-by: Anirudha Bose <ani07nov@gmail.com>
src/pybind/Makefile.am
src/pybind/rados/setup.py

index 1832afe4e829d37275b36176cd01cd05382bc700..0ba8402b96dc53f2aa24fdad76d331be7116fa54 100644 (file)
@@ -14,6 +14,7 @@ PY_DISTUTILS = \
        LDFLAGS="-L\${abs_builddir}/.libs $(subst -pie,,${AM_LDFLAGS}) ${PYTHON_LDFLAGS}" \
        CYTHON_BUILD_DIR=$(CYTHON_BUILD_DIR) \
        CEPH_LIBDIR="$(abs_builddir)/.libs" \
+        TMPDIR=${TMPDIR} \
        ${PYTHON} ./setup.py
 
 if WITH_RADOS
index 850c1ac1d8901ff6ab15fb5001c011b433f720aa..802d175a1c7e0f43aa445f4d0a26ec714db851b5 100755 (executable)
@@ -77,7 +77,7 @@ def check_sanity():
     Test if development headers and library for rados is available by compiling a dummy C program.
     """
 
-    tmp_dir = tempfile.mkdtemp(dir=os.path.dirname(__file__))
+    tmp_dir = tempfile.mkdtemp(dir=os.environ.get('TMPDIR', os.path.dirname(__file__)))
     tmp_file = os.path.join(tmp_dir, 'rados_dummy.c')
 
     with open(tmp_file, 'w') as fp: