From c928806ce58316f0cec2d3a020f6d342f9510395 2024-01-30 20:26:45 From: Matthias Koeppe Date: 2024-01-30 20:26:45 Subject: [PATCH] pyproject.toml, setup.py: Declare backend-path --- diff --git a/MANIFEST.in b/MANIFEST.in index 7d96f8c..8f97280 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,6 +2,7 @@ include README.rst include COPYING.rst include LICENSE include setupbase.py +include _build_meta.py include MANIFEST.in include py.typed include .mailmap diff --git a/_build_meta.py b/_build_meta.py new file mode 100644 index 0000000..9573341 --- /dev/null +++ b/_build_meta.py @@ -0,0 +1,2 @@ +# See https://setuptools.pypa.io/en/latest/build_meta.html#dynamic-build-dependencies-and-other-build-meta-tweaks +from setuptools.build_meta import * diff --git a/pyproject.toml b/pyproject.toml index 76a5b10..15ea5c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,9 @@ [build-system] requires = ["setuptools >= 51.0.0"] -build-backend = "setuptools.build_meta" +# We need access to the 'setupbase' module at build time. +# Hence we declare a custom build backend. +build-backend = "_build_meta" # just re-exports setuptools.build_meta definitions +backend-path = ["."] [tool.mypy] python_version = "3.10" diff --git a/setup.py b/setup.py index a6a15c5..d9ed886 100644 --- a/setup.py +++ b/setup.py @@ -66,7 +66,6 @@ Python {py} detected. from setuptools import setup # Our own imports -sys.path.insert(0, ".") from setupbase import target_update, find_entry_points