Github messages for voidlinux
 help / color / mirror / Atom feed
From: ahesford <ahesford@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] python-dbus: include egg-info metadata
Date: Mon, 21 Mar 2022 15:24:10 +0100	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-36262@inbox.vuxu.org> (raw)

[-- 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"

             reply	other threads:[~2022-03-21 14:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-21 14:24 ahesford [this message]
2022-03-22 18:02 ` [PR PATCH] [Merged]: " ahesford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-36262@inbox.vuxu.org \
    --to=ahesford@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).