Add macOS-latest to test-python.
@@ -207,8 +207,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
- os: [ubuntu-latest, windows-latest]
- python: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9"]
+ os: [ubuntu-latest, windows-latest, macOS-latest]
+ python: ["3.5", "3.6", "3.7", "3.8", "3.9"]
steps:
- uses: actions/checkout@v2
@@ -229,7 +229,11 @@ jobs:
find . -name "*$(python -c "import platform; print(''.join(platform.python_version_tuple()[0:2]))")*linux*.whl" -exec python -m pip install {} \;
elif [ "$RUNNER_OS" == "macOS" ]; then
find . -name "*$(python -c "import platform; print(''.join(platform.python_version_tuple()[0:2]))")*macosx*.whl" -exec python -m pip install {} \;
- find $(python -c "import site; print(site.getsitepackages()[0])") -name '*tinysplinepython*' -exec install_name_tool -add_rpath $(dirname $(dirname $(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())"))) {} \;
+ rpath=$(dirname $(dirname $(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")))
+ find $(python -c "import site; print(site.getsitepackages()[0])") -name '*tinysplinepython*' -exec install_name_tool -add_rpath ${rpath} {} \;
+ if [ ! -e ${rpath}/Python ]; then
+ ln -s lib/libpython$(python -c "import platform; print('.'.join(platform.python_version_tuple()[0:2]))").dylib ${rpath}/Python
+ fi
elif [ "$RUNNER_OS" == "Windows" ]; then
find . -name "*$(python -c "import platform; print(''.join(platform.python_version_tuple()[0:2]))")*win*.whl" -exec python -m pip install {} \;
fi
