1
0
mirror of https://git.freebsd.org/ports.git synced 2026-06-02 11:08:52 +00:00

x11-toolkits/py-wxpython: rename and update to 4.2.4

Changelog: https://www.wxpython.org/news/2025-10-28-wxpython-424-release/index.html

- now builds under USE_PYTHON=pep517
- future-proof for setuptools update
- sync dependencies
- expose test suite

Event: Winter Field Day 2026
This commit is contained in:
Charlie Li
2026-01-26 13:38:35 -05:00
parent 49da6f759f
commit b5e003c2fd
12 changed files with 105 additions and 59 deletions
+1
View File
@@ -5087,3 +5087,4 @@ devel/tcl9-thread|devel/tcl-thread|2026-01-19|The new tcl-thread port supports b
java/jta||2026-01-19|Has expired: manual download, no users in the ports tree, newer version is at https://github.com/jakartaee/transactions
multimedia/ccextractor-gui||2026-01-20|Superseeded by flutter GUI, which we do not support
x11-fonts/open-sans|x11-fonts/opensans-ttf|2026-01-24|Rename to match upstream naming
x11-toolkits/py-wxPython4|x11-toolkits/py-wxpython|2026-01-26|Normalise and match Python package name
+1 -1
View File
@@ -127,7 +127,7 @@ _WX_VERS_LISTS= WANT_WX_VER WITH_WX_VER _WX_VER_INSTALLED
_WX_PORT_wx_3.0= x11-toolkits/wxgtk30@${_GTKFLAVOR}
_WX_LIB_wx_3.0= wx_baseu-3.0
_WX_PORT_python_3.2= x11-toolkits/py-wxPython4@${PY_FLAVOR}
_WX_PORT_python_3.2= x11-toolkits/py-wxpython@${PY_FLAVOR}
_WX_FILE_python_3.2= ${PYTHON_SITELIBDIR}/wx/__init__.py
# wxgtk 3.2
+1 -1
View File
@@ -194,7 +194,7 @@
SUBDIR += py-superqt
SUBDIR += py-tkinter
SUBDIR += py-tktreectrl
SUBDIR += py-wxPython4
SUBDIR += py-wxpython
SUBDIR += pythonqt
SUBDIR += qhotkey
SUBDIR += qml-box2d
-40
View File
@@ -1,40 +0,0 @@
PORTNAME= wxPython
PORTVERSION= 4.2.3
CATEGORIES= x11-toolkits python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
PKGNAMESUFFIX= 42
DIST_SUBDIR= python
MAINTAINER= desktop@FreeBSD.org
COMMENT= GUI toolkit for the Python programming language
WWW= https://www.wxpython.org
LICENSE= WXWINDOWS LGPL21+ GPLv2+
LICENSE_COMB= multi
LICENSE_NAME_WXWINDOWS= wxWindows Library Licence, Version 3.1
LICENSE_FILE_WXWINDOWS= ${WRKSRC}/license/licence.txt
LICENSE_PERMS_WXWINDOWS= dist-mirror pkg-mirror auto-accept
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pathlib2>0:devel/py-pathlib2@${PY_FLAVOR} \
${PKGNAMEPREFIX}requests>=2.28.1:www/py-requests@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
RUN_DEPENDS= ${PKGNAMEPREFIX}requests>=2.28.1:www/py-requests@${PY_FLAVOR}
USES= compiler:c++11-lib gl localbase pkgconfig python
USE_GL= glu
USE_WX= 3.2
USE_PYTHON= autoplist distutils
OPTIONS_DEFINE= NLS
NLS_USES= gettext
post-patch:
@${REINPLACE_CMD} -e "s|WX_CONFIG = 'wx-config'|WX_CONFIG = '${WX_CONFIG}'|" ${WRKSRC}/build.py
post-install:
${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR}/wx -name *.so -exec ${STRIP_CMD} {} +
.include <bsd.port.mk>
-3
View File
@@ -1,3 +0,0 @@
TIMESTAMP = 1766213363
SHA256 (python/wxPython-4.2.3.tar.gz) = 20d6e0c927e27ced85643719bd63e9f7fd501df6e9a8aab1489b039897fd7c01
SIZE (python/wxPython-4.2.3.tar.gz) = 58861286
@@ -1,11 +0,0 @@
--- setup.py.orig 2024-11-05 05:01:05 UTC
+++ setup.py
@@ -18,7 +18,7 @@ from distutils.command.build import build as or
from setuptools.command.install import install as orig_install
from setuptools.command.bdist_egg import bdist_egg as orig_bdist_egg
from setuptools.command.sdist import sdist as orig_sdist
-from setuptools.command.bdist_wheel import bdist_wheel as orig_bdist_wheel
+from wheel.bdist_wheel import bdist_wheel as orig_bdist_wheel
from buildtools.config import Config, msg, opj, runcmd, canGetSOName, getSOName
import buildtools.version as version
+58
View File
@@ -0,0 +1,58 @@
PORTNAME= wxpython
DISTVERSION= 4.2.4
CATEGORIES= x11-toolkits python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DIST_SUBDIR= python
PATCH_SITES= https://github.com/wxWidgets/Phoenix/commit/
PATCHFILES= afddb14f78b08a576930babd4dc645d8f3f94701.patch:-p1
MAINTAINER= desktop@FreeBSD.org
COMMENT= GUI toolkit for the Python programming language
WWW= https://www.wxpython.org
LICENSE= WXWINDOWS LGPL21+ GPLv2+
LICENSE_COMB= multi
LICENSE_NAME_WXWINDOWS= wxWindows Library Licence, Version 3.1
LICENSE_FILE_WXWINDOWS= ${WRKSRC}/license/licence.txt
LICENSE_PERMS_WXWINDOWS= dist-mirror pkg-mirror auto-accept
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}requests>=2.26.0:www/py-requests@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy>=0:math/py-numpy@${PY_FLAVOR} \
${PY_TYPING_EXTENSIONS}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}appdirs>=0:devel/py-appdirs@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}requests>=2.26.0:www/py-requests@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-xdist>=0:devel/py-pytest-xdist@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-forked>=0:devel/py-pytest-forked@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-timeout>=0:devel/py-pytest-timeout@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sphinx>=0:textproc/py-sphinx@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sphinxcontrib-jquery>=0:textproc/py-sphinxcontrib-jquery@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}beautifulsoup>=4:www/py-beautifulsoup@${PY_FLAVOR} \
${PY_TYPING_EXTENSIONS} \
${PYTHON_PKGNAMEPREFIX}numpy>=0:math/py-numpy@${PY_FLAVOR}
USES= compiler:c++11-lib localbase pkgconfig pyqt:6 python
USE_WX= 3.2
USE_PYQT= sip:build sip:test
USE_PYTHON= autoplist cython pep517 pytest
WRKSRC= ${WRKDIR}/wxPython-${DISTVERSION}
# https://github.com/wxWidgets/Phoenix/issues/2819
PEP517_BUILD_CMD= ${LOCALBASE}/bin/pyproject-build-${PYTHON_VER} --no-isolation --wheel ${PEP517_BUILD_CONFIG_SETTING}
OPTIONS_DEFINE= NLS
NLS_USES= gettext
post-patch:
@${REINPLACE_CMD} -e 's|wx-config|${WX_CONFIG:T}|g' ${WRKSRC}/build.py
@${REINPLACE_CMD} -e 's|sip == 6.12.0|sip >= 6.12.0|' ${WRKSRC}/pyproject.toml
post-install:
${FIND} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/wx -name "*.so" -exec ${STRIP_CMD} {} +
.include <bsd.port.mk>
+5
View File
@@ -0,0 +1,5 @@
TIMESTAMP = 1769400596
SHA256 (python/wxpython-4.2.4.tar.gz) = 2eb123979c87bcb329e8a2452269d60ff8f9f651e9bf25c67579e53c4ebbae3c
SIZE (python/wxpython-4.2.4.tar.gz) = 58583054
SHA256 (python/afddb14f78b08a576930babd4dc645d8f3f94701.patch) = 5f799a5507b56892e5a2160dd4f704e9606e6497392d93937e68637e7b51bf83
SIZE (python/afddb14f78b08a576930babd4dc645d8f3f94701.patch) = 4990
@@ -1,11 +1,11 @@
--- build.py.orig 2019-05-21 23:12:12 UTC
--- build.py.orig 2025-10-29 00:38:50 UTC
+++ build.py
@@ -401,7 +401,7 @@ def makeOptionParser():
@@ -423,7 +423,7 @@ def makeOptionParser():
("mac_framework", (False, "Build wxWidgets as a Mac framework.")),
("mac_arch", ("", "Comma separated list of architectures to build on Mac")),
- ("use_syswx", (False, "Try to use an installed wx rather than building the "
+ ("use_syswx", (True, "Try to use an installed wx rather than building the "
+ ("use_syswx", (True, "Try to use an installed wx rather than building the "
"one in this source tree. The wx-config in {prefix}/bin "
"or the first found on the PATH determines which wx is "
"used. Implies --no_magic.")),
@@ -0,0 +1,20 @@
remove after setuptools update past 70.1
--- pyproject.toml.orig 2025-10-29 00:38:50 UTC
+++ pyproject.toml
@@ -1,5 +1,5 @@
[project]
-name = "wxPython"
+name = "wxpython"
description = "Cross platform GUI toolkit for Python, \"Phoenix\" version"
requires-python = ">= 3.9"
authors = [
@@ -71,7 +71,7 @@ requires = [
[build-system]
requires = [
- "setuptools>=70.1",
+ "setuptools",
"cython >= 3.0.10",
"requests >= 2.26.0",
"sip == 6.12.0",
@@ -0,0 +1,16 @@
remove after setuptools update past 70.1
--- setup.py.orig 2025-10-29 00:38:50 UTC
+++ setup.py
@@ -18,7 +18,10 @@ from setuptools.command.sdist import sdist as or
from setuptools.command.install import install as orig_install
from setuptools.command.bdist_egg import bdist_egg as orig_bdist_egg
from setuptools.command.sdist import sdist as orig_sdist
-from setuptools.command.bdist_wheel import bdist_wheel as orig_bdist_wheel
+try:
+ from setuptools.command.bdist_wheel import bdist_wheel as orig_bdist_wheel
+except ImportError:
+ from wheel.bdist_wheel import bdist_wheel as orig_bdist_wheel
# Alter the path so that buildtools can be imported from the current directory.
sys.path.insert(0, os.path.dirname(__file__))