Commit Graph

4 Commits (2765ab6f2843c0b8340a25a7fbd68196fa7ef3b2)

Author SHA1 Message Date
Matt Davis 2765ab6f28
Remove straight.plugin dependency (#80084) (#81020)
(cherry picked from commit f587856)
3 years ago
Matt Clay 339d42332c
[stable-2.13] pep517 backend - Copy symlinks when copying source (#80690) (#80702)
(cherry picked from commit 54576cd794)
3 years ago
Matt Clay 2e50a9e482
[stable-2.13] pep517 backend - Use correct import_module import (#80480) (#80503)
(cherry picked from commit e87802cf2c)
3 years ago
Sviatoslav Sydorenko 77d221c0ac
[backport-2.13] 📦 Integrate manpage builds into PEP 517 build backend (#80130)
This change includes backports of the PRs #79606, #80098, #80253, #80255 and #80262, with a number of backward compatibility changes that make it work and be testable in older CI environments.

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-memory, in the process of building a source distribution. The build is happening in an isolated temporary directory. 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.

📦 The sdist build-system is switched to pure setuptools upon the first build from Git checkout

This patch modifies the in-tree build backend to build sdists that swap
out pointers to it in the `pyproject.toml`'s `[build-system]` section.

The effect of this is that the first build from source (for example,
from a Git checkout) uses our PEP 517 in-tree build backend. But the
produced tarball has `build-backend` set to `setuptools.build_meta`
which is the native build backend of `setuptools`. So any following
builds from that sdist will skip using the in-tree build backend,
calling the setuptools' one.
The good news is that if the first build generated the manpages, they
will be included and won't go anywhere even though, a different build
system is in place.

Combined with #80253, this makes sure not to modify the current
source checkout on that first build.

Co-Authored-By: Matt Clay <matt@mystile.com>
Co-Authored-By: Matt Davis <6775756+nitzmahone@users.noreply.github.com>

(cherry picked from commit 56036013cd)
(cherry picked from commit 67bafafbc0)
(cherry picked from commit 888abf5d6e)
(cherry picked from commit 7097df3eed)
(cherry picked from commit eebfd71a6d)
3 years ago