Skip to content

Commit

Permalink
Update auditwheel command to use --exclude (#132)
Browse files Browse the repository at this point in the history
The internal structure of auditwheel has changed with the 6.0.0 release, causing our current script to break:

```
Traceback (most recent call last):
  File "/home/runner/work/jpy/jpy/.github/env/Linux/auditwheel-keep-libjvm.py", line 4, in <module>
    from auditwheel.policy import _POLICIES
ImportError: cannot import name '_POLICIES' from 'auditwheel.policy' (/opt/hostedtoolcache/Python/3.12.2/x64/lib/python3.12/site-packages/auditwheel/policy/__init__.py)
```

This PR fixes that by relying on the command line `--exclude` flag.

Very similar to PR from deephaven/deephaven-server-docker#83

https://github.com/pypa/auditwheel/releases/tag/6.0.0
  • Loading branch information
devinrsmith committed Mar 12, 2024
1 parent 1331a91 commit 03e5316
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
11 changes: 0 additions & 11 deletions .github/env/Linux/auditwheel-keep-libjvm.py

This file was deleted.

3 changes: 2 additions & 1 deletion .github/env/Linux/bdist-wheel.sh
Expand Up @@ -12,9 +12,10 @@ python -m pip install -r "${__dir}/requirements.txt"
python setup.py bdist_wheel --dist-dir dist.linux

# Note: auditwheel only works with a single file argument - we are relying on finding exactly one wheel
python "${__dir}/auditwheel-keep-libjvm.py" \
auditwheel \
repair \
--plat "manylinux_2_17_$(arch)" \
--only-plat \
--exclude libjvm.so \
--wheel-dir dist/ \
dist.linux/*
4 changes: 3 additions & 1 deletion .github/env/Linux/requirements.txt
@@ -1,4 +1,6 @@
setuptools
wheel
auditwheel
auditwheel>=6.0.0; python_version >= '3.8'
auditwheel>=5.4.0; python_version == '3.7'
auditwheel>=5.3.0; python_version == '3.6'
patchelf

0 comments on commit 03e5316

Please sign in to comment.