]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
pybind: check "CEPH_LIBDIR" not "MAKEFLAGS"
authorKefu Chai <kchai@redhat.com>
Wed, 17 Jul 2019 10:46:43 +0000 (18:46 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 17 Jul 2019 10:56:41 +0000 (18:56 +0800)
if the used cmake generator is not "make", these environmental variables
won't be set, so let's just check for "CEPH_LIBDIR". it is set by cmake
function of `distutils_add_cython_module()` and
`distutils_install_cython_module()`

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/cephfs/setup.py
src/pybind/rados/setup.py
src/pybind/rbd/setup.py
src/pybind/rgw/setup.py

index a4374b1a48639247282674285c4ffee7db07c134..3ba67a272c7f20a8e05b0dba01031ef514f01715 100755 (executable)
@@ -89,10 +89,9 @@ def check_sanity():
     compiler = new_compiler()
     distutils.sysconfig.customize_compiler(compiler)
 
-    if {'MAKEFLAGS', 'MFLAGS', 'MAKELEVEL'}.issubset(set(os.environ.keys())):
+    if 'CEPH_LIBDIR' in os.environ:
         # The setup.py has been invoked by a top-level Ceph make.
         # Set the appropriate CFLAGS and LDFLAGS
-
         compiler.set_library_dirs([os.environ.get('CEPH_LIBDIR')])
 
     try:
index 30d8718fa87d5dc5edb9df3bd7627795910adaf7..1a7db0091f16b8feb28d261f3ee5fc987ba4755a 100755 (executable)
@@ -88,10 +88,9 @@ def check_sanity():
     compiler = new_compiler()
     distutils.sysconfig.customize_compiler(compiler)
 
-    if {'MAKEFLAGS', 'MAKELEVEL'}.issubset(set(os.environ.keys())):
+    if 'CEPH_LIBDIR' in os.environ:
         # The setup.py has been invoked by a top-level Ceph make.
         # Set the appropriate CFLAGS and LDFLAGS
-
         compiler.set_include_dirs([os.path.join(CEPH_SRC_DIR, 'include')])
         compiler.set_library_dirs([os.environ.get('CEPH_LIBDIR')])
 
index 6d88220e3c71c00e7aa1fa8bc3f0f39026cf0a79..f48432f0cd48260d1cd018644bcd929a69b16ff0 100755 (executable)
@@ -88,13 +88,11 @@ def check_sanity():
     compiler = new_compiler()
     distutils.sysconfig.customize_compiler(compiler)
 
-    if {'MAKEFLAGS', 'MFLAGS', 'MAKELEVEL'}.issubset(set(os.environ.keys())):
+    if 'CEPH_LIBDIR' in os.environ:
         # The setup.py has been invoked by a top-level Ceph make.
         # Set the appropriate CFLAGS and LDFLAGS
-
         compiler.set_include_dirs([os.path.join(CEPH_SRC_DIR, 'include')])
         compiler.set_library_dirs([os.environ.get('CEPH_LIBDIR')])
-
     try:
         compiler.define_macro('_FILE_OFFSET_BITS', '64')
 
index 771345bd0014e3e40f1fe6db7f38da36212ccfcc..ab9f3a88e90a346ff823f5bbdf81f4392c1a7cfa 100755 (executable)
@@ -91,13 +91,11 @@ def check_sanity():
     compiler = new_compiler()
     distutils.sysconfig.customize_compiler(compiler)
 
-    if {'MAKEFLAGS', 'MFLAGS', 'MAKELEVEL'}.issubset(set(os.environ.keys())):
+    if 'CEPH_LIBDIR' in os.environ:
         # The setup.py has been invoked by a top-level Ceph make.
         # Set the appropriate CFLAGS and LDFLAGS
-
         compiler.set_include_dirs([os.path.join(CEPH_SRC_DIR, 'include')])
         compiler.set_library_dirs([os.environ.get('CEPH_LIBDIR')])
-
     try:
         compiler.define_macro('_FILE_OFFSET_BITS', '64')