Skip to content

Commit 43c1b04

Browse files
committed
windows: normalize "Include" to "include"
See the inline comment and linked Python issue. The misreporting of the include path is preventing PyOxidizer from properly loading Windows distributions on case sensitive filesystems.
1 parent 51a442d commit 43c1b04

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cpython-windows/generate_metadata.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@
3232
root = os.environ["ROOT"]
3333
for name, path in sysconfig.get_paths().items():
3434
rel = os.path.relpath(path, root).replace("\\", "/")
35+
36+
# sysconfig on Windows reports the include path as "Include" but
37+
# in reality it is "include." See https://bugs.python.org/issue41669.
38+
# So we normalize accordingly.
39+
rel = rel.replace("install/Include", "install/include")
40+
3541
metadata["python_paths"][name] = rel
3642

3743
with open(sys.argv[1], "w") as fh:

0 commit comments

Comments
 (0)