MSYS2-packages/python-build/001-use-flit.patch
Christoph Reiter a03c16c389 python-build: switch to flit
Backported from upstream.
This should make botostrapping work again after setuptools needs build
2022-12-18 18:27:54 +01:00

111 lines
3.4 KiB
Diff

From de60f38c13618572502365090e21715940e575cd Mon Sep 17 00:00:00 2001
From: layday <layday@protonmail.com>
Date: Thu, 12 May 2022 23:32:19 +0300
Subject: [PATCH] infra: switch to flit
---
CHANGELOG.rst | 10 +++++
pyproject.toml | 78 ++++++++++++++++++++++++++++++++++--
setup.cfg | 74 ----------------------------------
setup.py | 4 --
tests/test_integration.py | 4 +-
tests/test_self_packaging.py | 14 +------
6 files changed, 88 insertions(+), 96 deletions(-)
delete mode 100644 setup.cfg
delete mode 100644 setup.py
diff --git a/pyproject.toml b/pyproject.toml
index a4f7f4d7..86f801e3 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,79 @@
[build-system]
-requires = ["setuptools >=42.0"]
-build-backend = "setuptools.build_meta"
+requires = ["flit-core >= 3.4"]
+build-backend = "flit_core.buildapi"
+
+[project]
+name = "build"
+version = "0.9.0"
+description = "A simple, correct PEP 517 build frontend"
+readme = "README.md"
+requires-python = ">= 3.6"
+license.file = "LICENSE"
+authors = [
+ { name = "Filipe Laíns", email = "lains@riseup.net" },
+ { name = "Bernát Gábor", email = "gaborjbernat@gmail.com" },
+ { name = "layday", email = "layday@protonmail.com" },
+ { name = "Henry Schreiner", email = "henryschreineriii@gmail.com" },
+]
+classifiers = [
+ "License :: OSI Approved :: MIT License",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3 :: Only",
+ "Programming Language :: Python :: 3.6",
+ "Programming Language :: Python :: 3.7",
+ "Programming Language :: Python :: 3.8",
+ "Programming Language :: Python :: 3.9",
+ "Programming Language :: Python :: 3.10",
+ "Programming Language :: Python :: 3.11",
+ "Programming Language :: Python :: Implementation :: CPython",
+ "Programming Language :: Python :: Implementation :: PyPy",
+]
+urls.homepage = "https://github.com/pypa/build"
+urls.changelog = "https://pypa-build.readthedocs.io/en/stable/changelog.html"
+
+dependencies = [
+ "packaging >= 19.0",
+ "pep517 >= 0.9.1",
+ # not actually a runtime dependency, only supplied as there is not "recommended dependency" support
+ 'colorama; os_name == "nt"',
+ 'importlib-metadata >= 0.22; python_version < "3.8"',
+ # toml can be used instead -- in case it makes bootstrapping easier
+ 'tomli >= 1.0.0; python_version < "3.11"',
+]
+
+[project.optional-dependencies]
+docs = [
+ "furo >= 2021.08.31",
+ "sphinx ~= 4.0",
+ "sphinx-argparse-cli >= 1.5",
+ "sphinx-autodoc-typehints >= 1.10",
+]
+test = [
+ "filelock >= 3",
+ "pytest >= 6.2.4",
+ "pytest-cov >= 2.12",
+ "pytest-mock >= 2",
+ "pytest-rerunfailures >= 9.1",
+ "pytest-xdist >= 1.34",
+ "toml >= 0.10.0",
+ "wheel >= 0.36.0",
+ 'setuptools >= 42.0.0; python_version < "3.10"',
+ 'setuptools >= 56.0.0; python_version >= "3.10"',
+]
+typing = [
+ "importlib-metadata >= 4.6.4",
+ "mypy == 0.942",
+ "typing-extensions >= 3.7.4.3",
+]
+virtualenv = [
+ "virtualenv >= 20.0.35",
+]
+
+[project.scripts]
+pyproject-build = "build.__main__:entrypoint"
+
+[project.entry-points."pipx.run"]
+build = "build.__main__:entrypoint"
[tool.coverage.run]
source = [
@@ -49,7 +122,6 @@ strict = true
show_error_codes = true
enable_error_code = ["ignore-without-code", "truthy-bool", "redundant-expr"]
-
[[tool.mypy.overrides]]
module = [
"colorama", # Optional dependency