setup_processing.py uses damask module but builds the core part of it, therefore made the use damask.core optional by setting a try statement in __init__.py and a "from damask import xxx"
This commit is contained in:
parent
ee401520d7
commit
dd1e968908
|
@ -7,4 +7,7 @@ from .result import Result # one class with subclasses
|
||||||
from .geometry import Geometry # one class with subclasses
|
from .geometry import Geometry # one class with subclasses
|
||||||
from .solver import Solver # one class with subclasses
|
from .solver import Solver # one class with subclasses
|
||||||
from .test import Test
|
from .test import Test
|
||||||
from . import core
|
try:
|
||||||
|
from . import core
|
||||||
|
except:
|
||||||
|
print 'Core module (Fortran code) not available, try to run setup_processing.py'
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
# Makes postprocessing routines acessible from everywhere.
|
# Makes postprocessing routines acessible from everywhere.
|
||||||
|
|
||||||
import os,sys,glob,string,damask
|
import os,sys,glob,string
|
||||||
|
from damask import Environment
|
||||||
from optparse import OptionParser, Option
|
from optparse import OptionParser, Option
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,7 +45,7 @@ parser.add_option('--F90', dest='compiler', type='string', \
|
||||||
(options,filenames) = parser.parse_args()
|
(options,filenames) = parser.parse_args()
|
||||||
|
|
||||||
if options.compiler not in compilers:
|
if options.compiler not in compilers:
|
||||||
parser.error('compiler has to be one out of --F90 %s'%(', '.join(compilers)))
|
parser.error('compiler switch "--F90" has to be one out of: %s'%(', '.join(compilers)))
|
||||||
|
|
||||||
f2py_compiler = {
|
f2py_compiler = {
|
||||||
'gfortran': 'gnu95 --f90flags="-fno-range-check"',
|
'gfortran': 'gnu95 --f90flags="-fno-range-check"',
|
||||||
|
@ -54,8 +55,7 @@ f2py_compiler = {
|
||||||
'ifort': 'intelem',
|
'ifort': 'intelem',
|
||||||
}[options.compiler]
|
}[options.compiler]
|
||||||
|
|
||||||
|
damaskEnv = Environment()
|
||||||
damaskEnv = damask.Environment()
|
|
||||||
baseDir = damaskEnv.relPath('processing/')
|
baseDir = damaskEnv.relPath('processing/')
|
||||||
codeDir = damaskEnv.relPath('code/')
|
codeDir = damaskEnv.relPath('code/')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue