mirror of
https://github.com/ceph/ceph
synced 2025-02-22 18:47:18 +00:00
pybind: check "CEPH_LIBDIR" not "MAKEFLAGS"
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>
This commit is contained in:
parent
92eaa76f3d
commit
8ce9e35e11
@ -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:
|
||||
|
@ -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')])
|
||||
|
||||
|
@ -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')
|
||||
|
||||
|
@ -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')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user