-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I migrated python stuff to make pkgcheck happy, three tests fail either way but that's close enough for me for right now
- Loading branch information
1 parent
c0fa9b3
commit 7b0fc31
Showing
7 changed files
with
211 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DIST wxPython-4.2.1.tar.gz 73724359 BLAKE2B d9569ea172c7279e0b2cfcb3cdcd5d1faab5324e2648c9b0f8c8b838fb2355dc6af28c4593e5dd0cfa02573133bf15a58a6ffa9711d854925a9cada0985dc7f8 SHA512 ee9ab8effb3c71de004c3d61ec583b9980c6b75fe9bb04cf2c76025ea70afc206bc3073c44d1c83c7ba604afed9fd38c01b9ef506617ba279a4ac58e3cf34438 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
https://bugs.gentoo.org/911703 | ||
https://github.com/wxWidgets/Phoenix/pull/2441 | ||
|
||
From aeb557d01e7cd37176ebbf0f1ae6d0b53c115378 Mon Sep 17 00:00:00 2001 | ||
From: Scott Talbert <[email protected]> | ||
Date: Tue, 25 Jul 2023 12:42:32 -0400 | ||
Subject: [PATCH] Fix compatibility with Cython 3.0.0 | ||
|
||
Remove unused import which seems to be removed in Cython 3. | ||
--- a/wx/svg/_nanosvg.pyx | ||
+++ b/wx/svg/_nanosvg.pyx | ||
@@ -42,7 +42,6 @@ for manipulating the SVG shape info in memory. | ||
|
||
import sys | ||
|
||
-cimport cython.object | ||
from cpython.buffer cimport ( | ||
Py_buffer, PyObject_CheckBuffer, PyObject_GetBuffer, PyBUF_SIMPLE, | ||
PyBuffer_Release) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- a/buildtools/config.py | ||
+++ b/buildtools/config.py | ||
@@ -236,9 +236,12 @@ class Configuration(object): | ||
for lst in [self.cflags, self.cxxflags]: | ||
lst.append('-O3') | ||
|
||
+ self.cflags += os.environ.get('CFLAGS', '').split() | ||
+ self.cxxflags += os.environ.get('CXXFLAGS', '').split() | ||
+ | ||
lflags = self.getWxConfigValue('--libs') | ||
self.MONOLITHIC = (lflags.find("_xrc") == -1) | ||
- self.lflags = lflags.split() | ||
+ self.lflags = lflags.split() + os.environ.get('LDFLAGS', '').split() | ||
|
||
self.WXBASENAME = self.getWxConfigValue('--basename') | ||
self.WXRELEASE = self.getWxConfigValue('--release') |
13 changes: 13 additions & 0 deletions
13
dev-python/wxpython/files/wxpython-4.2.0-no-attrdict.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
As in https://src.fedoraproject.org/rpms/python-wxpython4/raw/rawhide/f/no-attrdict.patch. | ||
--- a/buildtools/config.py | ||
+++ b/buildtools/config.py | ||
@@ -27,8 +27,6 @@ from distutils.dep_util import newer | ||
|
||
import distutils.sysconfig | ||
|
||
-from attrdict import AttrDict | ||
- | ||
runSilently = False | ||
|
||
#---------------------------------------------------------------------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- a/wscript | ||
+++ b/wscript | ||
@@ -244,15 +244,6 @@ | ||
uselib_store='WXGL', mandatory=True, | ||
msg='Finding libs for WXGL') | ||
|
||
- if cfg.checkSetup(wxConfigDir, 'wxUSE_WEBVIEW'): | ||
- wv_libs = '--libs webview,core,net' | ||
- else: | ||
- wv_libs = '--libs core,net' | ||
- conf.check_cfg(path=conf.options.wx_config, package='', | ||
- args='--cxxflags ' + wv_libs + rpath, | ||
- uselib_store='WXWEBVIEW', mandatory=True, | ||
- msg='Finding libs for WXWEBVIEW') | ||
- | ||
conf.check_cfg(path=conf.options.wx_config, package='', | ||
args='--cxxflags --libs xml,core,net' + rpath, | ||
uselib_store='WXXML', mandatory=True, | ||
@@ -600,7 +591,6 @@ | ||
makeETGRule(bld, 'etg/_stc.py', '_stc', 'WXSTC') | ||
makeETGRule(bld, 'etg/_html.py', '_html', 'WXHTML') | ||
makeETGRule(bld, 'etg/_glcanvas.py', '_glcanvas', 'WXGL') | ||
- makeETGRule(bld, 'etg/_html2.py', '_html2', 'WXWEBVIEW') | ||
makeETGRule(bld, 'etg/_xml.py', '_xml', 'WXXML') | ||
makeETGRule(bld, 'etg/_xrc.py', '_xrc', 'WXXRC') | ||
makeETGRule(bld, 'etg/_richtext.py', '_richtext', 'WXHTML WXRICHTEXT') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<upstream> | ||
<remote-id type="github">wxWidgets/Phoenix</remote-id> | ||
<remote-id type="pypi">wxPython</remote-id> | ||
</upstream> | ||
</pkgmetadata> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
# Copyright 1999-2024 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
DISTUTILS_EXT=1 | ||
#DISTUTILS_IN_SOURCE_BUILD="1" | ||
PYTHON_COMPAT=( python3_{10..12} ) | ||
PYPI_NO_NORMALIZE=1 | ||
PYPI_PN="wxPython" | ||
WX_GTK_VER="3.2-gtk3" | ||
DISTUTILS_USE_PEP517=setuptools | ||
|
||
inherit distutils-r1 multiprocessing virtualx wxwidgets pypi | ||
|
||
DESCRIPTION="A blending of the wxWindows C++ class library with Python" | ||
HOMEPAGE=" | ||
https://www.wxpython.org/ | ||
https://github.com/wxWidgets/Phoenix/ | ||
https://pypi.org/project/wxPython/ | ||
" | ||
|
||
LICENSE="wxWinLL-3" | ||
SLOT="4.0" | ||
KEYWORDS="~alpha amd64 ~arm ~arm64 ~loong ppc ppc64 ~riscv ~sparc ~x86" | ||
IUSE="test webkit" | ||
RESTRICT="!test? ( test )" | ||
|
||
# wxPython doesn't seem to be able to optionally disable features. webkit is | ||
# optionally patched out because it's so huge, but other elements are not, | ||
# which makes us have to require all features from wxGTK | ||
DEPEND=" | ||
>=x11-libs/wxGTK-3.0.4-r301:${WX_GTK_VER}=[gstreamer,libnotify,opengl,sdl,tiff,webkit?,X] | ||
media-libs/libpng:= | ||
media-libs/tiff:= | ||
media-libs/libjpeg-turbo:= | ||
" | ||
RDEPEND=" | ||
${DEPEND} | ||
" | ||
BDEPEND=" | ||
app-text/doxygen | ||
dev-python/cython[${PYTHON_USEDEP}] | ||
dev-python/setuptools[${PYTHON_USEDEP}] | ||
>=dev-python/sip-6.6.2[${PYTHON_USEDEP}] | ||
dev-python/six[${PYTHON_USEDEP}] | ||
test? ( | ||
${VIRTUALX_DEPEND} | ||
dev-python/appdirs[${PYTHON_USEDEP}] | ||
dev-python/numpy[${PYTHON_USEDEP}] | ||
dev-python/pillow[${PYTHON_USEDEP}] | ||
dev-python/pytest[${PYTHON_USEDEP}] | ||
dev-python/pytest-forked[${PYTHON_USEDEP}] | ||
dev-python/pytest-xdist[${PYTHON_USEDEP}] | ||
) | ||
" | ||
|
||
PATCHES=( | ||
"${FILESDIR}/${PN}-4.2.0-flags.patch" | ||
"${FILESDIR}/${PN}-4.2.0-cython-3.patch" | ||
) | ||
|
||
python_prepare_all() { | ||
if ! use webkit; then | ||
eapply "${FILESDIR}/${PN}-4.2.0-no-webkit.patch" | ||
fi | ||
|
||
distutils-r1_python_prepare_all | ||
} | ||
|
||
src_configure() { | ||
setup-wxwidgets | ||
} | ||
|
||
python_compile() { | ||
DOXYGEN="$(type -P doxygen)" ${PYTHON} build.py dox etg --nodoc || die | ||
|
||
# Refresh the bundled/pregenerated sip files | ||
"${EPYTHON}" build.py sip || die | ||
|
||
# Build the bindings | ||
"${EPYTHON}" build.py build_py \ | ||
--use_syswx \ | ||
--no_magic \ | ||
--jobs="$(makeopts_jobs)" \ | ||
--verbose \ | ||
--release || die | ||
} | ||
|
||
python_test() { | ||
local EPYTEST_DESELECT=( | ||
# virtx probably | ||
unittests/test_display.py::display_Tests::test_display | ||
unittests/test_frame.py::frame_Tests::test_frameRestore | ||
unittests/test_mousemanager.py::mousemanager_Tests::test_mousemanager1 | ||
unittests/test_uiaction.py::uiaction_KeyboardTests::test_uiactionKeyboardChar | ||
unittests/test_uiaction.py::uiaction_KeyboardTests::test_uiactionKeyboardKeyDownUp | ||
unittests/test_uiaction.py::uiaction_MouseTests | ||
|
||
# assertion (TODO) | ||
unittests/test_aboutdlg.py::aboutdlg_Tests::test_aboutdlgGeneric | ||
unittests/test_lib_agw_piectrl.py::lib_agw_piectrl_Tests::test_lib_agw_piectrlCtor | ||
|
||
# seems to rely on state from a previous test (sigh) | ||
unittests/test_lib_agw_persist_persistencemanager.py::lib_agw_persist_persistencemanager_Tests::test_persistencemanagerRestore | ||
|
||
# requires Spanish localization | ||
unittests/test_intl.py::intl_Tests::test_intlGetString | ||
|
||
# TODO | ||
unittests/test_tipwin.py::tipwin_Tests::test_tipwinCtor | ||
unittests/test_lib_pubsub_provider.py::lib_pubsub_Except::test1 | ||
unittests/test_windowid.py::IdManagerTest::test_newIdRef03 | ||
) | ||
local EPYTEST_IGNORE=() | ||
if ! use webkit; then | ||
EPYTEST_IGNORE+=( unittests/test_webview.py ) | ||
fi | ||
|
||
# We use pytest-forked as opensuse does to avoid tests corrupting each | ||
# other. | ||
virtx epytest --forked -n "$(makeopts_jobs)" unittests | ||
} | ||
|
||
python_install() { | ||
distutils-r1_python_install --skip-build | ||
} |