Compare commits
3 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| b26f0a0ab4 | |||
| 285afaad82 | |||
| c652436bef |
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 25 13:15:22 UTC 2024 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Add numpy2.patch to fix build with new numpy
|
||||
(gh#uvemas/ViTables!127).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 3 03:20:27 UTC 2024 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@ License: GPL-3.0-or-later
|
||||
Group: Productivity/Scientific/Other
|
||||
URL: https://github.com/uvemas/ViTables
|
||||
Source0: https://github.com/uvemas/ViTables/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM gh#uvemas/ViTables!127 Support numpy version 2
|
||||
Patch: numpy2.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: hdf5-devel
|
||||
BuildRequires: hicolor-icon-theme
|
||||
@@ -39,7 +41,6 @@ BuildRequires: python3-tables
|
||||
Requires: hdf5
|
||||
Requires: hicolor-icon-theme
|
||||
Requires: python3-QtPy
|
||||
Requires: python3-blosc2
|
||||
Requires: python3-numpy
|
||||
Requires: python3-qt5
|
||||
Requires: python3-tables
|
||||
@@ -54,7 +55,7 @@ through the data hierarchy, view and modify metadata, view actual data
|
||||
and more.
|
||||
|
||||
%prep
|
||||
%setup -q -n ViTables-%{version}
|
||||
%autosetup -p1 -n ViTables-%{version}
|
||||
find -name '*.py' -exec sed -i -e '/^#!\//, 1d' {} \;
|
||||
|
||||
%build
|
||||
|
||||
50
numpy2.patch
Normal file
50
numpy2.patch
Normal file
@@ -0,0 +1,50 @@
|
||||
From 756609317f80259fabf0fc39ee60d7cb1163f4d8 Mon Sep 17 00:00:00 2001
|
||||
From: Ludovico Massaccesi <62757383+lmassach@users.noreply.github.com>
|
||||
Date: Wed, 17 Jul 2024 09:54:21 +0200
|
||||
Subject: [PATCH] Support numpy version 2
|
||||
|
||||
---
|
||||
vitables/csv/csvutils.py | 2 +-
|
||||
vitables/nodeprops/attrpropdlg.py | 2 +-
|
||||
vitables/utils.py | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/vitables/csv/csvutils.py b/vitables/csv/csvutils.py
|
||||
index 0cda2f29..c012e724 100644
|
||||
--- a/vitables/csv/csvutils.py
|
||||
+++ b/vitables/csv/csvutils.py
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
# https://github.com/numpy/numpy/issues/10990
|
||||
import warnings
|
||||
-warnings.filterwarnings("ignore", category=numpy.VisibleDeprecationWarning)
|
||||
+warnings.filterwarnings("ignore", category=numpy.exceptions.VisibleDeprecationWarning)
|
||||
|
||||
|
||||
translate = QtWidgets.QApplication.translate
|
||||
diff --git a/vitables/nodeprops/attrpropdlg.py b/vitables/nodeprops/attrpropdlg.py
|
||||
index d2b7a9ca..3b67a150 100644
|
||||
--- a/vitables/nodeprops/attrpropdlg.py
|
||||
+++ b/vitables/nodeprops/attrpropdlg.py
|
||||
@@ -133,7 +133,7 @@ def fillSysAttrsPage(self, info):
|
||||
# isinstance(asi.test, int) returns True
|
||||
# asi.test.shape returns ()
|
||||
# asi.test2 = "hello" ->
|
||||
- # type(asi.test2) returns numpy.string_
|
||||
+ # type(asi.test2) returns numpy.bytes_
|
||||
# isinstance(asi.test2, str) returns True
|
||||
# asi.test2.shape returns ()
|
||||
# Beware that objects whose shape is () are not warranted
|
||||
diff --git a/vitables/utils.py b/vitables/utils.py
|
||||
index 11f616ee..c0b4b308 100644
|
||||
--- a/vitables/utils.py
|
||||
+++ b/vitables/utils.py
|
||||
@@ -453,7 +453,7 @@ def formatArrayContent(content):
|
||||
:Parameter content: the ``numpy`` array contained in the view cell
|
||||
"""
|
||||
|
||||
- if isinstance(content, numpy.string_):
|
||||
+ if isinstance(content, numpy.bytes_):
|
||||
try:
|
||||
return content.decode(DEFAULT_ENCODING)
|
||||
except UnicodeDecodeError:
|
||||
Reference in New Issue
Block a user