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:
Kefu Chai 2019-07-17 18:46:43 +08:00
parent 92eaa76f3d
commit 8ce9e35e11
4 changed files with 4 additions and 10 deletions

View File

@ -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:

View File

@ -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')])

View File

@ -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')

View File

@ -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')