mirror of
https://github.com/ceph/ceph
synced 2024-12-18 01:16:55 +00:00
Merge pull request #10222 from ceph/wip-cmake
cmake changes for pypi verfied f23
This commit is contained in:
commit
42785a7927
@ -276,7 +276,7 @@ find_package(libuuid REQUIRED)
|
||||
find_package(CURL REQUIRED)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${CURL_INCLUDE_DIRS})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${CURL_LIBRARIES})
|
||||
CHECK_SYMBOL_EXISTS(curl_multi_wait "curl.h" HAVE_CURL_MULTI_WAIT)
|
||||
CHECK_SYMBOL_EXISTS(curl_multi_wait curl/curl.h HAVE_CURL_MULTI_WAIT)
|
||||
|
||||
# nss or cryptopp?
|
||||
option(WITH_NSS "Use NSS crypto and SSL implementations" ON)
|
||||
|
@ -67,9 +67,11 @@ function(distutils_install_cython_module name)
|
||||
CYTHON_BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR}
|
||||
CEPH_LIBDIR=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
|
||||
CC=${CMAKE_C_COMPILER}
|
||||
CFLAGS=\"-iquote ${CMAKE_SOURCE_DIR}/src/include\"
|
||||
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_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}
|
||||
--verbose
|
||||
|
@ -6,6 +6,8 @@ from setuptools.command.egg_info import egg_info
|
||||
from distutils.core import setup
|
||||
from distutils.extension import Extension
|
||||
from Cython.Build import cythonize
|
||||
from Cython.Distutils import build_ext
|
||||
|
||||
|
||||
def get_version():
|
||||
try:
|
||||
@ -48,6 +50,7 @@ setup(
|
||||
os.path.join(os.path.dirname(__file__), "..", "rados")]
|
||||
),
|
||||
cmdclass={
|
||||
"build_ext": build_ext,
|
||||
"egg_info": EggInfoCommand,
|
||||
},
|
||||
)
|
||||
|
@ -1,3 +1,2 @@
|
||||
include rados.pyx
|
||||
include rados.pxd
|
||||
include rados.c
|
||||
|
@ -130,8 +130,11 @@ def check_sanity():
|
||||
if not check_sanity():
|
||||
sys.exit(1)
|
||||
|
||||
cmdclass = {}
|
||||
try:
|
||||
from Cython.Build import cythonize
|
||||
from Cython.Distutils import build_ext
|
||||
cmdclass = {'build_ext': build_ext}
|
||||
except ImportError:
|
||||
print("WARNING: Cython is not installed.")
|
||||
|
||||
@ -141,8 +144,6 @@ except ImportError:
|
||||
else:
|
||||
def cythonize(x, **kwargs):
|
||||
return x
|
||||
|
||||
|
||||
source = "rados.c"
|
||||
else:
|
||||
source = "rados.pyx"
|
||||
@ -169,6 +170,7 @@ setup(
|
||||
),
|
||||
url='https://github.com/ceph/ceph/tree/master/src/pybind/rados',
|
||||
license='LGPLv2+',
|
||||
platforms='Linux',
|
||||
ext_modules=cythonize(
|
||||
[
|
||||
Extension(
|
||||
@ -191,4 +193,5 @@ setup(
|
||||
'Programming Language :: Python :: 3.4',
|
||||
'Programming Language :: Python :: 3.5'
|
||||
],
|
||||
cmdclass=cmdclass,
|
||||
)
|
||||
|
@ -6,6 +6,7 @@ from setuptools.command.egg_info import egg_info
|
||||
from distutils.core import setup
|
||||
from distutils.extension import Extension
|
||||
from Cython.Build import cythonize
|
||||
from Cython.Distutils import build_ext
|
||||
|
||||
def get_version():
|
||||
try:
|
||||
@ -49,5 +50,6 @@ setup(
|
||||
),
|
||||
cmdclass={
|
||||
"egg_info": EggInfoCommand,
|
||||
"build_ext": build_ext,
|
||||
},
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user