From 8f28f20d5bb5cbcd0e58caa65891bd76b80bf583 Mon Sep 17 00:00:00 2001 From: Marton Lajer Date: Thu, 8 Aug 2024 12:13:38 -0400 Subject: [PATCH] Fixed wheel generation --- requirements.txt | 2 +- scripts/install-deps.sh | 46 ++++++++++++++++++++++++++++------------- 2 files changed, 33 insertions(+), 15 deletions(-) diff --git a/requirements.txt b/requirements.txt index f72de67e..3baf7c86 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # List required packages in this file, one per line. -numpy +numpy<2 scipy sympy matplotlib diff --git a/scripts/install-deps.sh b/scripts/install-deps.sh index ad919dc9..65e9af1b 100755 --- a/scripts/install-deps.sh +++ b/scripts/install-deps.sh @@ -2,29 +2,47 @@ set -vxeuo pipefail -sudo apt-get update -y -sudo apt-get install -y \ - gfortran \ - openmpi-bin \ - openmpi-doc \ - libopenmpi-dev \ - libopenblas-dev \ - libarpack2-dev \ - libparpack2-dev +platform="$(uname)" + +if [ "${platform}" == "Linux" ]; then + # sudo apt-get update -y + # sudo apt-get install -y \ + # gfortran \ + # openmpi-bin \ + # openmpi-doc \ + # libopenmpi-dev \ + # libopenblas-dev \ + # libarpack2-dev \ + # libparpack2-dev + echo "Skipping system packages installation in favor of conda packages for building." +elif [ "${platform}" == "Darwin" ]; then + echo "gfortran is expected to exist already." +fi + +gfortran --version +which gfortran # These packages are installed in the base environment but may be older # versions. Explicitly upgrade them because they often create # installation problems if out of date. +which python +python -VV + python -m pip install --upgrade pip setuptools wheel numpy -# # Generate .whl file. -python setup.py sdist bdist_wheel +# Generate .whl file. +if [ "${platform}" == "Linux" ]; then + python setup.py sdist bdist_wheel --plat-name=manylinux2014_x86_64 +else + python setup.py sdist bdist_wheel +fi +ls -la dist/ # Install this package and the packages listed in requirements.txt. -pip install -v . +python -m pip install dist/edrixs-*-cp${PYTHON_VERSION_NODOT}*.whl # Install extra requirements for running tests and building docs. -pip install -r requirements-dev.txt +python -m pip install -r requirements-dev.txt # List the depencencies -pip list +python -m pip list