Skip to content

Commit c53d127

Browse files
committed
docs: document Windows static distribution quirks
1 parent 306d824 commit c53d127

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

docs/quirks.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,33 @@ To use pip, run ``python.exe -m pip``. (It is generally a best practice to
157157
invoke pip via ``python -m pip`` on all platforms so you can be explicit
158158
about the ``python`` executable that pip uses.)
159159

160+
.. _quirk_windows_static_distributions:
161+
162+
Windows Static Distributions are Extremely Brittle
163+
==================================================
164+
165+
This project produces statically linked CPython distributions for Windows.
166+
167+
Building these distributions requires extensive patching of CPython's build
168+
system. There are many aspects of CPython, the standard library, and 3rd party
169+
libraries that make assumptions that things will be built as dynamic libraries
170+
and break in these static builds.
171+
172+
Here is a list of known problems:
173+
174+
* Most Windows extension modules link against ``pythonXY.dll`` (e.g.
175+
``python39.dll``) or ``python3.dll`` and will fail to load on the static
176+
distributions. Extension modules will need to be explicitly recompiled
177+
against the static distribution.
178+
* There is no supported *platform tag* for Windows static distributions and
179+
therefore there is no supported way to distribute binary wheels targeting
180+
the Python static distributions.
181+
* Aspects of OpenSSL (and therefore Python's ``ssl`` module) don't work when
182+
OpenSSL is compiled/linked statically. You will get opaque run-time errors.
183+
184+
It is **highly** recommended to extensively test your application against the
185+
static Windows distributions to ensure it works.
186+
160187
.. _quirk_macos_linking:
161188

162189
Linking Static Library on macOS

0 commit comments

Comments
 (0)