-
Notifications
You must be signed in to change notification settings - Fork 16
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
Showing
2 changed files
with
29 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env python | ||
|
||
import os | ||
import re | ||
import glob | ||
import subprocess | ||
|
||
os.environ["CIBW_BUILD"] = "cp*-win_amd64" | ||
os.environ["CIBW_ARCHS_WINDOWS"] = "AMD64" | ||
|
||
rv = subprocess.call(["python", "-m", "cibuildwheel"]) | ||
if rv == 0: | ||
os.chdir("wheelhouse") | ||
wheels = glob.glob("*.whl") | ||
for wheel in wheels: | ||
print(" - %s" % wheel) | ||
# NOTE: cibuildwheel seemed to be formerly creating wheels labelled | ||
# as -win32, this conditional is to catch and correct this. | ||
if re.search("-win32.whl", wheel): | ||
wheel_corrected = re.sub("-win32.whl", "-win_amd64.whl", wheel) | ||
os.rename(wheel, wheel_corrected) | ||
wheel = wheel_corrected | ||
print(" - renamed to %s" % wheel) | ||
print(" - running delvewheel") | ||
subprocess.call(["python", "-m", "delvewheel", "repair", wheel, "--add-path", "dlls"]) | ||
else: | ||
print("Failed to run python -m cibuildwheel") |