Skip to content

Commit

Permalink
Merge branch 'main' of github.com:onera/Cassiopee
Browse files Browse the repository at this point in the history
  • Loading branch information
antjost committed Sep 3, 2024
2 parents a085bba + b1ccc55 commit 0872db2
Show file tree
Hide file tree
Showing 24 changed files with 278 additions and 68 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install wheel setuptools scons numpy mpi4py
pip install wheel twine setuptools scons numpy mpi4py
- name: Verify Python and Installed Packages
run: |
Expand All @@ -56,18 +56,17 @@ jobs:
. $CASSIOPEE/Cassiopee/Envs/sh_Cassiopee_r8
cd $CASSIOPEE/Cassiopee
echo -e "FREEMODULES='KCore XCore Converter Geom Transform Generator Post Initiator Connector Distributor2 Dist2Walls RigidMotion Compressor Modeler Intersector Apps CPlot'\nexport FREEMODULES\nFULLMODULES='KCore XCore Converter Geom Transform Generator Post Initiator Connector Distributor2 Dist2Walls RigidMotion Compressor Modeler Intersector Apps CPlot'\nexport FULLMODULES\nOTHERS=''" > $CASSIOPEE/Cassiopee/MODULES
echo "PATH: $PATH"
echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH"
echo "PYTHONPATH: $PYTHONPATH"
./install
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
find $CASSIOPEE -name "*.whl"
# find $CASSIOPEE -name "*.whl" -exec twine upload {} +
export CASSIOPEE=$GITHUB_WORKSPACE
export MACHINE=azure
. $CASSIOPEE/Cassiopee/Envs/sh_Cassiopee_r8
find $CASSIOPEE/Dist/bin/$ELSAPROD/pip-ephem-wheel-cache-* -type f -name "*.whl" -exec twine upload {} +
# publish:
# runs-on: ubuntu-latest
Expand Down
12 changes: 10 additions & 2 deletions Cassiopee/Apps/install
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ else
echo 'install <dir>: install in directory <dir>.'
exit 1
fi
if [ -z "${CLEAN_WHEELS_CASSIOPEE+x}" ]; then
CLEAN_WHEELS_CASSIOPEE=1
fi

# if specific python exe name
if [ "$PYTHONEXE" != "" ]; then
Expand All @@ -35,13 +38,18 @@ if [ "$PRODMODE" = "" ]; then
fi

# Compilation et installation
if [ $PRODMODE -eq 0 ] || [ $PRODMODE -eq 2 ]; then
if [ $PRODMODE -eq 0 ]; then
python setup.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 1 ]; then
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
TMPDIR=$INSTALLPATH python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" --no-clean .
[ $? != 0 ] && exit 1;
fi

# Clean temporary folder containing wheels
if [ "$CLEAN_WHEELS_CASSIOPEE" -eq 1 ]; then
rm -rf "$INSTALLPATH"/pip-*
fi

# Check installation
python test/t1.py
11 changes: 10 additions & 1 deletion Cassiopee/CPlot/install
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ else
echo 'install <dir>: install in directory <dir>.'
exit 1
fi
if [ -z "${CLEAN_WHEELS_CASSIOPEE+x}" ]; then
CLEAN_WHEELS_CASSIOPEE=1
fi

# if specific python exe name
if [ "$PYTHONEXE" != "" ]; then
Expand Down Expand Up @@ -62,13 +65,19 @@ if [ $PRODMODE -le 1 ]; then
python setup.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 1 ]; then
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
TMPDIR=$INSTALLPATH python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" --no-clean .
[ $? != 0 ] && exit 1;
fi
else
python setupLegacy.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
fi

# Clean temporary folder containing wheels
if [ "$CLEAN_WHEELS_CASSIOPEE" -eq 1 ]; then
rm -rf "$INSTALLPATH"/pip-*
fi

cp test/cplot "$INSTALLPATH"
cp test/cplot.py "$INSTALLPATH"
# Copie les applications
Expand Down
10 changes: 9 additions & 1 deletion Cassiopee/Compressor/install
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ else
echo 'install <dir>: install in directory <dir>.'
exit 1
fi
if [ -z "${CLEAN_WHEELS_CASSIOPEE+x}" ]; then
CLEAN_WHEELS_CASSIOPEE=1
fi

# if specific python exe name
if [ "$PYTHONEXE" != "" ]; then
Expand Down Expand Up @@ -61,13 +64,18 @@ if [ $PRODMODE -le 1 ]; then
python setup.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 1 ]; then # pip+wheel
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
TMPDIR=$INSTALLPATH python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" --no-clean .
[ $? != 0 ] && exit 1;
fi
else
python setupLegacy.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
fi

# Clean temporary folder containing wheels
if [ "$CLEAN_WHEELS_CASSIOPEE" -eq 1 ]; then
rm -rf "$INSTALLPATH"/pip-*
fi

# Test l'installation
python test/t1.py
10 changes: 9 additions & 1 deletion Cassiopee/Connector/install
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ else
echo 'install <dir>: install in directory <dir>.'
exit 1
fi
if [ -z "${CLEAN_WHEELS_CASSIOPEE+x}" ]; then
CLEAN_WHEELS_CASSIOPEE=1
fi

# if specific python exe name
if [ "$PYTHONEXE" != "" ]; then
Expand Down Expand Up @@ -62,14 +65,19 @@ if [ $PRODMODE -le 1 ]; then
python setup.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 1 ]; then # pip+wheel
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
TMPDIR=$INSTALLPATH python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" --no-clean .
[ $? != 0 ] && exit 1;
fi
else
python setupLegacy.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
fi

# Clean temporary folder containing wheels
if [ "$CLEAN_WHEELS_CASSIOPEE" -eq 1 ]; then
rm -rf "$INSTALLPATH"/pip-*
fi

# Install libconnector
python installLib.py

Expand Down
11 changes: 10 additions & 1 deletion Cassiopee/Converter/install
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ else
echo 'install <dir>: install in directory <dir>.'
exit 1
fi
if [ -z "${CLEAN_WHEELS_CASSIOPEE+x}" ]; then
CLEAN_WHEELS_CASSIOPEE=1
fi

# if specific python exe name
if [ "$PYTHONEXE" != "" ]; then
Expand Down Expand Up @@ -62,13 +65,19 @@ if [ $PRODMODE -le 1 ]; then
python setup.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 1 ]; then
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
TMPDIR=$INSTALLPATH python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" --no-clean .
[ $? != 0 ] && exit 1;
fi
else
python setupLegacy.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
fi

# Clean temporary folder containing wheels
if [ "$CLEAN_WHEELS_CASSIOPEE" -eq 1 ]; then
rm -rf "$INSTALLPATH"/pip-*
fi

cp test/ediff "$INSTALLPATH"
cp test/ediff.py "$INSTALLPATH"
cp Converter/kpython "$INSTALLPATH"
Expand Down
10 changes: 9 additions & 1 deletion Cassiopee/Dist2Walls/install
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ else
echo 'install <dir>: install in directory <dir>.'
exit 1
fi
if [ -z "${CLEAN_WHEELS_CASSIOPEE+x}" ]; then
CLEAN_WHEELS_CASSIOPEE=1
fi

# if specific python exe name
if [ "$PYTHONEXE" != "" ]; then
Expand Down Expand Up @@ -59,13 +62,18 @@ if [ $PRODMODE -le 1 ]; then
python setup.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 1 ]; then
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
TMPDIR=$INSTALLPATH python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" --no-clean .
[ $? != 0 ] && exit 1;
fi
else
python setupLegacy.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
fi

# Clean temporary folder containing wheels
if [ "$CLEAN_WHEELS_CASSIOPEE" -eq 1 ]; then
rm -rf "$INSTALLPATH"/pip-*
fi

# Test l'installation
python test/t1.py
10 changes: 9 additions & 1 deletion Cassiopee/Distributor2/install
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ else
echo 'install <dir>: install in directory <dir>.'
exit 1
fi
if [ -z "${CLEAN_WHEELS_CASSIOPEE+x}" ]; then
CLEAN_WHEELS_CASSIOPEE=1
fi

# if specific python exe name
if [ "$PYTHONEXE" != "" ]; then
Expand Down Expand Up @@ -62,13 +65,18 @@ if [ $PRODMODE -le 2 ]; then
python setup.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 1 ]; then
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
TMPDIR=$INSTALLPATH python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" --no-clean .
[ $? != 0 ] && exit 1;
fi
else
python setupLegacy.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
fi

# Clean temporary folder containing wheels
if [ "$CLEAN_WHEELS_CASSIOPEE" -eq 1 ]; then
rm -rf "$INSTALLPATH"/pip-*
fi

# Test installation
python test/t1.py
2 changes: 2 additions & 0 deletions Cassiopee/Envs/env_Cassiopee_local
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ else
endif
set EXT=$INTTYPE$DBGMODE

set CLEAN_WHEELS_CASSIOPEE=1

# ----------------------------- Prods ------------------------------------------

