summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2024-07-17 16:48:45 +0200
committerPacho Ramos <pacho@gentoo.org>2024-07-17 16:49:07 +0200
commit5fbdebd5984b719226a226093eb2f6438d01f323 (patch)
treed43bfec0c3113e4da879d0a20d58fac1c96e8557 /dev-python/pygobject
parentwww-apps/sonarr-bin: drop 4.0.8.1874 (diff)
downloadgentoo-5fbdebd5984b719226a226093eb2f6438d01f323.tar.gz
gentoo-5fbdebd5984b719226a226093eb2f6438d01f323.tar.bz2
gentoo-5fbdebd5984b719226a226093eb2f6438d01f323.zip
dev-python/pygobject: Drop deprecated egg-info file
Closes: https://bugs.gentoo.org/936219 Signed-off-by: Pacho Ramos <pacho@gentoo.org>
Diffstat (limited to 'dev-python/pygobject')
-rw-r--r--dev-python/pygobject/files/pygobject-3.48.2-egg-info.patch39
-rw-r--r--dev-python/pygobject/pygobject-3.48.2-r1.ebuild82
2 files changed, 121 insertions, 0 deletions
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
+}