Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script for OSX wheels building #2526

Merged
merged 3 commits into from
Sep 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions build_osx_wheels.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env bash

# This script assumes that you have the prerequisites already installed
# See https://nrn.readthedocs.io/en/latest/install/python_wheels.html#installing-macos-prerequisites
#
# If you want the script to check the nrniv output (for version string checking), set the following environment variable
# Note that this will require manual intervention during script execution
#
# export INTERACTIVE_OK=yes

set -x

export BREW_PREFIX=$(brew --prefix)
export PATH=/opt/homebrew/opt/bison/bin:/opt/homebrew/opt/flex/bin:$PATH

export NRN_RELEASE_UPLOAD=false
export NRN_NIGHTLY_UPLOAD=false
export NEURON_NIGHTLY_TAG=""

export SKIP_EMBEDED_PYTHON_TEST=true

if [ -n $1 ]
then
# example: 9.0a
export SETUPTOOLS_SCM_PRETEND_VERSION=$1
fi

set -e

packaging/python/build_wheels.bash osx 3.9 coreneuron &>3.9-output
packaging/python/build_wheels.bash osx 3.10 coreneuron &>3.10-output
packaging/python/build_wheels.bash osx 3.11 coreneuron &>3.11-output

if [ -n $INTERACTIVE_OK ]
then
for py in 9 10 11
do
python3.${py} -m venv venv3.${py}
venv3.${py}/bin/pip install wheelhouse/NEURON-${1}-cp3${py}-cp3${py}-macosx_11_0_arm64.whl
venv3.${py}/bin/nrniv
done
fi

bash packaging/python/test_wheels.sh python3.9 wheelhouse/NEURON-*-cp39*.whl true &>3.9-test-output
bash packaging/python/test_wheels.sh python3.10 wheelhouse/NEURON-*-cp310*.whl true &>3.10-test-output
bash packaging/python/test_wheels.sh python3.11 wheelhouse/NEURON-*-cp311*.whl true &>3.11-test-output
nrnhines marked this conversation as resolved.
Show resolved Hide resolved