mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-04 11:00:07 +01:00
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:
committed by
GitHub
parent
5abeba2f5d
commit
961d14b9cc
29
pyproject.toml
Normal file
29
pyproject.toml
Normal 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
|
||||||
@@ -6,8 +6,7 @@ sip == 6.9.1
|
|||||||
|
|
||||||
wheel
|
wheel
|
||||||
twine
|
twine
|
||||||
requests
|
requests >= 2.26.0
|
||||||
requests[security]
|
|
||||||
cython==3.0.10
|
cython==3.0.10
|
||||||
pytest
|
pytest
|
||||||
pytest-xdist
|
pytest-xdist
|
||||||
|
|||||||
@@ -31,6 +31,28 @@ URL = "http://wxPython.org/"
|
|||||||
DOWNLOAD_URL = "https://pypi.org/project/wxPython"
|
DOWNLOAD_URL = "https://pypi.org/project/wxPython"
|
||||||
LICENSE = "wxWindows Library License (https://opensource.org/licenses/wxwindows.php)"
|
LICENSE = "wxWindows Library License (https://opensource.org/licenses/wxwindows.php)"
|
||||||
PLATFORMS = "WIN32,WIN64,OSX,POSIX"
|
PLATFORMS = "WIN32,WIN64,OSX,POSIX"
|
||||||
|
KEYWORDS = "GUI,wx,wxWindows,wxWidgets,cross-platform,user-interface,awesome"
|
||||||
|
|
||||||
|
CLASSIFIERS = """\
|
||||||
|
Development Status :: 6 - Mature
|
||||||
|
Environment :: MacOS X :: Cocoa
|
||||||
|
Environment :: Win32 (MS Windows)
|
||||||
|
Environment :: X11 Applications :: GTK
|
||||||
|
Intended Audience :: Developers
|
||||||
|
License :: OSI Approved
|
||||||
|
Operating System :: MacOS :: MacOS X
|
||||||
|
Operating System :: Microsoft :: Windows :: Windows 7
|
||||||
|
Operating System :: Microsoft :: Windows :: Windows 10
|
||||||
|
Operating System :: POSIX
|
||||||
|
Programming Language :: Python :: 3.7
|
||||||
|
Programming Language :: Python :: 3.8
|
||||||
|
Programming Language :: Python :: 3.9
|
||||||
|
Programming Language :: Python :: 3.10
|
||||||
|
Programming Language :: Python :: 3.11
|
||||||
|
Programming Language :: Python :: 3.12
|
||||||
|
Programming Language :: Python :: Implementation :: CPython
|
||||||
|
Topic :: Software Development :: User Interfaces
|
||||||
|
"""
|
||||||
|
|
||||||
HERE = os.path.abspath(os.path.dirname(__file__))
|
HERE = os.path.abspath(os.path.dirname(__file__))
|
||||||
PACKAGE = 'wx.svg'
|
PACKAGE = 'wx.svg'
|
||||||
@@ -68,7 +90,10 @@ setup(name = 'wx.svg',
|
|||||||
url = URL,
|
url = URL,
|
||||||
download_url = DOWNLOAD_URL,
|
download_url = DOWNLOAD_URL,
|
||||||
license = LICENSE,
|
license = LICENSE,
|
||||||
|
classifiers = [c for c in CLASSIFIERS.split("\n") if c],
|
||||||
|
keywords = KEYWORDS,
|
||||||
#packages = [PACKAGE],
|
#packages = [PACKAGE],
|
||||||
ext_modules = modules,
|
ext_modules = modules,
|
||||||
options = { 'build' : BUILD_OPTIONS, },
|
options = { 'build' : BUILD_OPTIONS, },
|
||||||
|
scripts = [],
|
||||||
)
|
)
|
||||||
|
|||||||
7
setup.py
7
setup.py
@@ -18,15 +18,12 @@ from distutils.command.build import build as orig_build
|
|||||||
from setuptools.command.install import install as orig_install
|
from setuptools.command.install import install as orig_install
|
||||||
from setuptools.command.bdist_egg import bdist_egg as orig_bdist_egg
|
from setuptools.command.bdist_egg import bdist_egg as orig_bdist_egg
|
||||||
from setuptools.command.sdist import sdist as orig_sdist
|
from setuptools.command.sdist import sdist as orig_sdist
|
||||||
try:
|
from setuptools.command.bdist_wheel import bdist_wheel as orig_bdist_wheel
|
||||||
from wheel.bdist_wheel import bdist_wheel as orig_bdist_wheel
|
|
||||||
haveWheel = True
|
|
||||||
except ImportError:
|
|
||||||
haveWheel = False
|
|
||||||
|
|
||||||
from buildtools.config import Config, msg, opj, runcmd, canGetSOName, getSOName
|
from buildtools.config import Config, msg, opj, runcmd, canGetSOName, getSOName
|
||||||
import buildtools.version as version
|
import buildtools.version as version
|
||||||
|
|
||||||
|
haveWheel = True
|
||||||
|
|
||||||
# Create a buildtools.config.Configuration object
|
# Create a buildtools.config.Configuration object
|
||||||
cfg = Config(noWxConfig=True)
|
cfg = Config(noWxConfig=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user