Skip to content

Commit e0b7c04

Browse files
committed
[feature] Extract fenics-ufl from dune.module for consistency.
1 parent 8955c2a commit e0b7c04

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

testing/femdgSourceNoVenv.sh

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,38 @@ export DUNE_ENABLE_PYTHONMODULE_PRECOMPILE=ON
77
PYTHON_INTERP=`which python3`
88
#PYTHON_INTERP=/usr/bin/python3
99

10+
cd ../repos
11+
1012
# install missing python packages in users local environment
1113
# Note: wheel and setuptools may not be required
1214
# we only do this for Mac OS, ubuntu has the necessary packages installed
1315
if [ "$3" == "macOS" ]; then
16+
# extract fenics-ufl version from dune-fem/dune.module for consistency
17+
FENICSUFL=""
18+
# first entry is Python-Requires:
19+
pos=2
20+
while [ $pos -lt 15 ]
21+
do
22+
FENICSUFL=`grep "fenics-ufl" dune-fem/dune.module | cut -d " " -f $pos`
23+
CHECKUFL=`echo $FENICSUFL | grep "fenics"`
24+
if [ "$CHECKUFL" == "" ]; then
25+
((pos++))
26+
else
27+
break
28+
fi
29+
done
30+
31+
if [ "$FENICSUFL" == "" ]; then
32+
echo "fenics version not found in dune-fem/dune.module!"
33+
exit 1
34+
fi
35+
1436
# dune-common dependencies
1537
$PYTHON_INTERP -m pip install --user --break-system-packages -U jinja2 wheel setuptools mpi4py numpy ninja
1638
# dune-fem dependencies
17-
$PYTHON_INTERP -m pip install --user --break-system-packages -U scipy fenics-ufl==2022.2.0 matplotlib
39+
$PYTHON_INTERP -m pip install --user --break-system-packages -U scipy $FENICSUFL matplotlib
1840
fi
1941

20-
cd ../repos
21-
2242
FLAGS="-O3 -DNDEBUG"
2343
BUILDDIR=build-cmake
2444

0 commit comments

Comments
 (0)