CEPH_BUILD_DIR=${CMAKE_BINARY_DIR}
LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib
PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}:${CMAKE_SOURCE_DIR}/src:$ENV{PATH}
- PYTHONPATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cython_modules/lib.linux-x86_64-2.7:${CMAKE_SOURCE_DIR}/src/pybind
+ PYTHONPATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cython_modules:${CMAKE_SOURCE_DIR}/src/pybind
CEPH_BUILD_VIRTUALENV=${CEPH_BUILD_VIRTUALENV})
# none of the tests should take more than 1 hour to complete
set_property(TEST
CYTHON_BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR}
CEPH_LIBDIR=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
CFLAGS=\"-iquote${CMAKE_SOURCE_DIR}/src/include\"
- ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/setup.py build --build-base ${CYTHON_MODULE_DIR} --verbose
+ ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/setup.py
+ build --build-base ${CYTHON_MODULE_DIR} --build-platlib ${CYTHON_MODULE_DIR} --verbose
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${src})
endfunction(distutils_add_cython_module)
CPPFLAGS=\"-iquote${CMAKE_SOURCE_DIR}/src/include\"
LDFLAGS=\"-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\"
${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/setup.py
- build --build-base ${CYTHON_MODULE_DIR} --verbose
+ build --build-base ${CYTHON_MODULE_DIR} --build-platlib ${CYTHON_MODULE_LIB} --verbose
build_ext --cython-c-in-temp --build-temp ${CMAKE_CURRENT_BINARY_DIR} --cython-include-dirs ${PROJECT_SOURCE_DIR}/src/pybind/rados
install \${options} --single-version-externally-managed --record /dev/null
egg_info --egg-base ${CMAKE_CURRENT_BINARY_DIR}
sys.path.insert(0, os.path.join(MYDIR, pybind_path))
sys.path.insert(0, os.path.join(MYDIR, pythonlib_path))
-def get_pythonlib_dir():
- """Returns the name of a distutils build directory"""
- import sysconfig
- f = "lib.{platform}-{version[0]}.{version[1]}"
- name = f.format(platform=sysconfig.get_platform(),
- version=sys.version_info)
- return name
-
if MYDIR.endswith('src') and \
os.path.exists(os.path.join(MYDIR, '.libs')) and \
os.path.exists(os.path.join(MYDIR, 'pybind')) and \
os.path.exists(os.path.join(MYDIR, 'build')):
- python_libpath = os.path.join(MYDIR, 'build', get_pythonlib_dir())
+ python_libpath = os.path.join(MYDIR, 'build')
respawn_in_path(os.path.join(MYDIR, '.libs'), 'pybind', python_libpath)
if 'PATH' in os.environ and MYDIR not in os.environ['PATH']:
os.environ['PATH'] += ':' + MYDIR
lib_path = os.path.join(os.getcwd(), "lib")
bin_path = os.path.join(os.getcwd(), "bin")
pybind_path = os.path.join(src_path, "src", "pybind")
-
- import sysconfig
- f = "lib.{platform}-{version[0]}.{version[1]}"
- name = f.format(platform=sysconfig.get_platform(),
- version=sys.version_info)
- pythonlib_path = os.path.join(os.getcwd(), "lib/cython_modules", name)
+ pythonlib_path = os.path.join(lib_path, "cython_modules")
respawn_in_path(lib_path, pybind_path, pythonlib_path)