Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-100008: Document Python build requirements #100009

Merged
merged 1 commit into from
Dec 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions Doc/using/configure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,46 @@
Configure Python
****************

Build Requirements
==================

Features required to build CPython:

* A `C11 <https://en.cppreference.com/w/c/11>`_ compiler. `Optional C11
features
<https://en.wikipedia.org/wiki/C11_(C_standard_revision)#Optional_features>`_
are not required.

* Support for `IEEE 754 <https://en.wikipedia.org/wiki/IEEE_754>`_ floating
point numbers and `floating point Not-a-Number (NaN)
<https://en.wikipedia.org/wiki/NaN#Floating_point>`_.

* Support for threads.

* OpenSSL 1.1.1 or newer for the :mod:`ssl` and :mod:`hashlib` modules.

* On Windows, Microsoft Visual Studio 2017 or later is required.

.. versionchanged:: 3.11
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The requirement for VS 2017 is new in 3.11 also.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, I didn't know. I failed to find any document about this change.

I created PR #100045 to document it.

C11 compiler, IEEE 754 and NaN support are now required.

.. versionchanged:: 3.10
OpenSSL 1.1.1 is now required.

.. versionchanged:: 3.7
Thread support and OpenSSL 1.0.2 are now required.

.. versionchanged:: 3.6
Selected C99 features are now required, like ``<stdint.h>`` and ``static
inline`` functions.

.. versionchanged:: 3.5
On Windows, Visual Studio 2015 or later is required.

See also :pep:`7` "Style Guide for C Code" and :pep:`11` "CPython platform
support".


.. _configure-options:

Configure Options
Expand Down Expand Up @@ -93,6 +133,12 @@ General Options

See :envvar:`PYTHONCOERCECLOCALE` and the :pep:`538`.

.. cmdoption:: --without-freelists

Disable all freelists except the empty tuple singleton.

.. versionadded:: 3.11

.. cmdoption:: --with-platlibdir=DIRNAME

Python library directory name (default is ``lib``).
Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/3.11.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2131,7 +2131,7 @@ Build Changes
(Contributed by Dong-hee Na and Brett Holman in :issue:`44340`.)

* Freelists for object structs can now be disabled. A new :program:`configure`
option :option:`!--without-freelists` can be used to disable all freelists
option :option:`--without-freelists` can be used to disable all freelists
except empty tuple singleton.
(Contributed by Christian Heimes in :issue:`45522`.)

Expand Down