Skip to content

Commit

Permalink
📦 Move packaging to PEP 517 in-tree backend
Browse files Browse the repository at this point in the history
This essentially allows the cythonization opt-out be controlled by the
`pure-python` PEP 517 config setting that can be passed to
the corresponding build frontends via their respective CLIs.
  • Loading branch information
webknjaz committed Sep 10, 2024
1 parent c19d44d commit 5138892
Show file tree
Hide file tree
Showing 13 changed files with 787 additions and 46 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ include CHANGES.rst
include README.rst
include Makefile
graft multidict
graft packaging
graft docs
graft CHANGES
graft requirements
Expand Down
11 changes: 11 additions & 0 deletions packaging/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# `pep517_backend` in-tree build backend

The `pep517_backend.hooks` importable exposes callables declared by PEP 517
and PEP 660 and is integrated into `pyproject.toml`'s
`[build-system].build-backend` through `[build-system].backend-path`.

# Design considerations

`__init__.py` is to remain empty, leaving `hooks.py` the only entrypoint
exposing the callables. The logic is contained in private modules. This is
to prevent import-time side effects.
1 change: 1 addition & 0 deletions packaging/pep517_backend/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""PEP 517 build backend for optionally pre-building Cython."""
6 changes: 6 additions & 0 deletions packaging/pep517_backend/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import sys

from . import cli

if __name__ == "__main__":
sys.exit(cli.run_main_program(argv=sys.argv))
Loading

0 comments on commit 5138892

Please sign in to comment.