if ($MAC == "ld_pgi") then
Expand Down
2 changes: 2 additions & 0 deletions Cassiopee/Envs/sh_Cassiopee_local
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ case $MACHINETMP in
esac
unset MACHINETMP
EXT=$INTTYPE$DBGMODE
export CLEAN_WHEELS_CASSIOPEE=1

# ----------------------------- Prods ------------------------------------------
if [ "$MAC" = "ld_eos8" ]; then
Expand Down Expand Up @@ -165,6 +166,7 @@ elif [ "$MAC" = "azure" ]; then
export PYTHONEXE=python3
export PRODMODE=1
export PIP_DISABLE_PIP_VERSION_CHECK=1
export CLEAN_WHEELS_CASSIOPEE=0

elif [ "$MAC" = "visio" ]; then
#----------------------------- visio -----------------------------------------
Expand Down
10 changes: 9 additions & 1 deletion Cassiopee/Generator/install
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ else
echo 'install <dir>: install in directory <dir>.'
exit 1
fi
if [ -z "${CLEAN_WHEELS_CASSIOPEE+x}" ]; then
CLEAN_WHEELS_CASSIOPEE=1
fi

# if specific python exe name
if [ "$PYTHONEXE" != "" ]; then
Expand Down Expand Up @@ -61,14 +64,19 @@ if [ $PRODMODE -le 1 ]; then
python setup.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 1 ]; then
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
TMPDIR=$INSTALLPATH python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" --no-clean .
[ $? != 0 ] && exit 1;
fi
else
python setupLegacy.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
fi

# Clean temporary folder containing wheels
if [ "$CLEAN_WHEELS_CASSIOPEE" -eq 1 ]; then
rm -rf "$INSTALLPATH"/pip-*
fi

# Install libgenerator
python installLib.py

Expand Down
10 changes: 9 additions & 1 deletion Cassiopee/Geom/install
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ else
echo 'install <dir>: install in directory <dir>.'
exit 1
fi
if [ -z "${CLEAN_WHEELS_CASSIOPEE+x}" ]; then
CLEAN_WHEELS_CASSIOPEE=1
fi

# if specific python exe name
if [ "$PYTHONEXE" != "" ]; then
Expand Down Expand Up @@ -62,13 +65,18 @@ if [ $PRODMODE -le 1 ]; then
python setup.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 1 ]; then
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
TMPDIR=$INSTALLPATH python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" --no-clean .
[ $? != 0 ] && exit 1;
fi
else
python setupLegacy.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
fi

# Clean temporary folder containing wheels
if [ "$CLEAN_WHEELS_CASSIOPEE" -eq 1 ]; then
rm -rf "$INSTALLPATH"/pip-*
fi

# Test l'installation
python test/t1.py
10 changes: 9 additions & 1 deletion Cassiopee/Initiator/install
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ else
echo 'install <dir>: install in directory <dir>.'
exit 1
fi
if [ -z "${CLEAN_WHEELS_CASSIOPEE+x}" ]; then
CLEAN_WHEELS_CASSIOPEE=1
fi

# if specific python exe name
if [ "$PYTHONEXE" != "" ]; then
Expand Down Expand Up @@ -62,13 +65,18 @@ if [ $PRODMODE -le 1 ]; then
python setup.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 1 ]; then
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
TMPDIR=$INSTALLPATH python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" --no-clean .
[ $? != 0 ] && exit 1;
fi
else
python setupLegacy.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
fi

# Clean temporary folder containing wheels
if [ "$CLEAN_WHEELS_CASSIOPEE" -eq 1 ]; then
rm -rf "$INSTALLPATH"/pip-*
fi

# Test installation
python test/t1.py
12 changes: 10 additions & 2 deletions Cassiopee/Intersector/install
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ else
echo 'install <dir>: install in directory <dir>.'
exit 1
fi
if [ -z "${CLEAN_WHEELS_CASSIOPEE+x}" ]; then
CLEAN_WHEELS_CASSIOPEE=1
fi

# if specific python exe name
if [ "$PYTHONEXE" != "" ]; then
Expand Down Expand Up @@ -61,14 +64,19 @@ if [ $PRODMODE -le 1 ]; then
if [ $PRODMODE -eq 0 ]; then
python setup.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 2 ]; then
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
elif [ $PRODMODE -eq 1 ]; then
TMPDIR=$INSTALLPATH python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" --no-clean .
[ $? != 0 ] && exit 1;
fi
else
python setupLegacy.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
fi

# Clean temporary folder containing wheels
if [ "$CLEAN_WHEELS_CASSIOPEE" -eq 1 ]; then
rm -rf "$INSTALLPATH"/pip-*
fi

# Test l'installation
python test/t1.py
Loading

0 comments on commit 0872db2

Please sign in to comment.