Skip to content

Commit

Permalink
For now, import CasADi, don't use importlib
Browse files Browse the repository at this point in the history
  • Loading branch information
agriyakhetarpal committed Feb 24, 2024
1 parent 55aeb4a commit fa6e94f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
CIBW_BEFORE_BUILD_LINUX: python -m pip install casadi
# override; point to Python's CasADi install path so that it can be found by the repair command
CIBW_REPAIR_WHEEL_COMMAND_LINUX: >
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$(python -c 'import importlib.util; print(next(iter(importlib.util.find_spec('casadi').submodule_search_locations)))')" auditwheel repair -w {dest_dir} {wheel}
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$(python -c 'import casadi; print(casadi.__path__[0])')" auditwheel repair -w {dest_dir} {wheel}
CIBW_TEST_COMMAND: python -c "import pybamm; pybamm.IDAKLUSolver()"

- name: Build wheels on macOS amd64
Expand All @@ -139,7 +139,7 @@ jobs:
env:
CIBW_BEFORE_BUILD_MACOS: python -m pip install casadi && python scripts/fix_casadi_rpath_mac.py
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$(python -c 'import importlib.util; print(next(iter(importlib.util.find_spec('casadi').submodule_search_locations)))')" delocate-listdeps {wheel} && delocate-wheel -v -w {dest_dir} {wheel}
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$(python -c 'import casadi; print(casadi.__path__[0])')" delocate-listdeps {wheel} && delocate-wheel -v -w {dest_dir} {wheel}
CIBW_TEST_COMMAND: python -c "import pybamm; pybamm.IDAKLUSolver()"

- name: Upload wheels for Linux
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
env:
CIBW_BEFORE_BUILD_MACOS: python scripts/fix_casadi_rpath_mac.py
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$(python -c 'import importlib.util; print(next(iter(importlib.util.find_spec('casadi').submodule_search_locations)))')" delocate-listdeps {wheel} && delocate-wheel -v -w {dest_dir} {wheel}
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$(python -c 'import casadi; print(casadi.__path__[0])')" delocate-listdeps {wheel} && delocate-wheel -v -w {dest_dir} {wheel}
CIBW_TEST_COMMAND: python -c "import pybamm; pybamm.IDAKLUSolver()"

- name: Upload wheels for macOS arm64
Expand Down

0 comments on commit fa6e94f

Please sign in to comment.