Skip to content

Commit 8d2c57b

Browse files
committed
Get python-patch-ng to provide patch.exe on windows
1 parent 9a01e25 commit 8d2c57b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

scripts/wheelbuilder/build_wheels.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ def create_venv():
101101
subprocess.check_call([binary, "-m", "venv", "graalpy"])
102102
print("Installing wheel with", pip, flush=True)
103103
subprocess.check_call([pip, "install", "wheel"])
104+
if sys.platform == "win32":
105+
print("Installing python-patch-ng to provide patch.exe", flush=True)
106+
p = subprocess.run([pip, "install", "git+https://github.com/timfel/python-patch-ng.git"])
107+
if p.returncode == 0:
108+
os.environ["PATH"] += f";{abspath(dirname(pip))}"
109+
else:
110+
print("Installing python-patch-ng failed, assuming patch.exe is on PATH", flush=True)
104111
return pip
105112

106113

0 commit comments

Comments
 (0)