public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pygobject/files/, dev-python/pygobject/
@ 2023-06-08  4:39 Michał Górny
  0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2023-06-08  4:39 UTC (permalink / raw
  To: gentoo-commits

commit:     f52a24017053437ee589d851942946283a4c9310
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jun  8 04:06:38 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jun  8 04:06:38 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f52a2401

dev-python/pygobject: Replace our py3.12 sed with upstream fix

Replace our cheap test hack using `.*` regex with upstream patch
that conditionalizes the expected value per Python version.

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../pygobject/files/pygobject-3.44.1-py312.patch   | 48 ++++++++++++++++++++++
 dev-python/pygobject/pygobject-3.44.1.ebuild       | 13 +++---
 2 files changed, 53 insertions(+), 8 deletions(-)

diff --git a/dev-python/pygobject/files/pygobject-3.44.1-py312.patch b/dev-python/pygobject/files/pygobject-3.44.1-py312.patch
new file mode 100644
index 000000000000..331e3bc0a3f8
--- /dev/null
+++ b/dev-python/pygobject/files/pygobject-3.44.1-py312.patch
@@ -0,0 +1,48 @@
+From fe6aedd8eebd92844b873f72e99dc4023316c6f3 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Wed, 7 Jun 2023 22:27:55 +0200
+Subject: [PATCH] tests: fix test_gvalue_flat_array_in_item_marshal_failure for
+ Python 3.12
+
+See https://gitlab.gnome.org/GNOME/pygobject/-/issues/582
+
+_PyGI_ERROR_PREFIX() no longer works with 3.12 since we only get normalized
+exceptions in there and can't add a prefix like "Item X: " to the message.
+
+Until we figure out how to add this back for 3.12, align the tests with the
+new behaviour (the new exception notes API would be an option, see the
+linked issue)
+---
+ tests/test_gi.py | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/tests/test_gi.py b/tests/test_gi.py
+index 25a3b659..261d8b2b 100644
+--- a/tests/test_gi.py
++++ b/tests/test_gi.py
+@@ -1573,9 +1573,12 @@ class TestGValue(unittest.TestCase):
+         self.assertRaises(OverflowError, GIMarshallingTests.gvalue_flat_array,
+                           [GLib.MININT - 1, "42", True])
+ 
++        # FIXME: https://gitlab.gnome.org/GNOME/pygobject/-/issues/582#note_1764164
++        exc_prefix = "Item 0: " if sys.version_info[:2] < (3, 12) else ""
++
+         with pytest.raises(
+                 OverflowError,
+-                match='Item 0: %d not in range %d to %d' % (
++                match=exc_prefix + '%d not in range %d to %d' % (
+                     GLib.MAXINT + 1, GLib.MININT, GLib.MAXINT)):
+             GIMarshallingTests.gvalue_flat_array([GLib.MAXINT + 1, "42", True])
+ 
+@@ -1583,7 +1586,7 @@ class TestGValue(unittest.TestCase):
+ 
+         with pytest.raises(
+                 OverflowError,
+-                match='Item 0: %d not in range %d to %d' % (
++                match=exc_prefix + '%d not in range %d to %d' % (
+                     GLib.MAXUINT64 * 2, min_, max_)):
+             GIMarshallingTests.gvalue_flat_array([GLib.MAXUINT64 * 2, "42", True])
+ 
+-- 
+GitLab
+

diff --git a/dev-python/pygobject/pygobject-3.44.1.ebuild b/dev-python/pygobject/pygobject-3.44.1.ebuild
index 231063a2d18f..713c63dc4584 100644
--- a/dev-python/pygobject/pygobject-3.44.1.ebuild
+++ b/dev-python/pygobject/pygobject-3.44.1.ebuild
@@ -44,14 +44,11 @@ BDEPEND="
 	virtual/pkgconfig
 "
 
-src_prepare() {
-	# workaround minor py3.12 test failure
-	# (I wish we could just use EPYTEST_DESELECT here, sigh)
-	# https://gitlab.gnome.org/GNOME/pygobject/-/issues/582
-	sed -i -e 's@Item 0: @.*@' tests/test_gi.py || die
-
-	distutils-r1_src_prepare
-}
+PATCHES=(
+	# fix test failure on py3.12
+	# https://gitlab.gnome.org/GNOME/pygobject/-/commit/fe6aedd8eebd92844b873f72e99dc4023316c6f3
+	"${FILESDIR}/${P}-py312.patch"
+)
 
 python_configure() {
 	local emesonargs=(


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pygobject/files/, dev-python/pygobject/
@ 2024-07-17 12:12 Pacho Ramos
  0 siblings, 0 replies; 3+ messages in thread
From: Pacho Ramos @ 2024-07-17 12:12 UTC (permalink / raw
  To: gentoo-commits

commit:     3e44d8e0fe781c95c5478e57bcb8f29fd86383e3
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 17 10:39:56 2024 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Wed Jul 17 12:11:30 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e44d8e0

dev-python/pygobject: drop 3.44.1

Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>

 dev-python/pygobject/Manifest                      |  1 -
 .../pygobject/files/pygobject-3.44.1-py312.patch   | 48 ------------
 dev-python/pygobject/pygobject-3.44.1.ebuild       | 86 ----------------------
 3 files changed, 135 deletions(-)

diff --git a/dev-python/pygobject/Manifest b/dev-python/pygobject/Manifest
index 7f989d32e169..c8b85b769367 100644
--- a/dev-python/pygobject/Manifest
+++ b/dev-python/pygobject/Manifest
@@ -1,3 +1,2 @@
-DIST pygobject-3.44.1.tar.xz 559432 BLAKE2B 7edfe91ac1b7301befaf8ef17078b517666467f446bfbe25850336cd365d314153d444d29ecf028ce44a12cef1c94f139d110ac6784c8a2c6077730d4836f6cc SHA512 5f2ff4a068e7e24dcc32f8c43ba58660c85a0fabdd9ff0bac4ddf1ca82bd0fc962ce5cb3ab25b991c212d45e5e89dac67c3259c5423a7d7fd70b2ac1f56e5327
 DIST pygobject-3.46.0.tar.xz 561552 BLAKE2B 6b8c9b4bf6df819c09b7bd2ea6dcb0e7c24ed7f171487b774469bd2c4694df9d4473dbde05273afc7a370f2b1f352d60347aa221bdd674a4aa8a54123d5e54cd SHA512 48293c193ba5aece38d99f45d325d0329ac33e88442bf00848fe818a7c838977b8d2cf50a404c30e8852ccc0b4a44dfda07751d51acc21f740aa2ab6aa3ce661
 DIST pygobject-3.48.2.tar.xz 556244 BLAKE2B 6ac7a42752d65668f228aa9823a4e256b030bc84683857e5470bc373eaaf383904d18399379b4a7d0989644e2b0825d63cc8b3f927b97608a209f888bf8cb276 SHA512 11619f73be5894fae82b261779f33390d1aec51b02bcf285c58f3c76ee46dfc1b3f435e4662176fde5ca899aee5afc453f8f0ba28e15e15330a52354cf737d45

diff --git a/dev-python/pygobject/files/pygobject-3.44.1-py312.patch b/dev-python/pygobject/files/pygobject-3.44.1-py312.patch
deleted file mode 100644
index 331e3bc0a3f8..000000000000
--- a/dev-python/pygobject/files/pygobject-3.44.1-py312.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From fe6aedd8eebd92844b873f72e99dc4023316c6f3 Mon Sep 17 00:00:00 2001
-From: Christoph Reiter <reiter.christoph@gmail.com>
-Date: Wed, 7 Jun 2023 22:27:55 +0200
-Subject: [PATCH] tests: fix test_gvalue_flat_array_in_item_marshal_failure for
- Python 3.12
-
-See https://gitlab.gnome.org/GNOME/pygobject/-/issues/582
-
-_PyGI_ERROR_PREFIX() no longer works with 3.12 since we only get normalized
-exceptions in there and can't add a prefix like "Item X: " to the message.
-
-Until we figure out how to add this back for 3.12, align the tests with the
-new behaviour (the new exception notes API would be an option, see the
-linked issue)
----
- tests/test_gi.py | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/tests/test_gi.py b/tests/test_gi.py
-index 25a3b659..261d8b2b 100644
---- a/tests/test_gi.py
-+++ b/tests/test_gi.py
-@@ -1573,9 +1573,12 @@ class TestGValue(unittest.TestCase):
-         self.assertRaises(OverflowError, GIMarshallingTests.gvalue_flat_array,
-                           [GLib.MININT - 1, "42", True])
- 
-+        # FIXME: https://gitlab.gnome.org/GNOME/pygobject/-/issues/582#note_1764164
-+        exc_prefix = "Item 0: " if sys.version_info[:2] < (3, 12) else ""
-+
-         with pytest.raises(
-                 OverflowError,
--                match='Item 0: %d not in range %d to %d' % (
-+                match=exc_prefix + '%d not in range %d to %d' % (
-                     GLib.MAXINT + 1, GLib.MININT, GLib.MAXINT)):
-             GIMarshallingTests.gvalue_flat_array([GLib.MAXINT + 1, "42", True])
- 
-@@ -1583,7 +1586,7 @@ class TestGValue(unittest.TestCase):
- 
-         with pytest.raises(
-                 OverflowError,
--                match='Item 0: %d not in range %d to %d' % (
-+                match=exc_prefix + '%d not in range %d to %d' % (
-                     GLib.MAXUINT64 * 2, min_, max_)):
-             GIMarshallingTests.gvalue_flat_array([GLib.MAXUINT64 * 2, "42", True])
- 
--- 
-GitLab
-

diff --git a/dev-python/pygobject/pygobject-3.44.1.ebuild b/dev-python/pygobject/pygobject-3.44.1.ebuild
deleted file mode 100644
index 713c63dc4584..000000000000
--- a/dev-python/pygobject/pygobject-3.44.1.ebuild
+++ /dev/null
@@ -1,86 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_EXT=1
-DISTUTILS_USE_PEP517=no
-PYTHON_COMPAT=( python3_{10..12} pypy3 )
-
-inherit gnome.org meson virtualx xdg distutils-r1
-
-DESCRIPTION="Python bindings for GObject Introspection"
-HOMEPAGE="
-	https://pygobject.readthedocs.io/
-	https://gitlab.gnome.org/GNOME/pygobject/
-"
-
-LICENSE="LGPL-2.1+"
-SLOT="3"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
-IUSE="+cairo examples test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	>=dev-libs/glib-2.56:2
-	>=dev-libs/gobject-introspection-1.56:=
-	dev-libs/libffi:=
-	cairo? (
-		>=dev-python/pycairo-1.16.0[${PYTHON_USEDEP}]
-		x11-libs/cairo[glib]
-	)
-"
-DEPEND="
-	${RDEPEND}
-	test? (
-		>=app-accessibility/at-spi2-core-2.46.0[introspection]
-		dev-python/pytest[${PYTHON_USEDEP}]
-		x11-libs/gdk-pixbuf:2[introspection,jpeg]
-		x11-libs/gtk+:3[introspection]
-		x11-libs/pango[introspection]
-	)
-"
-BDEPEND="
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	# fix test failure on py3.12
-	# https://gitlab.gnome.org/GNOME/pygobject/-/commit/fe6aedd8eebd92844b873f72e99dc4023316c6f3
-	"${FILESDIR}/${P}-py312.patch"
-)
-
-python_configure() {
-	local emesonargs=(
-		$(meson_feature cairo pycairo)
-		$(meson_use test tests)
-		-Dpython="${EPYTHON}"
-	)
-	meson_src_configure
-}
-
-python_compile() {
-	meson_src_compile
-}
-
-src_test() {
-	virtx distutils-r1_src_test
-}
-
-python_test() {
-	local -x GIO_USE_VFS="local" # prevents odd issues with deleting ${T}/.gvfs
-	local -x GIO_USE_VOLUME_MONITOR="unix" # prevent udisks-related failures in chroots, bug #449484
-	local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
-	local -x XDG_CACHE_HOME="${T}/${EPYTHON}"
-	meson_src_test --timeout-multiplier 3 || die "test failed for ${EPYTHON}"
-}
-
-python_install() {
-	meson_src_install
-	python_optimize
-}
-
-python_install_all() {
-	distutils-r1_python_install_all
-	use examples && dodoc -r examples
-}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pygobject/files/, dev-python/pygobject/
@ 2024-07-17 14:49 Pacho Ramos
  0 siblings, 0 replies; 3+ messages in thread
From: Pacho Ramos @ 2024-07-17 14:49 UTC (permalink / raw
  To: gentoo-commits

commit:     5fbdebd5984b719226a226093eb2f6438d01f323
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 17 14:48:45 2024 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Wed Jul 17 14:49:07 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5fbdebd5

dev-python/pygobject: Drop deprecated egg-info file

Closes: https://bugs.gentoo.org/936219
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>

 .../files/pygobject-3.48.2-egg-info.patch          | 39 ++++++++++
 dev-python/pygobject/pygobject-3.48.2-r1.ebuild    | 82 ++++++++++++++++++++++
 2 files changed, 121 insertions(+)

diff --git a/dev-python/pygobject/files/pygobject-3.48.2-egg-info.patch b/dev-python/pygobject/files/pygobject-3.48.2-egg-info.patch
new file mode 100644
index 000000000000..0da834216f34
--- /dev/null
+++ b/dev-python/pygobject/files/pygobject-3.48.2-egg-info.patch
@@ -0,0 +1,39 @@
+From 2aa50b8841c26eb892f4666508ba72ebb8179f26 Mon Sep 17 00:00:00 2001
+From: Chris Mayo <aklhfex@gmail.com>
+Date: Mon, 25 Mar 2024 19:21:21 +0000
+Subject: [PATCH] Replace non-standard .egg-info file
+
+Installing a .dist-info directory containing just METADATA is compliant:
+
+https://packaging.python.org/en/latest/specifications/recording-installed-packages/#the-dist-info-directory
+---
+ PKG-INFO.in => METADATA.in | 0
+ meson.build                | 6 +++---
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+ rename PKG-INFO.in => METADATA.in (100%)
+
+diff --git a/PKG-INFO.in b/METADATA.in
+similarity index 100%
+rename from PKG-INFO.in
+rename to METADATA.in
+diff --git a/meson.build b/meson.build
+index b8d69c3a..32204ad5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -194,10 +194,10 @@ if not for_wheel
+ 
+   pkginfo_conf = configuration_data()
+   pkginfo_conf.set('VERSION', py_version)
+-  configure_file(input : 'PKG-INFO.in',
+-  output : 'PyGObject-@0@.egg-info'.format(py_version),
++  configure_file(input : 'METADATA.in',
++  output : 'METADATA',
+   configuration : pkginfo_conf,
+-  install_dir : python.get_install_dir(pure : false))
++  install_dir : python.get_install_dir(pure : false) / 'PyGObject-@0@.dist-info'.format(py_version))
+ endif
+ 
+ pygobject_dep = declare_dependency(
+-- 
+GitLab
+

diff --git a/dev-python/pygobject/pygobject-3.48.2-r1.ebuild b/dev-python/pygobject/pygobject-3.48.2-r1.ebuild
new file mode 100644
index 000000000000..08a08ac159f8
--- /dev/null
+++ b/dev-python/pygobject/pygobject-3.48.2-r1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=no
+PYTHON_COMPAT=( python3_{11..13} pypy3 )
+
+inherit gnome.org meson virtualx xdg distutils-r1
+
+DESCRIPTION="Python bindings for GObject Introspection"
+HOMEPAGE="
+	https://pygobject.gnome.org/
+	https://gitlab.gnome.org/GNOME/pygobject/
+"
+
+LICENSE="LGPL-2.1+"
+SLOT="3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="+cairo examples test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	>=dev-libs/glib-2.64:2
+	>=dev-libs/gobject-introspection-1.64:=
+	dev-libs/libffi:=
+	cairo? (
+		>=dev-python/pycairo-1.16.0[${PYTHON_USEDEP}]
+		x11-libs/cairo[glib]
+	)
+"
+DEPEND="
+	${RDEPEND}
+	test? (
+		>=app-accessibility/at-spi2-core-2.46.0[introspection]
+		dev-python/pytest[${PYTHON_USEDEP}]
+		x11-libs/gdk-pixbuf:2[introspection,jpeg]
+		x11-libs/gtk+:3[introspection]
+		x11-libs/pango[introspection]
+	)
+"
+BDEPEND="
+	virtual/pkgconfig
+"
+
+PATCHES=( "${FILESDIR}/${P}-egg-info.patch" )
+
+python_configure() {
+	local emesonargs=(
+		$(meson_feature cairo pycairo)
+		$(meson_use test tests)
+		-Dpython="${EPYTHON}"
+	)
+	meson_src_configure
+}
+
+python_compile() {
+	meson_src_compile
+}
+
+src_test() {
+	virtx distutils-r1_src_test
+}
+
+python_test() {
+	local -x GIO_USE_VFS="local" # prevents odd issues with deleting ${T}/.gvfs
+	local -x GIO_USE_VOLUME_MONITOR="unix" # prevent udisks-related failures in chroots, bug #449484
+	local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+	local -x XDG_CACHE_HOME="${T}/${EPYTHON}"
+	meson_src_test --timeout-multiplier 3 || die "test failed for ${EPYTHON}"
+}
+
+python_install() {
+	meson_src_install
+	python_optimize
+}
+
+python_install_all() {
+	distutils-r1_python_install_all
+	use examples && dodoc -r examples
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-17 14:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-08  4:39 [gentoo-commits] repo/gentoo:master commit in: dev-python/pygobject/files/, dev-python/pygobject/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2024-07-17 12:12 Pacho Ramos
2024-07-17 14:49 Pacho Ramos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox