Skip to content
Open
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
1 change: 1 addition & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@
"gh-label": (f"{_repo}/labels/%s", "%s"),
"github": ("https://github.com/%s", "%s"),
"github-user": ("https://github.com/%s", "@%s"),
"gh-python-team": ("https://github.com/orgs/python/teams/%s", "@%s"),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think this is a good idea, no longer renders the proper team to ping.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does this work?

Suggested change
"gh-python-team": ("https://github.com/orgs/python/teams/%s", "@%s"),
"gh-python-team": ("https://github.com/orgs/python/teams/%s", "@python/%s"),

@StanFromIreland StanFromIreland Jun 17, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh, yes, that's right. I thought we could just re-use github-user but that wouldn't work for teams.

"pypi": ("https://pypi.org/project/%s/", "%s"),
"pypi-org": ("https://pypi.org/org/%s/", "%s"),
}
Expand Down
18 changes: 2 additions & 16 deletions core-team/experts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -179,23 +179,9 @@ PEG Generator gvanrossum, pablogsal, lysnikolaou
Platforms
=========

For official contacts for supported platforms, see :pep:`11`.
The **Platforms experts list** has moved to :ref:`ports`.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Platforms experts list is how PEP 11 links here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's update the PEP 11 link after merge.


Platforms listed here are not necessarily supported by CPython.
Some of the experts listed here maintain and distribute Python
for “their” platform as a third-party project.

=================== ===========
Platform Maintainers
=================== ===========
AIX ayappanec
Android mhsmith
Emscripten hoodmane, pmp-p, rdb, rth, ryanking13
iOS freakboy3742, ned-deily
macOS ronaldoussoren, ned-deily, freakboy3742
Solaris/OpenIndiana jcea, kulikjak
Windows tjguk, zooba, pfmoore
=================== ===========
For official contacts for supported platforms, see :pep:`11`.


Miscellaneous
Expand Down
139 changes: 128 additions & 11 deletions developer-workflow/porting.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,107 @@
.. _porting:

=========================
============================
Porting and platform support
============================

The Python interpreter runs on an underlying *platform* -- the operating system
(for example, Linux, Windows or macOS), processor (like Intel/AMD, ARM),
C compiler and library, and other "lower level" details.

CPython is *officially supported* on several platforms, on which the core team
has adequate knowledge and resources to test releases and fix bugs.
See :pep:`11` for details.

Other platforms are unsupported *by the core team*, but might be supported
by others -- as a volunteer project, by a company that wants Python on "their"
system, or just as a one-off experiment.
See :pep:`11#unsupported-platforms` for the policy on merging code for
unsupported platforms into the main CPython repository.


.. _ports:

Ports and contacts
==================

The table below lists relevant third-party projects,
their maintainers, and links to information that's relevant when triaging
platform-specific issues.

It is OK to @mention the listed GitHub usernames to draw maintainers' attention
or request their opinion on platform-specific issues.
Maintainers must only be listed with their permission, and they may remove
themselves at any time.

Third-party projects should only be listed if they benefit substantially
more people than the maintainer(s).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's avoid the ugly s in parentheses, plural is fine for an unknown number here.

Suggested change
more people than the maintainer(s).
more people than the maintainers.

Officially supported platforms are included when there are relevant links
to show, or to group similar platforms.

Links should be for the port specifically (not the platform itself),
and relevant for porting work and fixing platform-specific issues
(no homepage/marketing links).

* **AIX**: :github-user:`ayappanec`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would a table be clearer than this list?

Before After
Image Image
RST
.. list-table::
   :header-rows: 1

   * - Platform
     - Maintainers
     - Information
   * - **AIX**
     - :github-user:`ayappanec`
     -
   * - **Linux** [t1]_
     -
     -
   * - Fedora
     - :github-user:`hroncok`, :github-user:`befeleme`
     - `Config & patches <https://src.fedoraproject.org/rpms/python3.15/tree/rawhide>`_,
       `Bugs <https://bugzilla.redhat.com/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&classification=Fedora&columnlist=product%2Ccomponent%2Cassigned_to%2Cbug_status%2Cshort_desc%2Cchangeddate%2Cbug_severity&f1=component&o1=regexp&order=status%2C%20assigned_to%2C%20id%2C%20&product=Fedora&product=Fedora%20EPEL&query_format=advanced&v1=python3%5C..%2A>`__,
       `Maintenance guide <https://hackmd.io/9f64YNIZTCy0ZzKb5wKtqQ?view>`__
   * - Debian
     - :github-user:`stefanor`, :github-user:`doko42`
     - `Config & patches <https://salsa.debian.org/cpython-team/python3/-/tree/master/debian/patches>`_,
       `Bugs <https://bugs.debian.org/cgi-bin/pkgreport.cgi?src=python3.15>`__,
       `Wiki <https://wiki.debian.org/Python>`__
   * - Alpine
     -
     - `Config & patches <https://github.com/alpinelinux/aports/tree/master/main/python3>`_
   * - **macOS** [t1]_
     - :gh-python-team:`macos-team`, :github-user:`freakboy3742`
     - `Limitations <https://docs.python.org/3/library/intro.html#mobile-platforms>`__,
       `Usage <https://docs.python.org/3/library/intro.html#mobile-platforms>`__,
       :cpy-file:`Platforms/Apple`
   * - Mobile platforms
     -
     - `Limitations <https://docs.python.org/3/library/intro.html#mobile-platforms>`__
   * - **Android** [t3]_
     - :github-user:`mhsmith`
     - `Usage <https://docs.python.org/3/using/android.html>`__,
       :cpy-file:`Platforms/Android`
   * - **iOS** [t3]_
     - :github-user:`freakboy3742`, :github-user:`ned-deily`
     - `Usage <https://docs.python.org/3/using/ios.html>`__,
       :cpy-file:`Platforms/Apple`
   * - **Solaris**/OpenIndiana
     - :github-user:`jcea`, :github-user:`kulikjak`
     -
   * - **WebAssembly**
     -
     - `Limitations <https://docs.python.org/3/library/intro.html#webassembly-platforms>`__
   * - WASI [t2]_
     -
     - :cpy-file:`WASI <Platforms/WASI>`
   * - Emscripten [t3]_
     - :github-user:`pmp-p`, :github-user:`rdb`, :github-user:`rth`
     - :cpy-file:`emscripten <Platforms/emscripten>`
   * - Pyodide
     - :github-user:`hoodmane`, :github-user:`ryanking13`, :github-user:`agriyakhetarpal`
     -
   * - **Windows** [t1]_
     - :gh-python-team:`windows-team`, :github-user:`pfmoore`
     - `Usage <https://docs.python.org/3/using/windows.html>`__,
       :cpy-file:`PC`,
       :cpy-file:`PCbuild`
   * - **Cross-Platform**
     -
     -
   * - conda-forge
     -
     - `Recipe <https://github.com/conda-forge/python-feedstock/tree/main/recipe>`_

