Skip to content
Snippets Groups Projects
Commit 71ece59d authored by Dilawar Singh's avatar Dilawar Singh
Browse files

Merge commit 'd377194c' into chamcham

parents d10a3f87 d377194c
No related branches found
No related tags found
No related merge requests found
......@@ -445,12 +445,13 @@ file(GLOB_RECURSE PYTHON_SRCS "${CMAKE_SOURCE_DIR}/python/*")
add_custom_target(copy_pymoose DEPENDS ${PYTHON_SRCS}
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_SOURCE_DIR}/python ${CMAKE_CURRENT_BINARY_DIR}/python
COMMENT "Copying required python files and other files to build directory"
COMMENT "Copying required python files from
${CMAKE_CURRENT_SOURCE_DIR}/python to to build directory"
VERBATIM
)
add_dependencies( bdist copy_pymoose )
add_dependencies( copy_pymoose _moose )
add_dependencies( _moose bdist )
######################### INSTALL ##############################################
......@@ -463,7 +464,7 @@ install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/scripts/moose
)
# install pymoose bdist.
install(DIRECTORY ${PYMOOSE_BDIST_INSTALL_DIR}/
install(DIRECTORY ${PYMOOSE_BDIST_INSTALL_DIR}/usr/
DESTINATION ${CMAKE_INSTALL_PREFIX}
CONFIGURATIONS Release
)
......
......@@ -11,7 +11,6 @@ set(PYMOOSE_SRCS
PyRun.cpp
)
# Build _moose.so in source directory and them copy everything to
# current binary directory using cmake.
add_library( _moose MODULE ${PYMOOSE_SRCS} )
set(PYMOOSE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/python/moose")
......
......@@ -31,13 +31,14 @@ print( 'Got %s from VERSION file' % version )
# importlib is available only for python3.
suffix = '.so'
suffix = 'so'
try:
import importlib.machinery
suffix = importlib.machinery.EXTENSION_SUFFIXES[0].split('.')[-1]
print( '[INFO] Suffix is %s' % suffix )
except Exception as e:
print( '[WARN] Failed to determine importlib suffix' )
suffix = '.so'
suffix = 'so'
setup(
name = 'pymoose',
......@@ -58,5 +59,5 @@ setup(
# by themselves. We notify them when they try to import SBML.
# install_requires = [ 'python-libsbml', 'numpy' ],
package_dir = { 'moose' : 'moose', 'rdesigneur' : 'rdesigneur' },
package_data = { 'moose' : ['_moose' + suffix ] },
package_data = { 'moose' : ['_moose.' + suffix ] },
)
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment