Skip to content

Commit

Permalink
Pull in PR
Browse files Browse the repository at this point in the history
  • Loading branch information
erlend-aasland committed Oct 10, 2023
2 parents 423f98e + ed52a72 commit 3a18b63
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions peps/pep-0755.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PEP: 755
Title: Status quo of the CPython 3.12 build system
Author: Erlend Egeberg Aasland <erlend@python.org>,
Zachary Ware <zachary.ware@gmail.com>
Zachary Ware <zach@python.org>
Status: Draft
Type: Informational
Content-Type: text/x-rst
Expand All @@ -13,7 +13,8 @@ Abstract
========

This PEP describes the pains core developers have with the CPython build system,
and their desired goals and wishes for the future CPython build system.
and their desired goals and wishes for its future.



Motivation
Expand All @@ -22,7 +23,7 @@ Motivation
The current build system has been criticized by contributors and core
developers, and the idea of replacing it surfaces every now and then.
If we are to make large scale changes to the current build system,
we need to know more about its pros and cons.
we need to be sure we know what we're getting into.

This PEP intends to document the current build system;
how is it perceived by contributors and core developers,
Expand All @@ -36,21 +37,17 @@ system.
Poll Results
============

`June 20, 2023
<https://discuss.python.org/t/what-do-you-want-to-see-in-tomorrow-s-cpython-build-system/28197>`__,
we asked:
`June 20, 2023 <https://discuss.python.org/t/28197>`__, we asked:

Hypothetically, if we had to recreate the build process from just the
available code today, which qualities and features would we want to see in
tomorrow’s new build system?

`August 17, 2023
<https://discuss.python.org/t/what-do-you-consider-pain-points-of-todays-build-system/31815>`__,
we asked:
`August 17, 2023 <https://discuss.python.org/t/31815>`__, we asked:

[...] what do you consider pain points of todays build system?

The desire of a unified build system was mentioned several times.
The desire for a unified build system was mentioned several times.
This need was accompanied by the pain point that we currently have _two_ build
systems:

Expand All @@ -62,10 +59,10 @@ Windows developers often find the GNU build system incomprehensible;
\*nix developers find the Windows build system incomprehensible.
Many developers simply avoid the build system completely.

Also mentioned multiple times, was the desire of correct incremental builds.
Also mentioned multiple times was the desire for correct incremental builds.
This need was accompanied by the observation that today's build system
does _not_ guarantee this.
Related, was the desire of fast incremental builds and deterministic builds.
Related was the desire for fast incremental builds and deterministic builds.
The latter is not guaranteed by the current build system.
Deterministic builds imply the ability to easily constrain dependencies,
a need that was also mentioned.
Expand Down Expand Up @@ -94,7 +91,7 @@ with making and reviewing changes to it, in years to come.
This implies some needs:

* good quality documentation
* support, for example in form of an active community
* support, for example in the form of an active community
* a build system that is being actively developed


Expand All @@ -108,13 +105,13 @@ GNU Autoconf and Make
the GNU Autoconf/Make build system.
GNU Autoconf is based on the M4 macro language;
it takes care of the configure step,
which implies detecting 3rd party dependencies,
which includes detecting 3rd party dependencies,
compiler and linker traits, platform specifics, etc.
It also provides a command-line interface so the user can
enable and disable various features.

At the end of the configure step, the :file:`pyconfig.h` header file
and the Makefile is generated.
and the Makefile are generated.
The Makefile file contains a set of hand-written targets and build dependencies,
and takes care of the build and test use cases.
Keeping the Makefile compatible with both BSD and GNU Make is a pain point.
Expand All @@ -128,9 +125,13 @@ and it has few active core developers.
The Windows Build System
------------------------

The Windows build consists of a collection of :file:`.xml` and :file:`.bat`
files that was originally generated using VSCode,
and are now manually updated whenever needed.
The Windows build consists of a collection of :file:`.vcxproj` and
:file:`.proj` XML files used by the MSBuild tool to
generate binaries and perform some other file generation tasks, and a
series of :file:`.bat` files to prepare the environment, drive MSBuild,
and perform other tasks such as running tests. The XML files were
originally generated by Visual Studio, but have been extensively modified
or rewritten by hand, and are now maintained manually.


Use Cases
Expand All @@ -147,9 +148,9 @@ as mentioned in the poll responses, that the build system is fast.
Currently, the CI is implemented using GitHub Actions,
so for convenience, the build system should be supported by all GitHub runners.

For core developers, a common use cases are _reconfigure_ and _rebuild_;
this was reflected in the poll responses:
we want fast and correct incremental builds.
For core developers, a common use case is _reconfigure_ and _rebuild_:
this was reflected in the poll responses
desiring fast and correct incremental builds.


Build Issues in the Bug Tracker
Expand Down

0 comments on commit 3a18b63

Please sign in to comment.