Might need to adjust so only "top-level" is bold. (And it's not entirely clear to me why some are bold in the list.)

* **Linux** [t1]_

* Fedora: :github-user:`hroncok`, :github-user:`befeleme`; see

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@hroncok @befeleme, do you want to be listed here? People might ping you for Fedora issues.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good with me. Consider also @frenzymadness

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Yep, why not.

`Config & patches <https://src.fedoraproject.org/rpms/python3.15/tree/rawhide>`_,
`Bugs <https://bugzilla.redhat.com/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&classification=Fedora&columnlist=product%2Ccomponent%2Cassigned_to%2Cbug_status%2Cshort_desc%2Cchangeddate%2Cbug_severity&f1=component&o1=regexp&order=status%2C%20assigned_to%2C%20id%2C%20&product=Fedora&product=Fedora%20EPEL&query_format=advanced&v1=python3%5C..%2A>`__,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Try status=open

`Maintenance guide <https://hackmd.io/9f64YNIZTCy0ZzKb5wKtqQ?view>`__
* Debian: :github-user:`stefanor`, :github-user:`doko42`; see

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@stefanor @doko42, do you want to be listed here? People might ping you for Debian/Ubuntu issues.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍 from me.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You can list us for Ubuntu too

`Config & patches <https://salsa.debian.org/cpython-team/python3/-/tree/master/debian/patches>`_,
`Bugs <https://bugs.debian.org/cgi-bin/pkgreport.cgi?src=python3.15>`__,
`Wiki <https://wiki.debian.org/Python>`__
* Alpine: see
`Config & patches <https://github.com/alpinelinux/aports/tree/master/main/python3>`_
* **macOS** [t1]_: :gh-python-team:`macos-team`, :github-user:`freakboy3742`;
see
`Limitations <https://docs.python.org/3/library/intro.html#mobile-platforms>`__,
`Usage <https://docs.python.org/3/library/intro.html#mobile-platforms>`__,
:cpy-file:`Platforms/Apple`
* Mobile platforms: see
`Limitations <https://docs.python.org/3/library/intro.html#mobile-platforms>`__

* **Android** [t3]_: :github-user:`mhsmith`; see
`Usage <https://docs.python.org/3/using/android.html>`__,
:cpy-file:`Platforms/Android`
* **iOS** [t3]_: :github-user:`freakboy3742`, :github-user:`ned-deily`; see
`Usage <https://docs.python.org/3/using/ios.html>`__,
:cpy-file:`Platforms/Apple`

* **Solaris**/OpenIndiana: :github-user:`jcea`, :github-user:`kulikjak`
* **WebAssembly**: see `Limitations <https://docs.python.org/3/library/intro.html#webassembly-platforms>`__

* WASI [t2]_: see :cpy-file:`WASI <Platforms/WASI>`
* Emscripten [t3]_: :github-user:`pmp-p`, :github-user:`rdb`, :github-user:`rth`; see
:cpy-file:`emscripten <Platforms/emscripten>`
Comment on lines +77 to +78

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Presumably I should be listed here? @rth is retired from maintaining this stuff so it might not be useful to list him. I also have no idea who @rdb is, @pmp-p added @rdb so I suppose he must know.


* Pyodide: :github-user:`hoodmane`, :github-user:`ryanking13`, :github-user:`agriyakhetarpal`

* **Windows** [t1]_: :gh-python-team:`windows-team`, :github-user:`pfmoore`; see
`Usage <https://docs.python.org/3/using/windows.html>`__,
:cpy-file:`PC`,
:cpy-file:`PCbuild`
* **Cross-Platform**:

* conda-forge: see
`Recipe <https://github.com/conda-forge/python-feedstock/tree/main/recipe>`_

.. [t1] Specific variants have official :pep:`Tier 1 support <11#tier-1>`
.. [t2] Specific variants have official :pep:`Tier 2 support <11#tier-2>`
.. [t3] Specific variants have official :pep:`Tier 3 support <11#tier-3>`


Porting to a new platform
=========================

Porting CPython to an entirely new platform is an adventure.
If you try it, consider keeping notes -- and updating this guide, if you
find something that might be relevant to others.
Since each platform is different, this guide can only give you a
few rough tips.

The first step is to familiarize yourself with the development toolchain on
the platform in question, notably the C compiler. Make sure you can compile and
run a hello-world program using the target compiler.
Expand All @@ -12,23 +110,39 @@
which it has already been ported; preferably Unix, but Windows will
do, too. The build process for Python, in particular the ``Makefile`` in the
source distribution, will give you a hint on which files to compile
for Python. Not all source files are relevant: some are platform-specific,
and others are only used in emergencies (for example, ``getopt.c``).
for Python. Not all source files are relevant: some are platform-specific,
and others are only used in emergencies (for example,
:cpy-file:`Python/getopt.c`).

It is not recommended to start porting Python without at least a medium-level
understanding of your target platform; how it is generally used, how to
write platform-specific apps, and so on. Also, some Python knowledge is required, or
you will be unable to verify that your port is working correctly.

You will need a ``pyconfig.h`` file tailored for your platform. You can
start with ``pyconfig.h.in``, read the comments, and turn on definitions that
apply to your platform. Also, you will need a ``config.c`` file, which lists
the built-in modules you support. Again, starting with
``Modules/config.c.in`` is recommended.
On systems with a UNIX shell, run the included :cpy-file:`configure` script.
This should generate all required files, including a :file:`Makefile`.
If it does not, you will need to debug it (or reimplement it).
Note that the script is generated from :cpy-file:`configure.ac` using GNU
Autotools.
(CPython pins a specific version for reproducibility, but other versions may
work fine.)

The main files that ``configure`` generates -- and which you might want to
check -- are:

Finally, you will run into some things that are not supported on your
target platform. Forget about the ``posix`` module in the beginning. You can
simply comment it out of the ``config.c`` file.
* A :file:`pyconfig.h` file tailored for your platform.
If you need to create this manually, start with :cpy-file:`pyconfig.h.in`,
read the comments, and turn on definitions that apply to your platform.
* A :file:`config.c` file, which lists the built-in modules you support.
Until you get dynamic extension loading to work, all compiled modules
you need to import will need to be listed here.
The file is generated from :cpy-file:`Modules/config.c.in`.
* A :file:`Makefile` with instructions to put everything together.
If one isn't generated, try compiling all the ``*.c`` files, and fix the
errors -- or omit files that don't look important.
For example, forget about the ``posix`` module
(:cpy-file:`Modules/posixmodule.c`) in the beginning: don't compile it,
and comment it out of the :file:`config.c` file.

Keep working on it until you get a ``>>>`` prompt. You may have to disable the
importing of ``site.py`` by passing the ``-S`` option. When you have a prompt,
Expand All @@ -38,6 +152,9 @@
thinking about what to do with the ``posix`` module. It is okay to simply
comment out functions in the ``posix`` module that cause problems; the
remaining ones will be quite useful.
You can use the same approach for other modules too, of course.

Before you are done, it is highly recommended to run the Python regression test
suite, as described in :ref:`runtests`.
You will probably need to skip tests that do not make sense; for inspiration
look at how that's done for the WASI platform.
Loading