8000 windows: remove copy instructions for libffi .dll and .pdb files · adiantek/python-build-standalone@30f1400 · GitHub
[go: up one dir, main page]

Skip to content

Commit 30f1400

Browse files
committed
windows: remove copy instructions for libffi .dll and .pdb files
These commands were changed in CPython 3.9.7 and are now more stri 8000 ct about their behavior. To compensate for that, we need to patch the batch script. This should restore working CPython 3.9 Windows static builds.
1 parent 48f899a commit 30f1400

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

cpython-windows/build.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1550,6 +1550,22 @@ def build_libffi(
15501550
b"--build=$BUILD --host=$HOST --disable-shared;",
15511551
)
15521552

1553+
# Remove references to copying .dll and .pdb files.
1554+
try:
1555+
static_replace_in_file(
1556+
prepare_libffi,
1557+
b"copy %ARTIFACTS%\.libs\libffi-*.dll %_LIBFFI_OUT% || exit /B 1",
1558+
b"",
1559+
)
1560+
static_replace_in_file(
1561+
prepare_libffi,
1562+
b"copy %ARTIFACTS%\.libs\libffi-*.lib %_LIBFFI_OUT% || exit /B 1",
1563+
b"",
1564+
)
1565+
except NoSearchStringError:
1566+
# This patch is only needed on CPython 3.9+.
1567+
pass
1568+
15531569
env = dict(os.environ)
15541570
env["LIBFFI_SOURCE"] = str(ffi_source_path)
15551571
env["VCVARSALL"] = str(find_vcvarsall_path())

0 commit comments

Comments
 (0)
0