* [PR PATCH] tbb: fix Python module installation
@ 2024-03-04 15:57 ahesford
2024-03-04 16:00 ` [PR PATCH] [Updated] " ahesford
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: ahesford @ 2024-03-04 15:57 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 554 bytes --]
There is a new 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: 1463 bytes --]
From eb6602e6c210ba6ceda136ac45bff0df2f09e802 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 | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/tbb/template b/srcpkgs/tbb/template
index 560904f1e6745f..0f0ba4dc08c695 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,28 @@ 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() {
+ 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}" ] && mv "${f}" "${DESTDIR}/${py3_sitelib}"
+ done
+
+ for f in "${DESTDIR}/${py3_sitelib}"/*.egg; do
+ [ -e "${f}" ] && rmdir "${f}"
+ done
+}
+
tbb-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PR PATCH] [Updated] tbb: fix Python module installation
2024-03-04 15:57 [PR PATCH] tbb: fix Python module installation ahesford
@ 2024-03-04 16:00 ` ahesford
2024-03-04 16:08 ` ahesford
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: ahesford @ 2024-03-04 16:00 UTC (permalink / raw)
To: ml
[-- 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: 1489 bytes --]
From 20e5a6d9356a9dd00f9771c1614f38802a4fe9b1 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 | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/tbb/template b/srcpkgs/tbb/template
index 560904f1e6745f..c038013bb0d954 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,30 @@ 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() {
+ 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
+}
+
tbb-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PR PATCH] [Updated] tbb: fix Python module installation
2024-03-04 15:57 [PR PATCH] tbb: fix Python module installation ahesford
2024-03-04 16:00 ` [PR PATCH] [Updated] " ahesford
@ 2024-03-04 16:08 ` ahesford
2024-03-04 16:19 ` ahesford
2024-03-07 14:12 ` [PR PATCH] [Merged]: " ahesford
3 siblings, 0 replies; 5+ messages in thread
From: ahesford @ 2024-03-04 16:08 UTC (permalink / raw)
To: ml
[-- 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"
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PR PATCH] [Updated] tbb: fix Python module installation
2024-03-04 15:57 [PR PATCH] tbb: fix Python module installation ahesford
2024-03-04 16:00 ` [PR PATCH] [Updated] " ahesford
2024-03-04 16:08 ` ahesford
@ 2024-03-04 16:19 ` ahesford
2024-03-07 14:12 ` [PR PATCH] [Merged]: " ahesford
3 siblings, 0 replies; 5+ messages in thread
From: ahesford @ 2024-03-04 16:19 UTC (permalink / raw)
To: ml
[-- 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: 1866 bytes --]
From a64ff510358ff35fd621d7f6be93a609dc613e56 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 | 32 ++++++++++++++++++++++++++++++--
1 file changed, 30 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/tbb/template b/srcpkgs/tbb/template
index 560904f1e6745f..bd797f044d7434 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,41 @@ 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() {
+ # The Python package is installed as an egg, which is deprecated
+ # and isn't added to the Python path, so just unpack it.
+ local f sitelib
+ sitelib="${DESTDIR}/${py3_sitelib}"
+
+ for f in "${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 "${sitelib}"/TBB*.egg/*; do
+ [ -e "${f}" ] || continue
+ mv "${f}" "${DESTDIR}/${py3_sitelib}"
+ done
+
+ # Clean up the egg directory to confirm it was successfully unpacked
+ for f in "${sitelib}"/*.egg; do
+ [ -e "${f}" ] || continue
+ rmdir "${f}"
+ done
+
+ # Make sure the post-install hook finds this shlib for renaming
+ for f in "${sitelib}"/tbb/_api*.so; do
+ [ -e "${f}" ] || continue
+ chmod 0755 "${f}"
+ done
+}
+
tbb-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PR PATCH] [Merged]: tbb: fix Python module installation
2024-03-04 15:57 [PR PATCH] tbb: fix Python module installation ahesford
` (2 preceding siblings ...)
2024-03-04 16:19 ` ahesford
@ 2024-03-07 14:12 ` ahesford
3 siblings, 0 replies; 5+ messages in thread
From: ahesford @ 2024-03-07 14:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 403 bytes --]
There's a merged pull request on the void-packages repository
tbb: fix Python module installation
https://github.com/void-linux/void-packages/pull/49091
Description:
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**
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-03-07 14:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-04 15:57 [PR PATCH] tbb: fix Python module installation ahesford
2024-03-04 16:00 ` [PR PATCH] [Updated] " ahesford
2024-03-04 16:08 ` ahesford
2024-03-04 16:19 ` ahesford
2024-03-07 14:12 ` [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).