[SCons] Remove unnecessary uses of pjoin
This commit is contained in:
parent
43f022384c
commit
044235c065
9 changed files with 45 additions and 72 deletions
24
SConstruct
24
SConstruct
|
|
@ -1330,15 +1330,15 @@ if addInstallActions:
|
|||
install(env.RecursiveInstall, '$inst_incdir', 'include/cantera')
|
||||
|
||||
# Data files
|
||||
install('$inst_datadir', mglob(env, pjoin('build','data'), 'cti', 'xml'))
|
||||
install('$inst_datadir', mglob(env, 'build/data', 'cti', 'xml'))
|
||||
|
||||
# Converter scripts
|
||||
pyExt = '.py' if env['OS'] == 'Windows' else ''
|
||||
install(env.InstallAs,
|
||||
pjoin('$inst_bindir','ck2cti%s' % pyExt),
|
||||
'$inst_bindir/ck2cti%s' % pyExt,
|
||||
'interfaces/cython/cantera/ck2cti.py')
|
||||
install(env.InstallAs,
|
||||
pjoin('$inst_bindir','ctml_writer%s' % pyExt),
|
||||
'$inst_bindir/ctml_writer%s' % pyExt,
|
||||
'interfaces/cython/cantera/ctml_writer.py')
|
||||
|
||||
# Copy external libaries for Windows installations
|
||||
|
|
@ -1346,8 +1346,8 @@ if addInstallActions:
|
|||
boost_suffix = '-vc%s-mt-%s.lib' % (env['MSVC_VERSION'].replace('.',''),
|
||||
env['BOOST_LIB_VERSION'])
|
||||
for lib in env['boost_windows_libs'].split(','):
|
||||
install('$inst_libdir', pjoin('$boost_lib_dir',
|
||||
'libboost_{0}{1}'.format(lib, boost_suffix)))
|
||||
install('$inst_libdir',
|
||||
'$boost_lib_dir/libboost_{0}{1}'.format(lib, boost_suffix))
|
||||
|
||||
# Copy sundials library and header files
|
||||
if env['install_sundials']:
|
||||
|
|
@ -1356,7 +1356,7 @@ if addInstallActions:
|
|||
install(env.RecursiveInstall, pjoin('$inst_incdir', '..', subdir),
|
||||
pjoin(env['sundials_include'], subdir))
|
||||
if os.path.exists(env['sundials_license']):
|
||||
install(pjoin('$inst_incdir', '..', 'sundials'), env['sundials_license'])
|
||||
install('$inst_incdir/../sundials', env['sundials_license'])
|
||||
libprefix = '' if os.name == 'nt' else 'lib'
|
||||
install('$inst_libdir', mglob(env, env['sundials_libdir'],
|
||||
'^{0}sundials_*'.format(libprefix)))
|
||||
|
|
@ -1452,7 +1452,7 @@ if 'samples' in COMMAND_LINE_TARGETS or addInstallActions:
|
|||
SConscript('build/samples/cxx/SConscript')
|
||||
|
||||
# Install C++ samples
|
||||
install(env.RecursiveInstall, pjoin('$inst_sampledir', 'cxx'),
|
||||
install(env.RecursiveInstall, '$inst_sampledir/cxx',
|
||||
'samples/cxx', exclude=sampledir_excludes)
|
||||
|
||||
if env['f90_interface'] == 'y':
|
||||
|
|
@ -1460,9 +1460,9 @@ if 'samples' in COMMAND_LINE_TARGETS or addInstallActions:
|
|||
SConscript('build/samples/f90/SConscript')
|
||||
|
||||
# install F90 / F77 samples
|
||||
install(env.RecursiveInstall, pjoin('$inst_sampledir', 'f77'),
|
||||
install(env.RecursiveInstall, '$inst_sampledir/f77',
|
||||
'samples/f77', sampledir_excludes)
|
||||
install(env.RecursiveInstall, pjoin('$inst_sampledir', 'f90'),
|
||||
install(env.RecursiveInstall, '$inst_sampledir/f90',
|
||||
'samples/f90', sampledir_excludes)
|
||||
|
||||
### Meta-targets ###
|
||||
|
|
@ -1613,13 +1613,11 @@ if 'msi' in COMMAND_LINE_TARGETS:
|
|||
includeMatlab=env['matlab_toolbox']=='y')
|
||||
wxs.make_wxs(str(target[0]))
|
||||
|
||||
wxs_target = env.Command(pjoin('build', 'wix', 'cantera.wxs'),
|
||||
[], build_wxs)
|
||||
wxs_target = env.Command('build/wix/cantera.wxs', [], build_wxs)
|
||||
env.AlwaysBuild(wxs_target)
|
||||
|
||||
env.Append(WIXLIGHTFLAGS=['-ext', 'WixUIExtension'])
|
||||
msi_target = env.WiX('cantera.msi',
|
||||
[pjoin('build', 'wix', 'cantera.wxs')])
|
||||
msi_target = env.WiX('cantera.msi', ['build/wix/cantera.wxs'])
|
||||
env.Depends(wxs_target, installTargets)
|
||||
env.Depends(msi_target, wxs_target)
|
||||
build_msi = Alias('msi', msi_target)
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ if localenv['doxygen_docs']:
|
|||
mglob(env, '#src/cantera/*', 'h', 'cpp'))
|
||||
|
||||
env.Alias('doxygen', docs)
|
||||
install(pjoin('$inst_docdir', 'doxygen/html'),
|
||||
install('$inst_docdir/doxygen/html',
|
||||
mglob(localenv, '#/build/docs/doxygen/html', 'html', 'svg', 'css', 'png'))
|
||||
|
||||
if localenv['sphinx_docs']:
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ for subdir, extensions, prepFunction in libs:
|
|||
# and compiled library can be installed alongside Cantera using the scons
|
||||
# option 'install_gtest=y'.
|
||||
localenv = prep_gtest(env)
|
||||
gtest = build(localenv.Library(pjoin('../lib', 'gtest'),
|
||||
gtest = build(localenv.Library('../lib/gtest',
|
||||
source=['gtest/src/gtest-all.cc']))
|
||||
|
||||
if localenv['install_gtest']:
|
||||
|
|
|
|||
|
|
@ -44,5 +44,5 @@ sconstruct = localenv.SubstFile('SConstruct', 'SConstruct.in')
|
|||
# Generate Makefile to be installed
|
||||
makefile = localenv.SubstFile('Makefile', 'Makefile.in')
|
||||
|
||||
install(pjoin('$inst_sampledir', 'f77'), makefile)
|
||||
install(pjoin('$inst_sampledir', 'f77'), sconstruct)
|
||||
install('$inst_sampledir/f77', makefile)
|
||||
install('$inst_sampledir/f77', sconstruct)
|
||||
|
|
|
|||
|
|
@ -43,5 +43,5 @@ for programName, sources in samples:
|
|||
localenv['make_sourcefile'] = programName + '.f90'
|
||||
makefile = localenv.SubstFile('Makefile', 'Makefile.in')
|
||||
|
||||
install(pjoin('$inst_sampledir', 'f90'), makefile)
|
||||
install(pjoin('$inst_sampledir', 'f90'), sconstruct)
|
||||
install('$inst_sampledir/f90', makefile)
|
||||
install('$inst_sampledir/f90', sconstruct)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ mods = [o for o in artifacts if o.path.endswith('.mod')]
|
|||
objects = [o for o in artifacts if not o.path.endswith('.mod')]
|
||||
localenv.Depends(objects, localenv['config_h_target'])
|
||||
|
||||
lib = build(localenv.Library(target=pjoin('..','..','lib','cantera_fortran'),
|
||||
lib = build(localenv.Library(target='../../lib/cantera_fortran',
|
||||
source=objects))
|
||||
|
||||
install('$inst_libdir', lib)
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ install('$inst_matlab_dir', '#samples/matlab/cantera_demos.m')
|
|||
install(localenv.RecursiveInstall, '$inst_matlab_dir',
|
||||
'#interfaces/matlab/toolbox',
|
||||
exclude=['dll$', 'exp$', 'lib$', 'ilk$', 'manifest$'])
|
||||
install(localenv.RecursiveInstall, pjoin('$inst_sampledir', 'matlab'), '#samples/matlab')
|
||||
install(localenv.RecursiveInstall, '$inst_sampledir/matlab', '#samples/matlab')
|
||||
|
||||
if os.name == 'nt':
|
||||
shlib = [f for f in localenv['cantera_shlib']
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ def addMatlabTest(script, testName, dependencies=None, env_vars=()):
|
|||
open(target[0].path, 'w').write(time.asctime()+'\n')
|
||||
|
||||
testenv = localenv.Clone()
|
||||
passedFile = File(pjoin('matlab', '%s.passed' % (script)))
|
||||
passedFile = File('matlab/%s.passed' % (script))
|
||||
PASSED_FILES[testName] = str(passedFile)
|
||||
testResults.tests[passedFile.name] = True
|
||||
run_program = testenv.Command(passedFile, pjoin('matlab', script), matlabRunner)
|
||||
|
|
|
|||
|
|
@ -152,99 +152,74 @@ dhGraph = localenv.Program('cathermo/DH_graph_1/DH_graph_1',
|
|||
LIBS=cantera_libs)
|
||||
dhGraph_name = dhGraph[0].name
|
||||
|
||||
Test('DH_graph_dilute',
|
||||
pjoin('cathermo', 'DH_graph_1'),
|
||||
Test('DH_graph_dilute', 'cathermo/DH_graph_1',
|
||||
dhGraph, 'DH_NaCl_dilute_blessed.csv',
|
||||
artifacts=['DH_graph_1.log', dhGraph_name],
|
||||
arguments='DH_NaCl_dilute.xml')
|
||||
Test('DH_graph_acommon',
|
||||
pjoin('cathermo', 'DH_graph_1'),
|
||||
Test('DH_graph_acommon', 'cathermo/DH_graph_1',
|
||||
dhGraph, 'DH_NaCl_acommon_blessed.csv',
|
||||
artifacts=['DH_graph_1.log', dhGraph_name],
|
||||
arguments='DH_NaCl_acommon.xml')
|
||||
Test('DH_graph_bdotak',
|
||||
pjoin('cathermo', 'DH_graph_1'),
|
||||
Test('DH_graph_bdotak', 'cathermo/DH_graph_1',
|
||||
dhGraph, 'DH_NaCl_bdotak_blessed.csv',
|
||||
artifacts=['DH_graph_1.log', dhGraph_name],
|
||||
arguments='DH_NaCl_bdotak.xml')
|
||||
Test('DH_graph_NM',
|
||||
pjoin('cathermo', 'DH_graph_1'),
|
||||
Test('DH_graph_NM', 'cathermo/DH_graph_1',
|
||||
dhGraph, 'DH_NaCl_NM_blessed.csv',
|
||||
artifacts=['DH_graph_1.log', dhGraph_name],
|
||||
arguments='DH_NaCl_NM.xml')
|
||||
Test('DH_graph_Pitzer',
|
||||
pjoin('cathermo', 'DH_graph_1'),
|
||||
Test('DH_graph_Pitzer', 'cathermo/DH_graph_1',
|
||||
dhGraph, 'DH_NaCl_Pitzer_blessed.csv',
|
||||
artifacts=['DH_graph_1.log', dhGraph_name],
|
||||
arguments='DH_NaCl_Pitzer.xml')
|
||||
|
||||
CompileAndTest('HMW_dupl_test',
|
||||
pjoin('cathermo', 'HMW_dupl_test'),
|
||||
CompileAndTest('HMW_dupl_test', 'cathermo/HMW_dupl_test',
|
||||
'HMW_dupl_test', 'output_blessed.txt',
|
||||
artifacts=['DH_graph_1.log'],
|
||||
arguments='HMW_NaCl_sp1977_alt.xml')
|
||||
CompileAndTest('HMW_graph_CpvT',
|
||||
pjoin('cathermo', 'HMW_graph_CpvT'),
|
||||
CompileAndTest('HMW_graph_CpvT', 'cathermo/HMW_graph_CpvT',
|
||||
'HMW_graph_CpvT', 'output_blessed.txt',
|
||||
extensions=['^HMW_graph_CpvT.cpp'],
|
||||
arguments='HMW_NaCl_sp1977_alt.xml')
|
||||
CompileAndTest('HMW_graph_GvI',
|
||||
pjoin('cathermo', 'HMW_graph_GvI'),
|
||||
CompileAndTest('HMW_graph_GvI', 'cathermo/HMW_graph_GvI',
|
||||
'HMW_graph_GvI', None,
|
||||
comparisons=[('T298_blessed.csv', 'T298.csv'),
|
||||
('T523_blessed.csv', 'T523.csv')],
|
||||
artifacts=['T373.csv','T423.csv','T473.csv',
|
||||
'T548.csv','T573.csv'])
|
||||
CompileAndTest('HMW_graph_GvT',
|
||||
pjoin('cathermo', 'HMW_graph_GvT'),
|
||||
CompileAndTest('HMW_graph_GvT', 'cathermo/HMW_graph_GvT',
|
||||
'HMW_graph_GvT', 'output_blessed.txt',
|
||||
extensions=['^HMW_graph_GvT.cpp'],
|
||||
arguments='HMW_NaCl_sp1977_alt.xml')
|
||||
CompileAndTest('HMW_graph_HvT',
|
||||
pjoin('cathermo', 'HMW_graph_HvT'),
|
||||
CompileAndTest('HMW_graph_HvT', 'cathermo/HMW_graph_HvT',
|
||||
'HMW_graph_HvT', 'output_blessed.txt',
|
||||
extensions=['^HMW_graph_HvT.cpp'],
|
||||
arguments='HMW_NaCl_sp1977_alt.xml')
|
||||
CompileAndTest('HMW_graph_VvT',
|
||||
pjoin('cathermo', 'HMW_graph_VvT'),
|
||||
CompileAndTest('HMW_graph_VvT', 'cathermo/HMW_graph_VvT',
|
||||
'HMW_graph_VvT', 'output_blessed.txt',
|
||||
extensions=['^HMW_graph_VvT.cpp'],
|
||||
arguments='HMW_NaCl_sp1977_alt.xml')
|
||||
CompileAndTest('HMW_test_1',
|
||||
pjoin('cathermo', 'HMW_test_1'),
|
||||
CompileAndTest('HMW_test_1', 'cathermo/HMW_test_1',
|
||||
'HMW_test_1', 'output_noD_blessed.txt')
|
||||
CompileAndTest('HMW_test_3',
|
||||
pjoin('cathermo', 'HMW_test_3'),
|
||||
CompileAndTest('HMW_test_3', 'cathermo/HMW_test_3',
|
||||
'HMW_test_3', 'output_noD_blessed.txt')
|
||||
CompileAndTest('IMSTester',
|
||||
pjoin('cathermo', 'ims'),
|
||||
'IMSTester', 'output_blessed.txt')
|
||||
CompileAndTest('ISSPTester',
|
||||
pjoin('cathermo', 'issp'),
|
||||
'ISSPTester', 'output_blessed.txt')
|
||||
CompileAndTest('stoichSubSSTP',
|
||||
pjoin('cathermo', 'stoichSubSSTP'),
|
||||
CompileAndTest('IMSTester', 'cathermo/ims', 'IMSTester', 'output_blessed.txt')
|
||||
CompileAndTest('ISSPTester', 'cathermo/issp', 'ISSPTester', 'output_blessed.txt')
|
||||
CompileAndTest('stoichSubSSTP', 'cathermo/stoichSubSSTP',
|
||||
'stoichSubSSTP', 'output_blessed.txt')
|
||||
CompileAndTest('IAPWSphi',
|
||||
pjoin('cathermo', 'testIAPWS'),
|
||||
CompileAndTest('IAPWSphi', 'cathermo/testIAPWS',
|
||||
'testIAPWSphi', 'output_blessed.txt')
|
||||
CompileAndTest('IAPWSPres',
|
||||
pjoin('cathermo', 'testIAPWSPres'),
|
||||
CompileAndTest('IAPWSPres', 'cathermo/testIAPWSPres',
|
||||
'testIAPWSPres', 'output_blessed.txt')
|
||||
CompileAndTest('IAPWSTripP',
|
||||
pjoin('cathermo', 'testIAPWSTripP'),
|
||||
CompileAndTest('IAPWSTripP', 'cathermo/testIAPWSTripP',
|
||||
'testIAPWSTripP', 'output_blessed.txt')
|
||||
CompileAndTest('WaterPDSS',
|
||||
pjoin('cathermo', 'testWaterPDSS'),
|
||||
CompileAndTest('WaterPDSS', 'cathermo/testWaterPDSS',
|
||||
'testWaterPDSS', 'output_blessed.txt')
|
||||
CompileAndTest('WaterSSTP',
|
||||
pjoin('cathermo', 'testWaterTP'),
|
||||
CompileAndTest('WaterSSTP', 'cathermo/testWaterTP',
|
||||
'testWaterSSTP', 'output_blessed.txt')
|
||||
CompileAndTest('ISSPTester2',
|
||||
pjoin('cathermo', 'VPissp'),
|
||||
CompileAndTest('ISSPTester2', 'cathermo/VPissp',
|
||||
'ISSPTester2', 'output_blessed.txt')
|
||||
CompileAndTest('wtWater',
|
||||
pjoin('cathermo', 'wtWater'),
|
||||
CompileAndTest('wtWater', 'cathermo/wtWater',
|
||||
'wtWater', 'output_blessed.txt')
|
||||
CompileAndTest('ChemEquil_gri_matrix',
|
||||
'ChemEquil_gri_matrix', 'gri_matrix', 'output_blessed.txt')
|
||||
|
|
@ -323,11 +298,11 @@ CompileAndTest('surfSolver2', 'surfSolverTest', 'surfaceSolver2', None,
|
|||
comparisons=[('results2_blessed.txt', 'results2.txt')],
|
||||
artifacts=['results2.txt'],
|
||||
extensions=['^surfaceSolver2.cpp'])
|
||||
CompileAndTest('VCS-NaCl', pjoin('VCSnonideal', 'NaCl_equil'),
|
||||
CompileAndTest('VCS-NaCl', 'VCSnonideal/NaCl_equil',
|
||||
'nacl_equil', 'good_out.txt',
|
||||
options='-d 3',
|
||||
artifacts=['vcs_equilibrate_res.csv']), # not testing this file because it's not really csv
|
||||
CompileAndTest('VCS-LiSi', pjoin('VCSnonideal', 'LatticeSolid_LiSi'),
|
||||
CompileAndTest('VCS-LiSi', 'VCSnonideal/LatticeSolid_LiSi',
|
||||
'latticeSolid_LiSi', 'output_blessed.txt',
|
||||
artifacts=['vcs_equilibrate_res.csv'])
|
||||
CompileAndTest('VPsilane_test', 'VPsilane_test', 'VPsilane_test', 'output_blessed.txt')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue