Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1297,8 +1297,8 @@ def cmd_sip(options, args):
continue

# Leave it turned off for now. TODO: Experiment with this...
# pyi_extract = posixjoin(cfg.PKGDIR, base[1:]) + '.pyi'
pyi_extract = None
pyi_extract = posixjoin(cfg.PKGDIR, base[1:]) + '.pyi'
# pyi_extract = None

# SIP extracts are used to pull python snippets and put them into the
# module's .py file
Expand All @@ -1320,7 +1320,7 @@ def cmd_sip(options, args):
tracing = {tracing}
protected-is-public = false
generate-extracts = [\'{extracts}\']
pep484-pyi = false
pep484-pyi = true

[tool.sip.project]
abi-version = "{abi_version}"
Expand Down
127 changes: 127 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
[build-system]
requires = ["setuptools", "setuptools-scm", "sip"]
build-backend = "setuptools.build_meta"
backend-path = [ "."]


[project]
requires-python = ">= 3.9"
name = "wxPython"
dynamic = ["version"]
description = "Cross platform GUI toolkit for Python, \"Phoenix\" version"
readme = "README.rst"
license = { text = "wxWindows Library License (https://opensource.org/licenses/wxwindows.php)" }
authors = [{ name = "Robin Dunn", email = "robin@alldunn.com" }]
keywords = ["GUI", "awesome", "cross-platform", "user-interface", "wx", "wxWidgets", "wxWindows"]
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 10",
"Operating System :: Microsoft :: Windows :: Windows 7",
"Operating System :: POSIX",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: User Interfaces",
]
dependencies = [
"numpy ; python_version >= '3.0' and python_version < '3.12'",
"numpy < 1.17 ; python_version <= '2.7'",
"six",
]

[project.scripts]
helpviewer = "wx.tools.helpviewer:main"
img2png = "wx.tools.img2png:main"
img2py = "wx.tools.img2py:main"
img2xpm = "wx.tools.img2xpm:main"
pycrust = "wx.py.PyCrust:main"
pyshell = "wx.py.PyShell:main"
pyslices = "wx.py.PySlices:main"
pyslicesshell = "wx.py.PySlicesShell:main"
pywxrc = "wx.tools.pywxrc:main"
wxdemo = "wx.tools.wxget_docs_demo:demo_main" # Get/Launch Demo
wxdocs = "wx.tools.wxget_docs_demo:docs_main" # Get/Launch Docs
wxget = "wx.tools.wxget:main" # New wx wget

[project.urls]
Documentation = "https://docs.wxpython.org/"
Download = "https://pypi.org/project/wxPython"
Homepage = "http://wxPython.org/"
Source = "https://github.com/wxWidgets/Phoenix"

# [tool.hatch.version]
# path = "wx/__init__.py"

# [tool.hatch.build.targets.sdist]
# include = ["/wx"]


[tool.setuptools]
include-package-data = true
zip-safe = false

[tool.setuptools.packages]
find = {}

[dependency-groups]
dev = [
"alabaster",
"appdirs",
"attrdict3>=2.0.2 ; sys_platform == 'win32'",
"beautifulsoup4>=4.12.3",
"cython>=3.0.10",
"doc2dash>=2.3.0",
"jinja2>=2.10",
"markupsafe>=1.1.1",
"numpy<1.17 ; python_full_version < '2.8'",
"numpy>=1.24.4 ; python_full_version >= '3.0' and python_full_version < '3.12'",
"pytest>=8.3.4",
"pytest-forked>=1.6.0",
"pytest-timeout>=2.3.1",
"pytest-xdist>=3.6.1",
"requests[security]>=2.32.3",
"setuptools>=75.6.0",
"sip==6.9.1",
"six>=1.17.0",
# "sphinx>=2.2.0",
"sphinx==1.8.5 ; python_full_version < '3.0'",
"sphinx>5.1.1 ; python_full_version >= '3.8' and python_full_version < '3.10'",
"sphinx>=8.0.0 ; python_full_version >= '3.10'",
# "sphinx>=2.2.0 ; python_full_version >= '3.0'",
"sphinxcontrib-applehelp>=2.0.0",
"sphinxcontrib-devhelp>=2.0.0",
"sphinxcontrib-htmlhelp>=2.1.0",
"sphinxcontrib-jsmath>=1.0.1",
"sphinxcontrib-qthelp>=2.0.0",
"sphinxcontrib-serializinghtml>=2.0.0",
# "sphinx>=2.2.0 ; python_full_version >= '3.0'",
# "sphinxcontrib-applehelp<1.0.8",
# "sphinxcontrib-devhelp<1.0.6",
# "sphinxcontrib-htmlhelp<2.0.5",
# "sphinxcontrib-jsmath<1.0.2",
# "sphinxcontrib-qthelp<1.0.7",
# "sphinxcontrib-serializinghtml<1.1.10",
"twine>=6.0.1",
"wheel>=0.45.1",
# "buildtools @ {root:uri}/buildtools",
]


[tool.sip.project]
# abi-version = "{abi_version}"
sip-files-dir = "sip/gen"
# sip-include-dirs = ['{src_dir}']
sip-module = "wx.siplib"

[tool.sip.bindings.wx]
pep484-pyi = true
92 changes: 47 additions & 45 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
except ImportError:
haveWheel = False

# sys.path.insert(0, os.path.abspath(os.path.split(__file__)[0]+'/'))
from buildtools.config import Config, msg, opj, runcmd, canGetSOName, getSOName
import buildtools.version as version

Expand All @@ -36,17 +37,17 @@

NAME = version.PROJECT_NAME
DESCRIPTION = "Cross platform GUI toolkit for Python, \"Phoenix\" version"
AUTHOR = "Robin Dunn"
AUTHOR_EMAIL = "robin@alldunn.com"
URL = "http://wxPython.org/"
PROJECT_URLS = {
"Source": "https://github.com/wxWidgets/Phoenix",
"Documentation": "https://docs.wxpython.org/",
}
DOWNLOAD_URL = "https://pypi.org/project/{}".format(NAME)
# AUTHOR = "Robin Dunn"
# AUTHOR_EMAIL = "robin@alldunn.com"
# URL = "http://wxPython.org/"
# PROJECT_URLS = {
# "Source": "https://github.com/wxWidgets/Phoenix",
# "Documentation": "https://docs.wxpython.org/",
# }
# DOWNLOAD_URL = "https://pypi.org/project/{}".format(NAME)
LICENSE = "wxWindows Library License (https://opensource.org/licenses/wxwindows.php)"
PLATFORMS = "WIN32,WIN64,OSX,POSIX"
KEYWORDS = "GUI,wx,wxWindows,wxWidgets,cross-platform,user-interface,awesome"
# KEYWORDS = "GUI,wx,wxWindows,wxWidgets,cross-platform,user-interface,awesome"

LONG_DESCRIPTION = """\
Welcome to wxPython's Project Phoenix! Phoenix is the improved next-generation
Expand Down Expand Up @@ -95,10 +96,10 @@
Topic :: Software Development :: User Interfaces
"""

with open('requirements/install.txt') as fid:
INSTALL_REQUIRES = [line.strip()
for line in fid.readlines()
if not line.startswith('#')]
# with open('requirements/install.txt') as fid:
# INSTALL_REQUIRES = [line.strip()
# for line in fid.readlines()
# if not line.startswith('#')]

isWindows = sys.platform.startswith('win')
isDarwin = sys.platform == "darwin"
Expand Down Expand Up @@ -329,24 +330,24 @@ def wx_make_writable(target):

WX_PKGLIST = [cfg.PKGDIR] + [cfg.PKGDIR + '.' + pkg for pkg in find_packages('wx')]

ENTRY_POINTS = {
'console_scripts' : [
"img2png = wx.tools.img2png:main",
"img2py = wx.tools.img2py:main",
"img2xpm = wx.tools.img2xpm:main",
"pywxrc = wx.tools.pywxrc:main",
# ],
# 'gui_scripts' : [ # TODO: Why was this commented out?
"wxget = wx.tools.wxget:main", # New wx wget
"wxdocs = wx.tools.wxget_docs_demo:docs_main", # Get/Launch Docs
"wxdemo = wx.tools.wxget_docs_demo:demo_main", # Get/Launch Demo
"helpviewer = wx.tools.helpviewer:main",
"pycrust = wx.py.PyCrust:main",
"pyshell = wx.py.PyShell:main",
"pyslices = wx.py.PySlices:main",
"pyslicesshell = wx.py.PySlicesShell:main",
],
}
# ENTRY_POINTS = {
# 'console_scripts' : [
# "img2png = wx.tools.img2png:main",
# "img2py = wx.tools.img2py:main",
# "img2xpm = wx.tools.img2xpm:main",
# "pywxrc = wx.tools.pywxrc:main",
# # ],
# # 'gui_scripts' : [ # TODO: Why was this commented out?
# "wxget = wx.tools.wxget:main", # New wx wget
# "wxdocs = wx.tools.wxget_docs_demo:docs_main", # Get/Launch Docs
# "wxdemo = wx.tools.wxget_docs_demo:demo_main", # Get/Launch Demo
# "helpviewer = wx.tools.helpviewer:main",
# "pycrust = wx.py.PyCrust:main",
# "pyshell = wx.py.PyShell:main",
# "pyslices = wx.py.PySlices:main",
# "pyslicesshell = wx.py.PySlicesShell:main",
# ],
# }

SCRIPTS = []
DATA_FILES = []
Expand All @@ -361,32 +362,33 @@ def wx_make_writable(target):


if __name__ == '__main__':
setup(name = NAME,
setup(
# name = NAME,
version = cfg.VERSION,
description = DESCRIPTION,
long_description = LONG_DESCRIPTION,
long_description_content_type = 'text/x-rst',
author = AUTHOR,
author_email = AUTHOR_EMAIL,
url = URL,
project_urls = PROJECT_URLS,
download_url = DOWNLOAD_URL,
license = LICENSE,
# author = AUTHOR,
# author_email = AUTHOR_EMAIL,
# url = URL,
# project_urls = PROJECT_URLS,
# download_url = DOWNLOAD_URL,
# license = LICENSE,
platforms = PLATFORMS,
classifiers = [c for c in CLASSIFIERS.split("\n") if c],
keywords = KEYWORDS,
install_requires = INSTALL_REQUIRES,
zip_safe = False,
include_package_data = True,
# classifiers = [c for c in CLASSIFIERS.split("\n") if c],
# keywords = KEYWORDS,
# install_requires = INSTALL_REQUIRES,
# zip_safe = False,
# include_package_data = True,

packages = WX_PKGLIST,
ext_package = cfg.PKGDIR,

options = { 'build' : BUILD_OPTIONS },

scripts = SCRIPTS,
# scripts = SCRIPTS,
data_files = DATA_FILES,
headers = HEADERS,
cmdclass = CMDCLASS,
entry_points = ENTRY_POINTS,
# entry_points = ENTRY_POINTS,
)
Loading
Loading