Github messages for voidlinux
 help / color / mirror / Atom feed
From: ahesford <ahesford@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] tbb: fix Python module installation
Date: Mon, 04 Mar 2024 17:08:34 +0100	[thread overview]
Message-ID: <20240304160834.8C3DC217EC@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-49091@inbox.vuxu.org>

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

There is an updated pull request by ahesford against master on the void-packages repository

https://github.com/ahesford/void-packages tbbia
https://github.com/void-linux/void-packages/pull/49091

tbb: fix Python module installation
Installing as an egg is deprecated and, without a path inclusion, makes the package un-importable anyway. The easiest path seems to be just unpacking the egg.

#### Testing the changes
- I tested the changes in this PR: **briefly**

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

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

From 78cbbcbeacbba0ee622f87b5f294274c9dfb6857 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 4 Mar 2024 10:21:20 -0500
Subject: [PATCH] tbb: fix Python module installation

---
 srcpkgs/tbb/template | 27 +++++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/tbb/template b/srcpkgs/tbb/template
index 560904f1e6745f..34fa495b573c25 100644
--- a/srcpkgs/tbb/template
+++ b/srcpkgs/tbb/template
@@ -1,7 +1,7 @@
 # Template file for 'tbb'
 pkgname=tbb
 version=2021.11.0
-revision=3
+revision=4
 build_style=cmake
 configure_args="-DTBB_STRICT=OFF -DTBB_TEST=OFF"
 makedepends="libgomp-devel libhwloc-devel"
@@ -28,13 +28,36 @@ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 fi
 
 post_extract() {
-
 	if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 		vsed -e "s@#define MALLOC_UNIXLIKE_OVERLOAD_ENABLED __linux__@@" \
 		  -i src/tbbmalloc_proxy/proxy.h
 	fi
 }
 
+post_install() {
+	# Python package is installed as an egg, which is deprecated and
+	# isn't added to the Python path anyway. Just unpack the egg...
+	#
+	local f
+	for f in "${DESTDIR}/${py3_sitelib}"/TBB*-"py${py3_ver}"*.egg/EGG-INFO; do
+		[ -d "${f}" ] || continue
+		mv "${f}" "${f%-"py${py3_ver}"*.egg/EGG-INFO}-py${py3_ver}.egg-info"
+	done
+
+	for f in "${DESTDIR}/${py3_sitelib}"/TBB*.egg/*; do
+		[ -e "${f}" ] || continue
+		mv "${f}" "${DESTDIR}/${py3_sitelib}"
+	done
+
+	for f in "${DESTDIR}/${py3_sitelib}"/*.egg; do
+		[ -e "${f}" ] || continue
+		rmdir "${f}"
+	done
+
+	# Make sure the post-install hook finds this shlib for renaming
+	chmod 0755 "${DESTDIR}/${py3_sitelib}"/tbb/_api*.so
+}
+
 tbb-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"

  parent reply	other threads:[~2024-03-04 16:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-04 15:57 [PR PATCH] " ahesford
2024-03-04 16:00 ` [PR PATCH] [Updated] " ahesford
2024-03-04 16:08 ` ahesford [this message]
2024-03-04 16:19 ` ahesford
2024-03-07 14:12 ` [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=20240304160834.8C3DC217EC@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).