Skip to content

Commit

Permalink
Attempt to fix custom auditwheel script
Browse files Browse the repository at this point in the history
  • Loading branch information
n-elie committed Feb 6, 2024
1 parent 6b4d036 commit f13d072
Showing 1 changed file with 35 additions and 27 deletions.
62 changes: 35 additions & 27 deletions scripts/custom-auditwheel.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,40 @@
#!/usr/bin/env python3
import sys

from pathlib import Path
import tempfile
import json
from auditwheel.main import main
from auditwheel.policy import _POLICIES as POLICIES


for p in POLICIES:
p['lib_whitelist'].extend([
'libpyside6.abi3.so.6.6',
'libpyside6.abi3.so.6.5',
'libpyside6.abi3.so.6.4',
'libpyside6.abi3.so.6.3',
'libshiboken6.abi3.so.6.6',
'libshiboken6.abi3.so.6.5',
'libshiboken6.abi3.so.6.4',
'libshiboken6.abi3.so.6.3',
'libQt6Widgets.so.6',
'libQt6Gui.so.6',
'libpyside6qml.abi3.so.6.6',
'libpyside6qml.abi3.so.6.5',
'libpyside6qml.abi3.so.6.4',
'libpyside6qml.abi3.so.6.3',
'libGLX.so.0',
'libOpenGL.so.0',
'libQt6Core.so.6',
'libxcb.so.1',
])
from auditwheel.policy import _POLICY_JSON_MAP as POLICY_JSON_MAP


if __name__ == "__main__":
sys.exit(main())
tmpdir = tempfile.TemporaryDirectory()
tmppath = pathlib.Path(tmpdir.name)
for libc in POLICY_JSON_MAP:
p = json.loads(POLICY_JSON_MAP[libc].read_text())
p['lib_whitelist'].extend([
'libpyside6.abi3.so.6.6',
'libpyside6.abi3.so.6.5',
'libpyside6.abi3.so.6.4',
'libpyside6.abi3.so.6.3',
'libshiboken6.abi3.so.6.6',
'libshiboken6.abi3.so.6.5',
'libshiboken6.abi3.so.6.4',
'libshiboken6.abi3.so.6.3',
'libQt6Widgets.so.6',
'libQt6Gui.so.6',
'libpyside6qml.abi3.so.6.6',
'libpyside6qml.abi3.so.6.5',
'libpyside6qml.abi3.so.6.4',
'libpyside6qml.abi3.so.6.3',
'libGLX.so.0',
'libOpenGL.so.0',
'libQt6Core.so.6',
'libxcb.so.1',
])
fname = tmppath / libc.name + "-policy.json"
with open(fname, "w") as f:
json.dump(p, f)
POLICY_JSON_MAP[libc] = fname

main()
tmpdir.cleanup()

0 comments on commit f13d072

Please sign in to comment.