Skip to content

Commit

Permalink
Add Prototype and Implementation subsections
Browse files Browse the repository at this point in the history
  • Loading branch information
erlend-aasland committed Oct 10, 2023
1 parent 77c0eb4 commit 3fa3586
Showing 1 changed file with 47 additions and 22 deletions.
69 changes: 47 additions & 22 deletions peps/pep-0756.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,28 +55,6 @@ A new build system should also have the following traits:
- being actively developed


Implementation
--------------

In order to be able to decide on the build system,
we suggest implementing a proof-of-concept implementation of each contender.
This proof-of-concept implementation should follow these specific guidelines,
so that it will be possible to do a fair comparison:

1. Compile and link the source files in :file:`Python/` into an object file.
This implies generating :file:`pyconfig.h` for macros needed in :file:`Python/`.
2. Locate dependencies for and compile the ``_sqlite3`` extension module
3. Add a target that regenerates Argument Clinic code

The proof-of-concept implementation should work on the following platforms:

- macOS (ARM)
- Windows (32-bit)
- Windows (64-bit)
- Ubuntu 22.04
- FreeBSD 14


Contenders
----------

Expand Down Expand Up @@ -107,6 +85,53 @@ under the Apache License 2.0.
It has been around since 2015, and is currently at release 6.0.0.


Prototype
---------

In order to be able to decide on the build system,
we suggest implementing a proof-of-concept prototype of each contender.
This prototype implementation should follow these specific guidelines,
so that it will be possible to do a fair comparison:

1. Compile and link the source files in :file:`Python/` into an object file.
This implies generating :file:`pyconfig.h` for macros needed in :file:`Python/`.
2. Locate dependencies for and compile the ``_sqlite3`` extension module
3. Add a target that regenerates Argument Clinic code

The prototype implementation should work on the following platforms:

- macOS (ARM)
- Windows (32-bit)
- Windows (64-bit)
- Ubuntu 22.04
- FreeBSD 14

The core developement team should choose a winner after evaluating the
prototype implementations.


Implementation
--------------

The authors suggest to hire a developer to work full-time on the final implementation,
as it will be a time-consuming task.

*FIXME*: A course implementation plan should look similar to this:

- produce a detailed design spec by doing an audit of the existing build system:
- remove obsolete macros from :file:`pyconfig.h` and group remaining checks
- for each extension module, do an audit of its third-party dependencies
- platform checks and quirks
- arch checks and quirks
- for each code generation target, clearly document its dependency graph
- for each repo root subdirectory, clearly document its dependency graph
- implement arch specific checks
- implement platform specific checks
- implement third-party dependency detection for extension modules
- generate source code from template files (e.g. :file:`pyconfig.h`)
- *FIXME*


Backwards Compatibility
=======================

Expand Down

0 comments on commit 3fa3586

Please sign in to comment.