From 56036013cd09db0f1b20402a69be44345ddafb22 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 23 Feb 2023 21:37:02 +0100 Subject: =?UTF-8?q?=F0=9F=93=A6=20Integrate=20manpage=20builds=20into=20PE?= =?UTF-8?q?P=20517=20build=20backend?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch creates a thin wrapper around the `setuptools`' PEP 517 build backend in-tree. It features an ability to request generating the manpage files in the process of building a source distribution. This toggle is implemented using the `config_settings` mechanism of PEP 517. One must explicitly pass it a CLI option to the build front-end to trigger said behavior. The packagers are expected to use the following call: python -m build --config-setting=--build-manpages This option has no effect on building wheels. 🧪 The change includes integration tests This test runs building and re-building sdists and wheels with and without the `--build-manpages` config setting under the oldest-supported and new `setuptools` pinned. It is intended to preserve the interoperability of the packaging setup across Python runtimes. An extra smoke test also verifies that non PEP 517 interfaces remain functional. PR #79606 Co-authored-by: Matt Clay --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pyproject.toml') diff --git a/pyproject.toml b/pyproject.toml index 38c5a47d62..4a583ee5a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,4 @@ [build-system] requires = ["setuptools >= 39.2.0", "wheel"] -build-backend = "setuptools.build_meta" +backend-path = ["packaging"] # requires 'Pip>=20' or 'pep517>=0.6.0' +build-backend = "pep517_backend.hooks" # wraps `setuptools.build_meta` -- cgit v1.2.1