Browse Source

fix overriding by setup.py such that install now works again

refactoring
Sebastian Junges 8 years ago
parent
commit
88451f656b
  1. 2
      CMakeLists.txt
  2. 3
      setup.py

2
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) 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) function(stormpy_module NAME)
# second, optional argument is LIBRARY_OUTPUT_DIRECTORY, # second, optional argument is LIBRARY_OUTPUT_DIRECTORY,

3
setup.py

@ -44,7 +44,8 @@ class CMakeBuild(build_ext):
def build_extension(self, ext): def build_extension(self, ext):
extdir = os.path.abspath(os.path.dirname(self.get_ext_fullpath(ext.name))) 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] '-DPYTHON_EXECUTABLE=' + sys.executable]
cfg = 'Release' # if self.debug else 'Release' cfg = 'Release' # if self.debug else 'Release'
Loading…
Cancel
Save