From d15052a67a9be4e6a0d7b6da55a80a58ed1bcfae Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 7 Jul 2025 08:00:29 +0200 Subject: [PATCH] Add stub pyproject.toml file This keeps our setup.py around for now, while still supporting a PEP-517 compliant build. It's the minimum required change to make modern pyroma stop complaining, and hopefully to avoid deprecation warnings. Partially duplicates #8560 See #3526 --- pyproject.toml | 3 +++ setup.py | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..b0f076532 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools>=42"] +build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index baba8f749..e772828d4 100755 --- a/setup.py +++ b/setup.py @@ -10,6 +10,14 @@ import re import ast import os import os.path +import sys + +# Add repo root to path so we can import scripts. Prior to PEP517 support this +# was the default behavior for setuptools. +# https://github.com/pypa/setuptools/issues/3939#issuecomment-1573619382 +# > If users want to import local modules they are recommended to explicitly add +# > the current directory to sys.path at the top of setup.py. +sys.path.append(".") from scripts import setupcommon as common