diff --git a/worker/api/python/CMakeLists.txt b/worker/api/python/CMakeLists.txt index 7cd95550134f7ecb7eff5a2934995c4477d376c7..50df63185aeb2b9b59854a4697b28a9915dd7c09 100644 --- a/worker/api/python/CMakeLists.txt +++ b/worker/api/python/CMakeLists.txt @@ -1,5 +1,6 @@ get_property(ASAPO_WORKER_LIB TARGET asapo-worker PROPERTY LOCATION) + set (ASAPO_WORKER_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../cpp/include) if ((CMAKE_BUILD_TYPE STREQUAL "Debug") AND (CMAKE_C_COMPILER_ID STREQUAL "GNU")) diff --git a/worker/api/python/dist/setup.py.in b/worker/api/python/dist/setup.py.in index af7bef4763be9452d85b851fb56a7845f609d8b7..2400bdddd465e0ca24826a36dbf3a4cf84f90df2 100644 --- a/worker/api/python/dist/setup.py.in +++ b/worker/api/python/dist/setup.py.in @@ -1,11 +1,12 @@ from distutils.core import setup from distutils.core import Extension +import numpy ext_modules = [ Extension("asapo_worker", ["asapo_worker.cpp"], extra_objects=['lib/libasapo-worker.a', 'lib/libcurl.a'], - include_dirs=["include/common","include"], + include_dirs=["include/common","include",numpy.get_include()], extra_compile_args=@EXTRA_COMPILE_ARGS@, extra_link_args=@EXTRA_LINK_ARGS@, language="c++") diff --git a/worker/api/python/setup.py.in b/worker/api/python/setup.py.in index f76c70d93f81267883b4fd6f53664c0c62ef78b3..6d61825cfe2fd12b06616132409605cd204ffcfd 100644 --- a/worker/api/python/setup.py.in +++ b/worker/api/python/setup.py.in @@ -3,13 +3,15 @@ from distutils.core import Extension from Cython.Build import cythonize +import numpy + module = Extension("asapo_worker", ["asapo_worker.pyx"], extra_objects=['@ASAPO_WORKER_LIB@', '@CURL_LIBRARIES@'], - include_dirs=["@ASAPO_CXX_COMMON_INCLUDE_DIR@","@ASAPO_WORKER_INCLUDE_DIR@"], + include_dirs=["@ASAPO_CXX_COMMON_INCLUDE_DIR@","@ASAPO_WORKER_INCLUDE_DIR@",numpy.get_include()], extra_compile_args=@EXTRA_COMPILE_ARGS@, extra_link_args=@EXTRA_LINK_ARGS@, - language="c++" + language="c++", ) ext_modules = cythonize([module])