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

importlib is not available anywhere.

parent fed6472b
No related branches found
No related tags found
No related merge requests found
...@@ -22,6 +22,9 @@ elseif(GIT_EXEC) ...@@ -22,6 +22,9 @@ elseif(GIT_EXEC)
endif( ) endif( )
message( STATUS "Building version ${VERSION_MOOSE}" ) message( STATUS "Building version ${VERSION_MOOSE}" )
# Prefix
message( STATUS "CMAKE_INSTALL_PREFIX= ${CMAKE_INSTALL_PREFIX}" )
# Options to pass down to moose-core # Options to pass down to moose-core
option(WITH_DOC "Build documentation" OFF) option(WITH_DOC "Build documentation" OFF)
option(DEBUG "Build with DEBUG support" OFF) option(DEBUG "Build with DEBUG support" OFF)
...@@ -57,14 +60,17 @@ file(MAKE_DIRECTORY ${PYMOOSE_BUILD_DIR}) ...@@ -57,14 +60,17 @@ file(MAKE_DIRECTORY ${PYMOOSE_BUILD_DIR})
# different platform. # different platform.
set(OUTPUT_MOOSEBIN ${PYMOOSE_BUILD_DIR}/moose.bin) set(OUTPUT_MOOSEBIN ${PYMOOSE_BUILD_DIR}/moose.bin)
configure_file( ${CMAKE_SOURCE_DIR}/cmake/build_moose-core.sh.in configure_file(
${CMAKE_BINARY_DIR}/build_moose-core.sh ) ${CMAKE_SOURCE_DIR}/cmake/build_moose-core.sh.in
${PYMOOSE_BUILD_DIR}/build_moose-core.sh
)
# Build pymoose module. # Build pymoose module.
add_custom_target( moose-core ALL DEPENDS ${OUTPUT_MOOSEBIN} ) add_custom_target( moose-core DEPENDS ${OUTPUT_MOOSEBIN} )
add_custom_command( OUTPUT ${OUTPUT_MOOSEBIN} add_custom_command( OUTPUT ${OUTPUT_MOOSEBIN}
COMMAND ${CMAKE_BINARY_DIR}/build_moose-core.sh COMMAND bash -c ${PYMOOSE_BUILD_DIR}/build_moose-core.sh
COMMENT "Building pymoose" WORKING_DIRECTORY ${PYMOOSE_BUILD_DIR}
COMMENT "Building pymoose in ${PYMOOSE_BUILD_DIR}"
VERBATIM VERBATIM
) )
......
...@@ -22,8 +22,6 @@ echo "Building MOOSE" ...@@ -22,8 +22,6 @@ echo "Building MOOSE"
-DVERSION_MOOSE=@VERSION_MOOSE@ \ -DVERSION_MOOSE=@VERSION_MOOSE@ \
@CMAKE_PYMOOSE_ARGS@ \ @CMAKE_PYMOOSE_ARGS@ \
@PYMOOSE_SOURCE_DIR@ @PYMOOSE_SOURCE_DIR@
$MAKE make && ctest --output-on-failure && make install
ctest --output-on-failure || echo "Some tests failed"
$MAKE install
) )
...@@ -34,8 +34,12 @@ except Exception as e: ...@@ -34,8 +34,12 @@ except Exception as e:
print( 'Failed to read VERSION %s' % e ) print( 'Failed to read VERSION %s' % e )
print( 'Using default %s' % version ) print( 'Using default %s' % version )
suffix = '.so'
try:
import importlib.machinery import importlib.machinery
suffix = importlib.machinery.EXTENSION_SUFFIXES[-1] suffix = importlib.machinery.EXTENSION_SUFFIXES[-1]
except Exception as e:
suffix = '.so'
setup( setup(
name='pymoose', name='pymoose',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment