Skip to content

Commit

Permalink
ci: run macOS wheel building from repo root
Browse files Browse the repository at this point in the history
Running some of these commands (notably `pytest`) from `python/finufft`
confuses the interpreter as it tries to look for `finufft.finufftc` in
the source directory (`python/finufft/finufft`) instead of
`site-packages`. This behavior seems to be related to replacing `imp`
with `importlib`. At any rate, the solution is to stay in the repo root
and run all the commands from there, prefixing with `python/finufft`
when necessary.
  • Loading branch information
janden committed Dec 19, 2023
1 parent 1b11576 commit fb9de11
Showing 1 changed file with 29 additions and 30 deletions.
59 changes: 29 additions & 30 deletions .github/workflows/python_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,74 +108,73 @@ jobs:
export FINUFFT_DIR=`pwd`
export CC=gcc-11
export CXX=g++-11
cd python/finufft
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -m pip install --upgrade setuptools wheel numpy pip
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -m pip install -U wheel --user
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -m pip wheel . -w wheelhouse
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -m pip wheel python/finufft -w wheelhouse
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -m pip install --upgrade setuptools wheel numpy pip
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -m pip install -U wheel --user
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -m pip wheel . -w wheelhouse
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -m pip wheel python/finufft -w wheelhouse
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -m pip install --upgrade setuptools wheel numpy pip
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -m pip install -U wheel --user
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -m pip wheel . -w wheelhouse
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -m pip wheel python/finufft -w wheelhouse
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -m pip install --upgrade setuptools wheel numpy pip
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -m pip install -U wheel --user
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -m pip wheel . -w wheelhouse
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -m pip wheel python/finufft -w wheelhouse
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 -m pip install --upgrade setuptools wheel numpy pip
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 -m pip install -U wheel --user
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 -m pip wheel . -w wheelhouse
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 -m pip wheel python/finufft -w wheelhouse
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -m pip install --upgrade setuptools wheel numpy pip
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -m pip install -U wheel --user
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -m pip wheel . -w wheelhouse
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -m pip wheel python/finufft -w wheelhouse
/Library/Frameworks/Python.framework/Versions/3.12/bin/python3 -m pip install --upgrade setuptools wheel numpy pip
/Library/Frameworks/Python.framework/Versions/3.12/bin/python3 -m pip install -U wheel --user
/Library/Frameworks/Python.framework/Versions/3.12/bin/python3 -m pip wheel . -w wheelhouse
/Library/Frameworks/Python.framework/Versions/3.12/bin/python3 -m pip wheel python/finufft -w wheelhouse
PYTHON_BIN=/Library/Frameworks/Python.framework/Versions/3.12/bin/
$PYTHON_BIN/python3 -m pip install delocate
ls wheelhouse/finufft*.whl | xargs -n1 $PYTHON_BIN/delocate-wheel -w fixed_wheel/
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -m pip install --pre finufft -f fixed_wheel/
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 test/run_accuracy_tests.py
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 examples/simple1d1.py
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 python/finufft/test/run_accuracy_tests.py
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 python/finufft/examples/simple1d1.py
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -m pip install pytest
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -m pytest test
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -m pytest python/finufft/test
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -m pip install --pre finufft -f fixed_wheel/
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 test/run_accuracy_tests.py
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 examples/simple1d1.py
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 python/finufft/test/run_accuracy_tests.py
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 python/finufft/examples/simple1d1.py
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -m pip install pytest
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -m pytest test
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -m pytest python/finufft/test
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -m pip install --pre finufft -f fixed_wheel/
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 test/run_accuracy_tests.py
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 examples/simple1d1.py
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 python/finufft/test/run_accuracy_tests.py
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 python/finufft/examples/simple1d1.py
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -m pip install pytest
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -m pytest test
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -m pytest python/finufft/test
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -m pip install --pre finufft -f fixed_wheel/
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 test/run_accuracy_tests.py
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 examples/simple1d1.py
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 python/finufft/test/run_accuracy_tests.py
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 python/finufft/examples/simple1d1.py
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -m pip install pytest
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -m pytest test
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -m pytest python/finufft/test
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 -m pip install --pre finufft -f fixed_wheel/
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 test/run_accuracy_tests.py
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 examples/simple1d1.py
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 python/finufft/test/run_accuracy_tests.py
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 python/finufft/examples/simple1d1.py
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 -m pip install pytest
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 -m pytest test
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 -m pytest python/finufft/test
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -m pip install --pre finufft -f fixed_wheel/
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 test/run_accuracy_tests.py
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 examples/simple1d1.py
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 python/finufft/test/run_accuracy_tests.py
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 python/finufft/examples/simple1d1.py
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -m pip install pytest
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -m pytest test
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -m pytest python/finufft/test
/Library/Frameworks/Python.framework/Versions/3.12/bin/python3 -m pip install --pre finufft -f fixed_wheel/
/Library/Frameworks/Python.framework/Versions/3.12/bin/python3 test/run_accuracy_tests.py
/Library/Frameworks/Python.framework/Versions/3.12/bin/python3 examples/simple1d1.py
/Library/Frameworks/Python.framework/Versions/3.12/bin/python3 python/finufft/test/run_accuracy_tests.py
/Library/Frameworks/Python.framework/Versions/3.12/bin/python3 python/finufft/examples/simple1d1.py
/Library/Frameworks/Python.framework/Versions/3.12/bin/python3 -m pip install pytest
/Library/Frameworks/Python.framework/Versions/3.12/bin/python3 -m pytest test
/Library/Frameworks/Python.framework/Versions/3.12/bin/python3 -m pytest python/finufft/test
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: macos-wheels
path: python/finufft/fixed_wheel/*.whl
path: fixed_wheel/*.whl

Windows:
runs-on: windows-latest
Expand Down

0 comments on commit fb9de11

Please sign in to comment.