Skip to content
Snippets Groups Projects
Commit 83bacfdf authored by Sergey Yakubov's avatar Sergey Yakubov
Browse files

fix paths

parent cbeff3a0
No related branches found
No related tags found
No related merge requests found
...@@ -7,15 +7,15 @@ message (" Python includes:" ${Python3_INCLUDE_DIRS}) ...@@ -7,15 +7,15 @@ message (" Python includes:" ${Python3_INCLUDE_DIRS})
message (" Numpy:" ${PYTHON_NUMPY_INCLUDE_DIR}) message (" Numpy:" ${PYTHON_NUMPY_INCLUDE_DIR})
add_custom_command(OUTPUT asapo_worker.cpp add_custom_command(OUTPUT asapo_producer.cpp
COMMAND ${Python3_EXECUTABLE} cythonize.py COMMAND ${Python3_EXECUTABLE} cythonize.py
DEPENDS asapo-producer) DEPENDS asapo-producer)
set(TARGET_NAME asapo_worker) set(TARGET_NAME asapo_producer)
set(SOURCE_FILES set(SOURCE_FILES
asapo_worker.cpp) asapo_producer.cpp)
add_library(${TARGET_NAME} SHARED ${SOURCE_FILES}) add_library(${TARGET_NAME} SHARED ${SOURCE_FILES})
set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX ".pyd") set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX ".pyd")
......
configure_file(setup.py.in setup.py @ONLY) configure_file(setup.py.in setup.py @ONLY)
ADD_CUSTOM_TARGET(windows-bdist ALL ADD_CUSTOM_TARGET(windows-bdist-producer ALL
COMMAND ${Python3_EXECUTABLE} setup.py bdist_wheel COMMAND ${Python3_EXECUTABLE} setup.py bdist_wheel
) )
ADD_CUSTOM_TARGET(copy_python_bdist ALL ADD_CUSTOM_TARGET(copy_python_bdist-producer ALL
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/asapo_worker COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/asapo_producer
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:asapo_worker> ${CMAKE_CURRENT_BINARY_DIR}/asapo_worker/ COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:asapo_producer> ${CMAKE_CURRENT_BINARY_DIR}/asapo_producer/
) )
ADD_DEPENDENCIES(copy_python_bdist asapo_worker) ADD_DEPENDENCIES(copy_python_bdist-producer asapo_producer)
ADD_DEPENDENCIES(windows-bdist copy_python_bdist) ADD_DEPENDENCIES(windows-bdist-producer copy_python_bdist-producer)
import setuptools import setuptools
setuptools.setup( setuptools.setup(
name ="asapo_worker", name ="asapo_producer",
version = "@ASAPO_VERSION_PYTHON@", version = "@ASAPO_VERSION_PYTHON@",
install_requires=['numpy'], install_requires=['numpy'],
include_package_data=True, include_package_data=True,
packages=['asapo_worker'], packages=['asapo_producer'],
package_data={ package_data={
'asapo_worker': ['asapo_worker.pyd'], 'asapo_producer': ['asapo_producer.pyd'],
}, },
) )
...@@ -2,25 +2,23 @@ configure_file(setup.py.in setup.py @ONLY) ...@@ -2,25 +2,23 @@ configure_file(setup.py.in setup.py @ONLY)
configure_file(MANIFEST.in MANIFEST.in @ONLY) configure_file(MANIFEST.in MANIFEST.in @ONLY)
ADD_CUSTOM_TARGET(python-dist ALL ADD_CUSTOM_TARGET(python-dist-producer ALL
COMMAND python setup.py sdist COMMAND python setup.py sdist
) )
#get_property(ASAPO_WORKER_LIB TARGET asapo-worker PROPERTY LOCATION) ADD_CUSTOM_TARGET(copy_python_dist-producer ALL
ADD_CUSTOM_TARGET(copy_python_dist ALL
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/../asapo_wrappers.h ${CMAKE_CURRENT_BINARY_DIR}/. COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/../asapo_wrappers.h ${CMAKE_CURRENT_BINARY_DIR}/.
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/../asapo_worker.cpp ${CMAKE_CURRENT_BINARY_DIR}/. COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/../asapo_producer.cpp ${CMAKE_CURRENT_BINARY_DIR}/.
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/worker/api/cpp/include ${CMAKE_CURRENT_BINARY_DIR}/include COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/producer/api/cpp/include ${CMAKE_CURRENT_BINARY_DIR}/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${ASAPO_CXX_COMMON_INCLUDE_DIR}/common ${CMAKE_CURRENT_BINARY_DIR}/include/common COMMAND ${CMAKE_COMMAND} -E copy_directory ${ASAPO_CXX_COMMON_INCLUDE_DIR}/common ${CMAKE_CURRENT_BINARY_DIR}/include/common
COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_BINARY_DIR}/include/common/version.h.in COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_BINARY_DIR}/include/common/version.h.in
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/lib COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/lib
COMMAND ${CMAKE_COMMAND} -E copy ${CURL_LIBRARIES} ${CMAKE_CURRENT_BINARY_DIR}/lib COMMAND ${CMAKE_COMMAND} -E copy ${CURL_LIBRARIES} ${CMAKE_CURRENT_BINARY_DIR}/lib
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:asapo-worker> ${CMAKE_CURRENT_BINARY_DIR}/lib COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:asapo-producer> ${CMAKE_CURRENT_BINARY_DIR}/lib
) )
ADD_DEPENDENCIES(copy_python_dist python-lib3) ADD_DEPENDENCIES(copy_python_dist-producer python-lib3-producer)
ADD_DEPENDENCIES(python-dist copy_python_dist) ADD_DEPENDENCIES(python-dist-producer copy_python_dist-producer)
...@@ -3,8 +3,8 @@ from distutils.core import Extension ...@@ -3,8 +3,8 @@ from distutils.core import Extension
import numpy import numpy
ext_modules = [ ext_modules = [
Extension("asapo_worker", ["asapo_worker.cpp"], Extension("asapo_producer", ["asapo_producer.cpp"],
extra_objects=['lib/libasapo-worker.a'], extra_objects=['lib/libasapo-producer.a'],
libraries = ['curl'], libraries = ['curl'],
include_dirs=["include/common","include",numpy.get_include()], include_dirs=["include/common","include",numpy.get_include()],
extra_compile_args=@EXTRA_COMPILE_ARGS@, extra_compile_args=@EXTRA_COMPILE_ARGS@,
...@@ -13,10 +13,9 @@ ext_modules = [ ...@@ -13,10 +13,9 @@ ext_modules = [
] ]
setup( setup(
name ="asapo_worker", name ="asapo_producer",
ext_modules = ext_modules, ext_modules = ext_modules,
version = "@ASAPO_VERSION_PYTHON@", version = "@ASAPO_VERSION_PYTHON@",
setup_requires=["numpy"], setup_requires=["numpy"],
install_requires=["numpy"], install_requires=["numpy"]
platforms=["aaa"]
) )
...@@ -34,8 +34,8 @@ cdef class PyDataBroker: ...@@ -34,8 +34,8 @@ cdef class PyDataBroker:
def _op(self, op, group_id, meta_only, uint64_t id): def _op(self, op, group_id, meta_only, uint64_t id):
cdef FileInfo info cdef FileInfo info
cdef string b_group_id = _bytes(group_id) cdef string b_group_id = _bytes(group_id)
cdef FileData* p_data = <FileData*>NULL if meta_only else &data
cdef FileData data cdef FileData data
cdef FileData* p_data = <FileData*>NULL if meta_only else &data
cdef Error err cdef Error err
cdef np.npy_intp dims[1] cdef np.npy_intp dims[1]
if op == "next": if op == "next":
......
configure_file(setup.py.in setup.py @ONLY) configure_file(setup.py.in setup.py @ONLY)
ADD_CUSTOM_TARGET(windows-bdist-producer ALL ADD_CUSTOM_TARGET(windows-bdist ALL
COMMAND ${Python3_EXECUTABLE} setup.py bdist_wheel COMMAND ${Python3_EXECUTABLE} setup.py bdist_wheel
) )
ADD_CUSTOM_TARGET(copy_python_bdist_producer ALL ADD_CUSTOM_TARGET(copy_python_bdist ALL
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/asapo_producer COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/asapo_worker
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:asapo_producer> ${CMAKE_CURRENT_BINARY_DIR}/asapo_producer/ COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:asapo_worker> ${CMAKE_CURRENT_BINARY_DIR}/asapo_worker/
) )
ADD_DEPENDENCIES(copy_python_bdist_producer asapo_producer) ADD_DEPENDENCIES(copy_python_bdist asapo_worker)
ADD_DEPENDENCIES(windows-bdist-producer copy_python_bdist_producer) ADD_DEPENDENCIES(windows-bdist copy_python_bdist)
...@@ -2,13 +2,13 @@ configure_file(setup.py.in setup.py @ONLY) ...@@ -2,13 +2,13 @@ configure_file(setup.py.in setup.py @ONLY)
configure_file(MANIFEST.in MANIFEST.in @ONLY) configure_file(MANIFEST.in MANIFEST.in @ONLY)
ADD_CUSTOM_TARGET(python-dist-producer ALL ADD_CUSTOM_TARGET(python-dist ALL
COMMAND python setup.py sdist COMMAND python setup.py sdist
) )
#get_property(ASAPO_WORKER_LIB TARGET asapo-worker PROPERTY LOCATION) #get_property(ASAPO_WORKER_LIB TARGET asapo-worker PROPERTY LOCATION)
ADD_CUSTOM_TARGET(copy_python_dist_producer ALL ADD_CUSTOM_TARGET(copy_python_dist ALL
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/../asapo_wrappers.h ${CMAKE_CURRENT_BINARY_DIR}/. COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/../asapo_wrappers.h ${CMAKE_CURRENT_BINARY_DIR}/.
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/../asapo_worker.cpp ${CMAKE_CURRENT_BINARY_DIR}/. COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/../asapo_worker.cpp ${CMAKE_CURRENT_BINARY_DIR}/.
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/worker/api/cpp/include ${CMAKE_CURRENT_BINARY_DIR}/include COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/worker/api/cpp/include ${CMAKE_CURRENT_BINARY_DIR}/include
...@@ -21,6 +21,6 @@ ADD_CUSTOM_TARGET(copy_python_dist_producer ALL ...@@ -21,6 +21,6 @@ ADD_CUSTOM_TARGET(copy_python_dist_producer ALL
) )
ADD_DEPENDENCIES(copy_python_dist_producer python-lib3-producer) ADD_DEPENDENCIES(copy_python_dist python-lib3)
ADD_DEPENDENCIES(python-dist-producer copy_python_dist_producer) ADD_DEPENDENCIES(python-dist copy_python_dist)
...@@ -17,6 +17,5 @@ setup( ...@@ -17,6 +17,5 @@ setup(
ext_modules = ext_modules, ext_modules = ext_modules,
version = "@ASAPO_VERSION_PYTHON@", version = "@ASAPO_VERSION_PYTHON@",
setup_requires=["numpy"], setup_requires=["numpy"],
install_requires=["numpy"], install_requires=["numpy"]
platforms=["aaa"]
) )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment