Updated install system
This commit is contained in:
parent
505add6ae1
commit
acd28780f2
@ -99,31 +99,29 @@ else()
|
||||
set(win32 false)
|
||||
endif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
|
||||
find_package(PythonLibs REQUIRED )
|
||||
find_package(PythonInterp REQUIRED)
|
||||
|
||||
add_subdirectory(fftpack)
|
||||
include_directories(
|
||||
fftpack
|
||||
lasp/c
|
||||
)
|
||||
|
||||
add_subdirectory(lasp)
|
||||
add_subdirectory(test)
|
||||
|
||||
if (PYTHON)
|
||||
# set(SETUP_PY_IN "${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in")
|
||||
set(SETUP_PY "${CMAKE_CURRENT_BINARY_DIR}/setup.py")
|
||||
set(DEPS "${CMAKE_CURRENT_SOURCE_DIR}/lasp/*.py")
|
||||
set(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/build/timestamp")
|
||||
|
||||
# configure_file(${SETUP_PY_IN} ${SETUP_PY})
|
||||
|
||||
add_custom_command(OUTPUT ${OUTPUT}
|
||||
COMMAND ${PYTHON} ${SETUP_PY} build
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY} build
|
||||
COMMAND ${CMAKE_COMMAND} -E touch ${OUTPUT}
|
||||
DEPENDS ${DEPS})
|
||||
|
||||
add_custom_target(target ALL DEPENDS ${OUTPUT})
|
||||
|
||||
install(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} install)")
|
||||
endif()
|
||||
|
||||
|
||||
############################## End compiler settings
|
||||
install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY} install)")
|
||||
|
@ -1,7 +1,6 @@
|
||||
|
||||
configure_file(config.pxi.in config.pxi)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
find_package(PythonLibs REQUIRED )
|
||||
include(UseCython)
|
||||
find_package(Numpy REQUIRED )
|
||||
|
||||
@ -13,35 +12,6 @@ include_directories(
|
||||
add_subdirectory(c)
|
||||
add_subdirectory(device)
|
||||
|
||||
# add the command to generate the source code
|
||||
# add_custom_command (
|
||||
# OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Table.h
|
||||
# COMMAND MakeTable ${CMAKE_CURRENT_BINARY_DIR}/Table.h
|
||||
# DEPENDS MakeTable
|
||||
# )
|
||||
|
||||
set(ui_files ui_apsrtsettings ui_mainwindow ui_figure ui_about
|
||||
ui_apswidget ui_revtimewidget ui_slmwidget ui_daqwidget ui_apssettings
|
||||
ui_figuredialog)
|
||||
foreach(fn ${ui_files})
|
||||
add_custom_command(
|
||||
OUTPUT "${fn}.py"
|
||||
COMMAND pyside-uic ${CMAKE_CURRENT_SOURCE_DIR}/ui/${fn}.ui -o ${CMAKE_CURRENT_SOURCE_DIR}/${fn}.py
|
||||
DEPENDS "ui/${fn}.ui"
|
||||
)
|
||||
add_custom_target(${fn} ALL DEPENDS "${fn}.py")
|
||||
endforeach(fn)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${PROJECT_SOURCE_DIR}/resources_rc.py"
|
||||
COMMAND pyside-rcc -py3 ui/resources.qrc -o ${PROJECT_SOURCE_DIR}/resources_rc.py
|
||||
DEPENDS "ui/resources.qrc"
|
||||
)
|
||||
add_custom_target(resources_rc ALL DEPENDS "${PROJECT_SOURCE_DIR}/resources_rc.py")
|
||||
|
||||
|
||||
|
||||
|
||||
set_source_files_properties(wrappers.c PROPERTIES COMPILE_FLAGS "${CMAKE_C_FLAGS} ${CYTHON_EXTRA_C_FLAGS}")
|
||||
cython_add_module(wrappers wrappers.pyx)
|
||||
target_link_libraries(wrappers lasp_lib )
|
||||
|
3
setup.py
3
setup.py
@ -14,7 +14,8 @@ setup(
|
||||
packages=['lasp'],
|
||||
author='J.A. de Jong - ASCEE',
|
||||
author_email="j.a.dejong@ascee.nl",
|
||||
install_requires=['matplotlib>=1.0', 'scipy>=1.0', 'numpy>=1.0'],
|
||||
install_requires=['matplotlib>=1.0',
|
||||
'scipy>=1.0', 'numpy>=1.0', 'h5py'],
|
||||
license='MIT',
|
||||
description=descr,
|
||||
keywords="",
|
||||
|
Loading…
Reference in New Issue
Block a user