summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-04-03 02:50:20 +0100
committerSam James <sam@gentoo.org>2023-04-03 02:50:20 +0100
commit637784cae39a93920b9738e8094d46d24331769d (patch)
tree2067c00fd57a00fb03afadb43bbc23255288ac57 /dev-python/pytables
parentdev-python/pytables: make cpuinfo optional (diff)
downloadgentoo-637784cae39a93920b9738e8094d46d24331769d.tar.gz
gentoo-637784cae39a93920b9738e8094d46d24331769d.tar.bz2
gentoo-637784cae39a93920b9738e8094d46d24331769d.zip
dev-python/pytables: tweak cpuinfo patch
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python/pytables')
-rw-r--r--dev-python/pytables/files/pytables-3.8.0-optional-cpuinfo.patch9
-rw-r--r--dev-python/pytables/pytables-3.8.0-r3.ebuild (renamed from dev-python/pytables/pytables-3.8.0-r2.ebuild)0
2 files changed, 6 insertions, 3 deletions
diff --git a/dev-python/pytables/files/pytables-3.8.0-optional-cpuinfo.patch b/dev-python/pytables/files/pytables-3.8.0-optional-cpuinfo.patch
index f56854b05289..2843914f4a87 100644
--- a/dev-python/pytables/files/pytables-3.8.0-optional-cpuinfo.patch
+++ b/dev-python/pytables/files/pytables-3.8.0-optional-cpuinfo.patch
@@ -1,6 +1,6 @@
https://github.com/PyTables/PyTables/pull/1013
-From 557f8c22b772506bfbb9e7eb4d60c0cf2125998b Mon Sep 17 00:00:00 2001
+From 9d2487eb53af940de3b5c79200c9f4c2b90f51f2 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Mon, 3 Apr 2023 02:07:47 +0100
Subject: [PATCH] Handle py-cpuinfo not being installed
@@ -15,19 +15,20 @@ in places where py-cpuinfo isn't yet ported.
Signed-off-by: Sam James <sam@gentoo.org>
--- a/tables/leaf.py
+++ b/tables/leaf.py
-@@ -4,7 +4,10 @@
+@@ -4,7 +4,11 @@ import warnings
import math
import numpy as np
-import cpuinfo
+try:
+ import cpuinfo
++ missing_cpuinfo = False
+except ImportError:
+ missing_cpuinfo = True
from .flavor import (check_flavor, internal_flavor, toarray,
alias_map as flavor_alias_map)
-@@ -336,20 +339,21 @@ def _calc_chunkshape(self, expectedrows, rowsize, itemsize):
+@@ -336,20 +340,21 @@ class Leaf(Node):
# Use a decent default value for chunksize
chunksize *= 16
# Now, go explore the L3 size and try to find a smarter chunksize
@@ -63,4 +64,6 @@ Signed-off-by: Sam James <sam@gentoo.org>
# In Blosc2, the chunksize cannot be larger than 2 GB - BLOSC2_MAX_BUFFERSIZE
if chunksize > 2**31 - 32:
chunksize = 2**31 - 32
+--
+2.40.0
diff --git a/dev-python/pytables/pytables-3.8.0-r2.ebuild b/dev-python/pytables/pytables-3.8.0-r3.ebuild
index 1e479c6bc7d4..1e479c6bc7d4 100644
--- a/dev-python/pytables/pytables-3.8.0-r2.ebuild
+++ b/dev-python/pytables/pytables-3.8.0-r3.ebuild