From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1487699-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 0353115800F
	for <garchives@archives.gentoo.org>; Fri, 17 Feb 2023 08:40:54 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 53E23E086D;
	Fri, 17 Feb 2023 08:40:53 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 34FDFE086D
	for <gentoo-commits@lists.gentoo.org>; Fri, 17 Feb 2023 08:40:53 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 385C7341113
	for <gentoo-commits@lists.gentoo.org>; Fri, 17 Feb 2023 08:40:52 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 7AA9D8A9
	for <gentoo-commits@lists.gentoo.org>; Fri, 17 Feb 2023 08:40:50 +0000 (UTC)
From: "Arsen Arsenović" <arsen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Arsen Arsenović" <arsen@gentoo.org>
Message-ID: <1676623110.6abcc6cb062e9d7625c9a96a0adb6a8a0fb19ded.arsen@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/wxpython/, dev-python/wxpython/files/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-python/wxpython/Manifest dev-python/wxpython/files/wxpython-4.2.0-flags.patch dev-python/wxpython/files/wxpython-4.2.0-no-attrdict.patch dev-python/wxpython/files/wxpython-4.2.0-no-webkit.patch dev-python/wxpython/wxpython-4.2.0.ebuild
X-VCS-Directories: dev-python/wxpython/ dev-python/wxpython/files/
X-VCS-Committer: arsen
X-VCS-Committer-Name: Arsen Arsenović
X-VCS-Revision: 6abcc6cb062e9d7625c9a96a0adb6a8a0fb19ded
X-VCS-Branch: master
Date: Fri, 17 Feb 2023 08:40:50 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 5eb4eaf7-5178-4e1c-b6ee-d1660060ce8f
X-Archives-Hash: 1095e1cb1f3210beeb8e1c604742ae46

commit:     6abcc6cb062e9d7625c9a96a0adb6a8a0fb19ded
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Feb  3 14:40:26 2023 +0000
Commit:     Arsen Arsenović <arsen <AT> gentoo <DOT> org>
CommitDate: Fri Feb 17 08:38:30 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6abcc6cb

dev-python/wxpython: add 4.2.0

Thanks to Ștefan Talpalaru <stefantalpalaru <AT> yahoo.com> for his notes in the
bump bug.

Closes: https://bugs.gentoo.org/542672
Closes: https://bugs.gentoo.org/766914
Closes: https://bugs.gentoo.org/890953
Signed-off-by: Sam James <sam <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/29407
Signed-off-by: Arsen Arsenović <arsen <AT> gentoo.org>

 dev-python/wxpython/Manifest                       |   1 +
 .../wxpython/files/wxpython-4.2.0-flags.patch      |  16 +++
 .../files/wxpython-4.2.0-no-attrdict.patch         |  13 +++
 .../wxpython/files/wxpython-4.2.0-no-webkit.patch  |  27 +++++
 dev-python/wxpython/wxpython-4.2.0.ebuild          | 125 +++++++++++++++++++++
 5 files changed, 182 insertions(+)

diff --git a/dev-python/wxpython/Manifest b/dev-python/wxpython/Manifest
index c68723eb916e..197729320098 100644
--- a/dev-python/wxpython/Manifest
+++ b/dev-python/wxpython/Manifest
@@ -1 +1,2 @@
 DIST wxPython-4.0.7.post2.tar.gz 68891167 BLAKE2B 77eb69f7a59e5be81c3d17b64c76e09a43efc9226bd87fd058483185871a95ce05dbb65614ec8b003edf52cbe1cb1a115856c0d622170c51ecacbb952106fe22 SHA512 7af89db90a0f7e6b644d61c1ede01ec36a2c295e46d44692ae9dbc4af923310c1b498a52f45b02a89e8917d844c6abe67e5f3fdd9c1d51da3312899319a349e4
+DIST wxPython-4.2.0.tar.gz 70958238 BLAKE2B 2e8e34c4f5d1992983bfe4e09bb56ee5619b139b9b3b5f05dee48ecdf6971cf9fe1b0fb22aec685904eb44db6f50a4ba132a08aa91930d809040da828efa097e SHA512 9ec937a024efb2916403c84382a66004f0c2bb07471246b7de517778309ce459e929eeb59e261f538d3fa077c950628de62e49a3760fbd03ab9ff2114c6f354f

diff --git a/dev-python/wxpython/files/wxpython-4.2.0-flags.patch b/dev-python/wxpython/files/wxpython-4.2.0-flags.patch
new file mode 100644
index 000000000000..12af1e211b4a
--- /dev/null
+++ b/dev-python/wxpython/files/wxpython-4.2.0-flags.patch
@@ -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')

diff --git a/dev-python/wxpython/files/wxpython-4.2.0-no-attrdict.patch b/dev-python/wxpython/files/wxpython-4.2.0-no-attrdict.patch
new file mode 100644
index 000000000000..b3e4beff2cfe
--- /dev/null
+++ b/dev-python/wxpython/files/wxpython-4.2.0-no-attrdict.patch
@@ -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
+ 
+ #----------------------------------------------------------------------
+

diff --git a/dev-python/wxpython/files/wxpython-4.2.0-no-webkit.patch b/dev-python/wxpython/files/wxpython-4.2.0-no-webkit.patch
new file mode 100644
index 000000000000..5ab48cef727d
--- /dev/null
+++ b/dev-python/wxpython/files/wxpython-4.2.0-no-webkit.patch
@@ -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')
+

diff --git a/dev-python/wxpython/wxpython-4.2.0.ebuild b/dev-python/wxpython/wxpython-4.2.0.ebuild
new file mode 100644
index 000000000000..1c2f64bef4fe
--- /dev/null
+++ b/dev-python/wxpython/wxpython-4.2.0.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_IN_SOURCE_BUILD="1"
+PYTHON_COMPAT=( python3_{9..11} )
+WX_GTK_VER="3.2-gtk3"
+
+inherit distutils-r1 multiprocessing virtualx wxwidgets
+
+MY_PN="wxPython"
+MY_PV="${PV/_p/.post}"
+
+DESCRIPTION="A blending of the wxWindows C++ class library with Python"
+HOMEPAGE="https://www.wxpython.org/"
+SRC_URI="mirror://pypi/${P:0:1}/${MY_PN}/${MY_PN}-${MY_PV}.tar.gz"
+
+LICENSE="wxWinLL-3"
+SLOT="4.0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="test webkit"
+# Tests broken: #726812, #722716
+# Nearly there as of 4.2.0 but still quite flaky (inconsistent set of failures)
+RESTRICT="!test? ( 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
+RDEPEND="
+	>=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:=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	app-doc/doxygen
+	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}]
+	)
+"
+
+S="${WORKDIR}/${MY_PN}-${MY_PV}"
+
+PATCHES=(
+	#"${FILESDIR}/${PN}-4.0.6-skip-broken-tests.patch"
+	"${FILESDIR}/${PN}-4.2.0-no-attrdict.patch"
+	"${FILESDIR}/${PN}-4.2.0-flags.patch"
+)
+
+python_prepare_all() {
+	if ! use webkit; then
+		eapply "${FILESDIR}/${PN}-4.2.0-no-webkit.patch"
+		rm unittests/test_webview.py || die
+	fi
+
+	# Most of these tests disabled below fail because of the virtx/portage
+	# environment, but some fail for unknown reasons.
+	rm unittests/test_uiaction.py \
+		unittests/test_notifmsg.py \
+		unittests/test_mousemanager.py \
+		unittests/test_display.py \
+		unittests/test_pi_import.py \
+		unittests/test_lib_agw_thumbnailctrl.py \
+		unittests/test_sound.py || die
+
+	distutils-r1_python_prepare_all
+}
+
+src_configure() {
+	setup-wxwidgets
+}
+
+python_compile() {
+	DOXYGEN=/usr/bin/doxygen ${PYTHON} build.py dox etg --nodoc || die
+
+	# Refresh the bundled/pregenerated sip files
+	${PYTHON} build.py sip || die
+
+	# Build the bindings
+	${PYTHON} build.py build_py \
+		--use_syswx \
+		--no_magic \
+		--jobs="$(makeopts_jobs)" \
+		--verbose \
+		--release || die
+}
+
+python_test() {
+	EPYTEST_DESELECT=(
+		# Aborts, needs investigation
+		unittests/test_utils.py::utils_Tests::test_utilsSomeOtherStuff
+
+		# Failures, need investigation
+		unittests/test_frame.py::frame_Tests::test_frameRestore
+		unittests/test_fswatcher.py::fswatcher_Tests::test_fswatcher1
+		unittests/test_intl.py::intl_Tests::test_intlGetString
+		unittests/test_lib_busy.py::lib_busy_Tests::test_lib_busy5
+		unittests/test_lib_mixins_inspection.py::wit_TestCase::test_App_OnInit
+		unittests/test_lib_pubsub_provider.py::lib_pubsub_Except::test1
+		unittests/test_lib_pubsub_topicmgr.py::lib_pubsub_TopicMgr2_GetOrCreate_DefnProv::test20_UseProvider
+		unittests/test_windowid.py::IdManagerTest::test_newIdRef03
+		unittests/test_auibook.py::auibook_Tests::test_auibook02
+		unittests/test_lib_agw_persist_persistencemanager.py::lib_agw_persist_persistencemanager_Tests::test_persistencemanagerPersistValue
+		unittests/test_lib_agw_persist_persistencemanager.py::lib_agw_persist_persistencemanager_Tests::test_persistencemanagerRestore
+		unittests/test_aboutdlg.py::aboutdlg_Tests::test_aboutdlgGeneric
+		unittests/test_auiframemanager.py::auiframemanager_Tests::test_auiframemanager02
+	)
+
+	# 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
+}