Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Windows CI binary build fix #417

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions scripts/fix_wheel.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import pathlib
import shutil
import subprocess
from glob import glob
Expand Down Expand Up @@ -50,6 +51,18 @@
if not found_wheel_tag:
raise RuntimeError("Could not find WHEEL tag")

# On Windows due to setuptools-rust changing how the pyd file is named, we
# are renaming it back.
# https://github.com/PyO3/setuptools-rust/pull/352#discussion_r1293444464
# explains our exact situation, but no clear remedy.
# TODO(cretz): Investigate as part of https://github.com/temporalio/sdk-python/issues/398
pyd_files = glob("dist/temp/*/temporalio/bridge/*-win_amd64.pyd")
if pyd_files:
os.rename(
pyd_files[0],
pathlib.Path(pyd_files[0]).with_name("temporal_sdk_bridge.pyd"),
)

# Write the WHEEL file
with open(wheel_files[0], "w") as f:
f.write("\n".join(wheel_lines))
Expand Down
Loading