Skip to content

Commit

Permalink
windows: annotate pathcch dependency for pythoncore
Browse files Browse the repository at this point in the history
This dependency was added in Python 3.9 as part of
bpo-39401 / Git commit 6a65eba44bfd82ccc8bed4b5c6dd6637549955d5.

The backport to Python 3.8 introduced run-time sniffing of the
symbol to avoid the hard library dependency.

This commit adds pathcch as a dependency for pythoncore. No
attention is made to the Python version, effectively meaning we
now require Windows 8 since this library is only available on
Windows 8. I'm fine with not claiming support for Windows 7: that
makes our support story simpler.

This should fix issues with missing symbols for e.g.
PathCchCanonicalizeEx when relinking a new library from the PYTHON.json
metadata.
  • Loading branch information
indygreg committed Mar 3, 2021
1 parent c3fa21f commit f163c2e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cpython-windows/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1753,6 +1753,9 @@ def find_additional_dependencies(project: pathlib.Path):
{"name": "shlwapi", "system": True},
{"name": "version", "system": True},
{"name": "ws2_32", "system": True},
# pathcch is Windows 8+ only. Python 3.9 dropped support for Windows 7.
# So this dependency is technically incorrect on Python 3.8.
{"name": "pathcch", "system": True},
# In addition to the ones explicitly in the project, there are some
# implicit link libraries not present. We list those as well.
{"name": "Ole32", "system": True},
Expand Down
5 changes: 5 additions & 0 deletions docs/running.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ Linux system.
Windows
-------

Windows distributions require Windows 8 or Windows Server 2012 or newer. (The
official Python distributions support Windows 7 up to Python 3.8 and dropped
support for Windows 7 with Python 3.9. However, we've decided to drop
support for Windows 7 from our Windows distributions.)

Windows binaries have a dependency on the Microsoft Visual C++ Redistributable,
likely from MSVC 2015 (``vcruntime140.dll``). This dependency is not
provided in the distribution and will need to be provided by downstream
Expand Down

0 comments on commit f163c2e

Please sign in to comment.