Skip to content

Commit

Permalink
Merge pull request #165 from clemekay/main
Browse files Browse the repository at this point in the history
Add python version check to install script.
  • Loading branch information
jpmorgan98 authored Feb 28, 2024
2 parents 591689e + c46c8e2 commit 80bf7d7
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
#!/bin/bash


# Install MC/DC module
pip install -e .


# Install MC/DC dependencies, reply "y" to conda prompt
conda install numpy numba matplotlib scipy h5py pytest colorama <<< "y"

# Installing visualization dependencies (required via pip for osx-arm64)
pip install ngsolve distinctipy

bash patch_numba.sh
# Check python version
if ! { python3 -c 'import sys; assert sys.version_info < (3,12)' > /dev/null 2>&1 && python3 -c 'import sys; assert sys.version_info >= (3,9)' > /dev/null 2>&1; }; then
v=$(python3 --version)
p=$(which python)
echo "ERROR: Python version must be < 3.12 and >= 3.9."
echo " Found $v at $p."
echo "ERROR: Installation failed."
exit 1
fi

# Install or build mpi4py
if [ $# -eq 0 ]; then
Expand Down Expand Up @@ -44,3 +41,15 @@ while [ $# -gt 0 ]; do
shift
done

# Install MC/DC module
pip install -e .


# Install MC/DC dependencies, reply "y" to conda prompt
conda install numpy numba matplotlib scipy h5py pytest colorama <<< "y"

# Installing visualization dependencies (required via pip for osx-arm64)
pip install ngsolve distinctipy

bash patch_numba.sh

0 comments on commit 80bf7d7

Please sign in to comment.