-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
- Loading branch information
Showing
2 changed files
with
40 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
if [ $# -lt 1 ] | ||
then | ||
echo "Usage: `basename $0` <openEMS_install_path>" | ||
exit 1 | ||
fi | ||
|
||
basedir=$(pwd) | ||
INSTALL_PATH=${1%/} | ||
|
||
echo $INSTALL_PATH | ||
|
||
# are we running inside a Python venv? | ||
PY_INST_IS_VENV=$(python3 -c "import sys; print(int(sys.prefix != sys.base_prefix))") | ||
|
||
PY_INST_USER='' | ||
if [[ $EUID != 0 ]] && [[ $PY_INST_IS_VENV != 1 ]]; then | ||
PY_INST_USER='--user' | ||
fi | ||
for PY_EXT in 'CSXCAD' 'openEMS' | ||
do | ||
echo "build $PY_EXT python module ... please wait" | ||
cd $PY_EXT/python | ||
python3 setup.py build_ext -I $INSTALL_PATH/include -L $INSTALL_PATH/lib -R $INSTALL_PATH/lib && python3 setup.py install $PY_INST_USER | ||
EC=$? | ||
if [ $EC -ne 0 ]; then | ||
echo "Python module build failed!" | ||
exit $EC | ||
fi | ||
cd $basedir | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters