Skip to content

Commit 257f5b3

Browse files
Merge pull request #5 from Accelergy-Project/copilot/fix-auditwheel-repair-issue
Fix auditwheel repair: move compiled binary to platlib in wheel
2 parents abf032e + 413f275 commit 257f5b3

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

setup.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,17 @@ def finalize_options(self):
3030
super().finalize_options()
3131
self.root_is_pure = False
3232

33+
def run(self):
34+
# Temporarily pretend we have ext_modules so that install_lib places
35+
# files in platlib (the wheel root with Root-Is-Purelib: false) rather
36+
# than in {dist_info}.data/purelib/ which auditwheel rejects.
37+
orig = self.distribution.has_ext_modules
38+
self.distribution.has_ext_modules = lambda: True
39+
try:
40+
super().run()
41+
finally:
42+
self.distribution.has_ext_modules = orig
43+
3344
def get_tag(self):
3445
_, _, plat = super().get_tag()
3546
return "py3", "none", plat

0 commit comments

Comments
 (0)