From 4f3c51fc4f37d5ef44231070165f54c9a8dc3819 Mon Sep 17 00:00:00 2001 From: Tom Janson Date: Wed, 14 Dec 2016 21:47:16 +0100 Subject: [PATCH] add empty module --- CMakeLists.txt | 6 ++++++ lib/stormpy/utility/__init__.py | 2 ++ setup.py | 4 ++-- src/CMakeLists.txt | 10 ++++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 lib/stormpy/utility/__init__.py diff --git a/CMakeLists.txt b/CMakeLists.txt index 24e30ce..fd9bf4f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,3 +38,9 @@ pybind11_add_module(storage ${CMAKE_CURRENT_SOURCE_DIR}/src/mod_storage.cpp ${ST target_include_directories(storage PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${storm_INCLUDE_DIR}) target_link_libraries(storage PRIVATE storm) +file(GLOB_RECURSE STORM_UTILITY_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/utility/*.cpp) + +pybind11_add_module(utility ${CMAKE_CURRENT_SOURCE_DIR}/src/mod_utility.cpp ${STORM_UTILITY_SOURCES}) +target_include_directories(utility PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${storm_INCLUDE_DIR}) +target_link_libraries(utility PRIVATE storm) + diff --git a/lib/stormpy/utility/__init__.py b/lib/stormpy/utility/__init__.py new file mode 100644 index 0000000..bdc2591 --- /dev/null +++ b/lib/stormpy/utility/__init__.py @@ -0,0 +1,2 @@ +from . import utility +from .utility import * \ No newline at end of file diff --git a/setup.py b/setup.py index 9664512..08b97fa 100755 --- a/setup.py +++ b/setup.py @@ -76,10 +76,10 @@ setup( maintainer_email="sebastian.junges@cs.rwth-aachen.de", url="http://moves.rwth-aachen.de", description="stormpy - Python Bindings for Storm", - packages=['stormpy', 'stormpy.info', 'stormpy.expressions', 'stormpy.logic', 'stormpy.storage'], + packages=['stormpy', 'stormpy.info', 'stormpy.expressions', 'stormpy.logic', 'stormpy.storage', 'stormpy.utility'], package_dir={'':'lib'}, ext_package='stormpy', - ext_modules=[CMakeExtension('core', subdir=''), CMakeExtension('info', subdir='info'),CMakeExtension('expressions', subdir='expressions'), CMakeExtension('logic', subdir='logic'), CMakeExtension('storage', subdir='storage')], + ext_modules=[CMakeExtension('core', subdir=''), CMakeExtension('info', subdir='info'), CMakeExtension('expressions', subdir='expressions'), CMakeExtension('logic', subdir='logic'), CMakeExtension('storage', subdir='storage'), CMakeExtension('utility', subdir='utility')], cmdclass=dict(build_ext=CMakeBuild), zip_safe=False, install_requires=['pytest'], diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9882d8a..e898052 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -7,11 +7,13 @@ FILE(GLOB core_files "core/*.cpp") #FILE(GLOB info_files "info/*.cpp") #FILE(GLOB expressions_files "expressions/*.cpp") FILE(GLOB storage_files "storage/*.cpp") +FILE(GLOB utility_files "utility/*.cpp") FILE(GLOB logic_files "logic/*.cpp") ADD_LIBRARY(stormpy_core SHARED mod_core.cpp ${core_files}) ADD_LIBRARY(stormpy_info SHARED mod_info.cpp) ADD_LIBRARY(stormpy_expressions SHARED mod_expressions.cpp) ADD_LIBRARY(stormpy_storage SHARED mod_storage.cpp ${storage_files}) +ADD_LIBRARY(stormpy_utility SHARED mod_utility.cpp ${utility_files}) ADD_LIBRARY(stormpy_logic SHARED mod_logic.cpp ${logic_files}) SET_TARGET_PROPERTIES(stormpy_core PROPERTIES @@ -42,6 +44,13 @@ SET_TARGET_PROPERTIES(stormpy_storage PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${STORMPY_OUTPUT_DIR}/storage ) +SET_TARGET_PROPERTIES(stormpy_utility PROPERTIES + OUTPUT_NAME utility + PREFIX "" + SUFFIX ".so" + LIBRARY_OUTPUT_DIRECTORY ${STORMPY_OUTPUT_DIR}/utility + ) + SET_TARGET_PROPERTIES(stormpy_logic PROPERTIES OUTPUT_NAME logic PREFIX "" @@ -53,4 +62,5 @@ TARGET_LINK_LIBRARIES(stormpy_core storm ${PYTHON_LIBRARIES}) TARGET_LINK_LIBRARIES(stormpy_info storm ${PYTHON_LIBRARIES}) TARGET_LINK_LIBRARIES(stormpy_expressions storm ${PYTHON_LIBRARIES}) TARGET_LINK_LIBRARIES(stormpy_storage storm ${PYTHON_LIBRARIES}) +TARGET_LINK_LIBRARIES(stormpy_utility storm ${PYTHON_LIBRARIES}) TARGET_LINK_LIBRARIES(stormpy_logic storm ${PYTHON_LIBRARIES})