Add a separate directory for scripts and libraries not part of the PyFoam-distribution. This will only work with Pyfoam 0.6.4 or later
This commit is contained in:
parent
5e5c8a8afc
commit
f450b35fd4
5 changed files with 29 additions and 19 deletions
33
ThirdParty/LocalDev/Hydro-Quebec/PyFoam/AllMake
vendored
33
ThirdParty/LocalDev/Hydro-Quebec/PyFoam/AllMake
vendored
|
@ -40,39 +40,42 @@ then
|
||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$PYFOAM_DIR" ]
|
if [ -z "$PYFOAM_SITE_DIR" ]
|
||||||
then
|
then
|
||||||
echo "Error: Missing environment variable \$PYFOAM_DIR."
|
echo "Error: Missing environment variable \$PYFOAM_SITE_DIR."
|
||||||
echo " Please execute the script ThirdParty/AllMake.stage5 to install PyFoam."
|
echo " Please execute the script ThirdParty/AllMake.stage5 to install PyFoam."
|
||||||
echo " Then, make sure to freshen your foam-extend environment by sourcing your main"
|
echo " Then, make sure to freshen your foam-extend environment by sourcing your main"
|
||||||
echo " foam-extend configuration file."
|
echo " foam-extend configuration file."
|
||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pythonVersion=$(python -V 2>&1 | awk -F ' ' {'print $2'} | awk -F \. {'print $1 "." $2'})
|
if [ ! -d $PYFOAM_SITE_DIR/lib -o ! -d $PYFOAM_SITE_DIR/bin ]
|
||||||
|
then
|
||||||
|
echo "Directory $PYFOAM_SITE_DIR/lib or $PYFOAM_SITE_DIR/bin missing"
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
# pyFoamChangeMixingPlaneBoundary.py
|
# pyFoamChangeMixingPlaneBoundary.py
|
||||||
cp pyFoamChangeMixingPlaneBoundary.py $PYFOAM_DIR/bin
|
cp pyFoamChangeMixingPlaneBoundary.py $PYFOAM_SITE_DIR/bin
|
||||||
cp ChangeMixingPlaneBoundary.py $PYFOAM_DIR/lib/python$pythonVersion/site-packages/PyFoam/Applications
|
cp ChangeMixingPlaneBoundary.py $PYFOAM_SITE_DIR/lib
|
||||||
|
|
||||||
# pyFoamChangeGGIBoundary.py
|
# pyFoamChangeGGIBoundary.py
|
||||||
# Same as pyFoamModifyGGIBoundary.py. We just harmonize the name with rest of PyFoam
|
# Same as pyFoamModifyGGIBoundary.py. We just harmonize the name with rest of PyFoam
|
||||||
cp pyFoamChangeGGIBoundary.py $PYFOAM_DIR/bin
|
cp pyFoamChangeGGIBoundary.py $PYFOAM_SITE_DIR/bin
|
||||||
cp ChangeGGIBoundary.py $PYFOAM_DIR/lib/python$pythonVersion/site-packages/PyFoam/Applications
|
cp ChangeGGIBoundary.py $PYFOAM_SITE_DIR/lib
|
||||||
|
|
||||||
# pyFoamInitializeMixingPlane.py
|
# pyFoamInitializeMixingPlane.py
|
||||||
cp pyFoamInitMixingPlaneInterface.py $PYFOAM_DIR/bin
|
cp pyFoamInitMixingPlaneInterface.py $PYFOAM_SITE_DIR/bin
|
||||||
cp InitMixingPlaneInterface.py $PYFOAM_DIR/lib/python$pythonVersion/site-packages/PyFoam/Applications
|
cp InitMixingPlaneInterface.py $PYFOAM_SITE_DIR/lib
|
||||||
|
|
||||||
# pyFoamInitializeGGI.py
|
# pyFoamInitializeGGI.py
|
||||||
cp pyFoamInitGgiInterface.py $PYFOAM_DIR/bin
|
cp pyFoamInitGgiInterface.py $PYFOAM_SITE_DIR/bin
|
||||||
cp InitGgiInterface.py $PYFOAM_DIR/lib/python$pythonVersion/site-packages/PyFoam/Applications
|
cp InitGgiInterface.py $PYFOAM_SITE_DIR/lib
|
||||||
|
|
||||||
# pyFoamConvertMixingPlaneBoundaryToNewSyntax.py
|
# pyFoamConvertMixingPlaneBoundaryToNewSyntax.py
|
||||||
cp pyFoamConvertMixingPlaneBoundaryToNewSyntax.py $PYFOAM_DIR/bin
|
cp pyFoamConvertMixingPlaneBoundaryToNewSyntax.py $PYFOAM_SITE_DIR/bin
|
||||||
cp ConvertMixingPlaneBoundaryToNewSyntax.py $PYFOAM_DIR/lib/python$pythonVersion/site-packages/PyFoam/Applications
|
cp ConvertMixingPlaneBoundaryToNewSyntax.py $PYFOAM_SITE_DIR/lib
|
||||||
|
|
||||||
set +x
|
set +x
|
||||||
echo ========================================
|
echo ========================================
|
||||||
|
@ -81,5 +84,3 @@ echo ========================================
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|
||||||
|
|
||||||
|
|
0
ThirdParty/PyFoamSiteScripts/bin/.gitStandin
vendored
Normal file
0
ThirdParty/PyFoamSiteScripts/bin/.gitStandin
vendored
Normal file
0
ThirdParty/PyFoamSiteScripts/etc/.gitStandin
vendored
Normal file
0
ThirdParty/PyFoamSiteScripts/etc/.gitStandin
vendored
Normal file
0
ThirdParty/PyFoamSiteScripts/lib/.gitStandin
vendored
Normal file
0
ThirdParty/PyFoamSiteScripts/lib/.gitStandin
vendored
Normal file
|
@ -640,6 +640,15 @@ export MPI_BUFFER_SIZE
|
||||||
}
|
}
|
||||||
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " PYFOAM_DIR is initialized to: $PYFOAM_DIR"
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " PYFOAM_DIR is initialized to: $PYFOAM_DIR"
|
||||||
|
|
||||||
|
# Make sure that there is a special directory for special PyFoam-scripts
|
||||||
|
[ -z "$PYFOAM_SITE_DIR" ] && export PYFOAM_SITE_DIR=$WM_THIRD_PARTY_DIR/PyFoamSiteScripts
|
||||||
|
if [ -d $PYFOAM_SITE_DIR/bin ]
|
||||||
|
then
|
||||||
|
_foamAddPath $PYFOAM_SITE_DIR/bin
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " PYFOAM_SITE_DIR is initialized to: $PYFOAM_SITE_DIR"
|
||||||
|
|
||||||
# Load hwloc
|
# Load hwloc
|
||||||
# ~~~~~~~~~~~
|
# ~~~~~~~~~~~
|
||||||
[ -z "$HWLOC_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/hwloc-1.7.2/platforms/$WM_OPTIONS ] && {
|
[ -z "$HWLOC_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/hwloc-1.7.2/platforms/$WM_OPTIONS ] && {
|
||||||
|
|
Reference in a new issue