Introduce basic pyproject.toml, supporting existing build methods only (#2687)

* Add pyproject.toml with only name and dynamic fields

* Add build-system section to pyproject.toml with build requirements

Explicitly set the fallback build backend `setuptools.build_meta:__legacy__`

* Replace wheel.bdist_wheel import with setuptools equivalent

There is a deprecation warning that will be enforced in october 2025

* Package `requests[security]` is a no-op since 2.26.0, published 2021-07-13, use only `requests >= 2.26.0`

* Add setuptools package configuration to pyproject.toml

* Exclude packages found at top level with setuptools config

Exclude buildtools/backports package found at top level with setuptools config

* Add dynamic metadata in setup-wxsvg.py too to avoid failing the build

---------

Co-authored-by: Edouard Choinière <echoix@users.noreply.github.com>
This commit is contained in:
Edouard Choinière
2025-02-03 19:52:44 -05:00
committed by GitHub
parent 5abeba2f5d
commit 961d14b9cc
4 changed files with 57 additions and 7 deletions

29
pyproject.toml Normal file
View File

@@ -0,0 +1,29 @@
[project]
name = "wxPython"
dynamic = [
"authors",
"classifiers",
"dependencies",
"description",
"keywords",
"license",
"readme",
"scripts",
"urls",
"version",
]
[build-system]
requires = [
"setuptools>=70.1",
"cython == 3.0.10",
"requests >= 2.26.0",
"sip == 6.9.1",
]
# Using "setuptools.build_meta:__legacy__" instead of "setuptools.build_meta" for now.
# Allows to have access to the folder on the search path when building, like before.
build-backend = "setuptools.build_meta:__legacy__"
[tool.setuptools.packages.find]
exclude = ["src", "buildtools*", "etgtools", "sphinxtools", "src", "unittests"]
namespaces = false