-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
08023e4
commit 4e16a04
Showing
3 changed files
with
19 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
import os | ||
import sys | ||
|
||
from auditwheel.main import main | ||
from auditwheel.policy import _POLICIES as POLICIES | ||
import unittest.mock | ||
from auditwheel.policy import WheelPolicies | ||
from auditwheel.lddtree import lddtree | ||
|
||
ldd_tree = lddtree('_skbuild/linux-x86_64-3.11/cmake-install/cv2/cv2.abi3.so') | ||
exclude_libs = [x for x in ldd_tree['libs'].keys() if not x.startswith('libopencv_')] | ||
|
||
for p in POLICIES: | ||
for lib in exclude_libs: | ||
p['lib_whitelist'].append(lib) | ||
class _WheelPolicies(WheelPolicies): | ||
def __init__(self, *args, **kwargs): | ||
super().__init__(*args, **kwargs) | ||
for p in self._policies: | ||
for lib in exclude_libs: | ||
p['lib_whitelist'].append(lib) | ||
|
||
if __name__ == "__main__": | ||
sys.exit(main()) | ||
with unittest.mock.patch('auditwheel.policy.WheelPolicies', _WheelPolicies): | ||
from auditwheel.main import main | ||
sys.exit(main()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters