Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] python-dbus: include egg-info metadata
@ 2022-03-21 14:24 ahesford
  2022-03-22 18:02 ` [PR PATCH] [Merged]: " ahesford
  0 siblings, 1 reply; 2+ messages in thread
From: ahesford @ 2022-03-21 14:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 525 bytes --]

There is a new pull request by ahesford against master on the void-packages repository

https://github.com/ahesford/void-packages py-dbus
https://github.com/void-linux/void-packages/pull/36262

python-dbus: include egg-info metadata
Also drop python-dbus-devel, there is no value in carrying the metapkg.

Hopefully this fixes test-time detection of `python-dbus` in, *e.g.*, https://github.com/void-linux/void-packages/pull/36216.

A patch file from https://github.com/void-linux/void-packages/pull/36262.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-py-dbus-36262.patch --]
[-- Type: text/x-diff, Size: 3644 bytes --]

From d06514abc04ee75aa97d3b5cdf4c1d4ec014682a Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 21 Mar 2022 10:02:40 -0400
Subject: [PATCH] python-dbus: include egg-info metadata

Also drop python-dbus-devel, there is no value in carrying the metapkg.
---
 srcpkgs/python-dbus-devel    |  1 -
 srcpkgs/python-dbus/template | 64 ++++++++++++++++++++++--------------
 2 files changed, 39 insertions(+), 26 deletions(-)
 delete mode 120000 srcpkgs/python-dbus-devel

diff --git a/srcpkgs/python-dbus-devel b/srcpkgs/python-dbus-devel
deleted file mode 120000
index 082b5c2fc193..000000000000
--- a/srcpkgs/python-dbus-devel
+++ /dev/null
@@ -1 +0,0 @@
-python-dbus
\ No newline at end of file
diff --git a/srcpkgs/python-dbus/template b/srcpkgs/python-dbus/template
index 19ac9e7cbf0b..64c1ae021798 100644
--- a/srcpkgs/python-dbus/template
+++ b/srcpkgs/python-dbus/template
@@ -1,11 +1,11 @@
 # Template file for 'python-dbus'
 pkgname=python-dbus
 version=1.2.18
-revision=1
+revision=2
 wrksrc="dbus-python-${version}"
 build_style=gnu-configure
-hostmakedepends="pkg-config python-devel python3-devel"
-makedepends="libglib-devel ${hostmakedepends/pkg-config/}"
+hostmakedepends="pkg-config python python3"
+makedepends="libglib-devel python3-devel python-devel"
 depends="python dbus"
 short_desc="D-Bus Python2 bindings"
 maintainer="Orphaned <orphan@voidlinux.org>"
@@ -20,35 +20,55 @@ pre_configure() {
 	mv * dbus-${py2_ver} || true
 	cp -a dbus-${py2_ver} dbus-${py3_ver}
 }
+
 do_configure() {
-	local py_abiver=
+	local py_abiver py_inc pyver
 	for pyver in $py2_ver $py3_ver; do
-		if [ "$pyver" != "$py2_ver" ]; then
-			py_inc="$py3_inc"
-			py_abiver="$py3_abiver"
-		else
-			py_inc="$py2_inc"
-		fi
+		case "${pyver}" in
+			"${py2_ver}")
+				py_inc="$py2_inc"
+				;;
+			*)
+				py_inc="$py3_inc"
+				py_abiver="$py3_abiver"
+				;;
+		esac
 
-		cd ${wrksrc}/dbus-${pyver}
 		export PYTHON_CPPFLAGS="-I${XBPS_CROSS_BASE}/${py_inc}"
 		export PYTHON_EXTRA_LIBS="-L${XBPS_CROSS_BASE}/usr/lib -lpython${pyver}${py_abiver}"
 		export PYTHON_VERSION="${pyver}"
-		./configure ${configure_args}
+
+		( cd dbus-${pyver} && ./configure ${configure_args} )
+
 	done
+
+	unset PYTHON_CPPFLAGS PYTHON_EXTRA_LIBS PYTHON_VERSION
 }
+
 do_build() {
+	local pyver
 	for pyver in $py2_ver $py3_ver; do
-		cd ${wrksrc}/dbus-${pyver}
-		make ${makejobs}
+		( cd dbus-${pyver} && make ${makejobs} )
 	done
 }
+
 do_install() {
+	local pyver pysite eggver
 	for pyver in $py2_ver $py3_ver; do
-		cd ${wrksrc}/dbus-${pyver}
-		make DESTDIR=${DESTDIR} install
-		vlicense COPYING
+		case "${pyver}" in
+			"${py2_ver}") pysite="${py2_sitelib}" ;;
+			*) pysite="${py3_sitelib}" ;;
+		esac
+
+		eggver="dbus_python-${version}-py${pyver}"
+		(
+			cd dbus-${pyver}
+			make DESTDIR=${DESTDIR} install
+			vcopy dbus_python.egg-info "${pysite}/${eggver}.egg-info"
+		)
 	done
+
+	vlicense dbus-${py2_ver}/COPYING
 }
 
 python3-dbus_package() {
@@ -57,16 +77,10 @@ python3-dbus_package() {
 	short_desc="${short_desc/Python2/Python3}"
 	pkg_install() {
 		vmove usr/lib/python3*
+		vlicense dbus-${py3_ver}/COPYING
 	}
 }
-# This package used to provide both Python 2 and Python 3 development files
-# Those files are now in python3-dbus-devel
-python-dbus-devel_package() {
-	depends="python-devel python-dbus>=${version}_${revision}
-	 python3-dbus-devel>=${version}_${revision}"
-	build_style=meta
-	short_desc+=" - development files (Python 2 meta)"
-}
+
 python3-dbus-devel_package() {
 	depends="python3-devel python3-dbus>=${version}_${revision}"
 	short_desc="${short_desc/Python2/Python3} - development files"

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

* Re: [PR PATCH] [Merged]: python-dbus: include egg-info metadata
  2022-03-21 14:24 [PR PATCH] python-dbus: include egg-info metadata ahesford
@ 2022-03-22 18:02 ` ahesford
  0 siblings, 0 replies; 2+ messages in thread
From: ahesford @ 2022-03-22 18:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 372 bytes --]

There's a merged pull request on the void-packages repository

python-dbus: include egg-info metadata
https://github.com/void-linux/void-packages/pull/36262

Description:
Also drop python-dbus-devel, there is no value in carrying the metapkg.

Hopefully this fixes test-time detection of `python-dbus` in, *e.g.*, https://github.com/void-linux/void-packages/pull/36216.

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

end of thread, other threads:[~2022-03-22 18:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-21 14:24 [PR PATCH] python-dbus: include egg-info metadata ahesford
2022-03-22 18:02 ` [PR PATCH] [Merged]: " ahesford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).