From 88451f656bfa36cfa86446585f88f173d05ffc1a Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Wed, 21 Dec 2016 14:35:11 +0100 Subject: [PATCH] fix overriding by setup.py such that install now works again --- CMakeLists.txt | 2 +- setup.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7564226..1ec1761 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ add_subdirectory(resources/pybind11) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/generated/config.h) -set(STORMPY_LIB_DIR "${CMAKE_SOURCE_DIR}/lib/stormpy") +set(STORMPY_LIB_DIR "${CMAKE_SOURCE_DIR}/lib/stormpy" CACHE STRING "Sets the storm library dir") function(stormpy_module NAME) # second, optional argument is LIBRARY_OUTPUT_DIRECTORY, diff --git a/setup.py b/setup.py index 71e1812..5ab038a 100755 --- a/setup.py +++ b/setup.py @@ -44,7 +44,8 @@ class CMakeBuild(build_ext): def build_extension(self, ext): extdir = os.path.abspath(os.path.dirname(self.get_ext_fullpath(ext.name))) - cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + os.path.join(extdir, ext.subdir), + print(extdir) + cmake_args = ['-DSTORMPY_LIB_DIR=' + extdir, '-DPYTHON_EXECUTABLE=' + sys.executable] cfg = 'Release' # if self.debug else 'Release'