Skip to content

Commit

Permalink
Modernize setuptools usage in pyproject.toml
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mgorny committed Jun 10, 2022
1 parent da95dea commit 971e5ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[build-system]
requires = ["setuptools >= 51.0.0", "wheel"]
build-backend = "setuptools.build_meta:__legacy__"
requires = ["setuptools >= 51.0.0"]
build-backend = "setuptools.build_meta"
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
from setuptools import setup

# Our own imports
sys.path.insert(0, ".")

from setupbase import target_update

from setupbase import (
Expand Down

0 comments on commit 971e5ce

Please sign in to comment.