Skip to content

Commit 971e5ce

Browse files
committed
Modernize setuptools usage in pyproject.toml
1. Remove the redundant `wheel` dependency. The setuptools build backend has been adding it automatically since day one, and it was explicitly specified in the docs as a mistake. See: pypa/setuptools@f7d30a9 2. Replace the legacy backend with the regular backend. The legacy backend was only intended to be used implicitly when `pyproject.toml` does not specify only, and was not supposed to be specified explicitly there. See: pypa/setuptools#1689 3. Prepend the current directory to `sys.path` as required for `setup.py` to reliably import `setupbase`. The non-legacy backend no longer does this for us.
1 parent da95dea commit 971e5ce

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[build-system]
2-
requires = ["setuptools >= 51.0.0", "wheel"]
3-
build-backend = "setuptools.build_meta:__legacy__"
2+
requires = ["setuptools >= 51.0.0"]
3+
build-backend = "setuptools.build_meta"

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@
6464
from setuptools import setup
6565

6666
# Our own imports
67+
sys.path.insert(0, ".")
68+
6769
from setupbase import target_update
6870

6971
from setupbase import (

0 commit comments

Comments
 (0)