commit
331774ee18
@ -0,0 +1 @@
|
||||
SOURCES/python-ndindex-1.7.tar.gz
|
@ -0,0 +1 @@
|
||||
cf2d3338a866ecfcff5442f06ddfb61305db2054 SOURCES/python-ndindex-1.7.tar.gz
|
@ -0,0 +1,32 @@
|
||||
From 2f13d7d8a9a5787b3e5d8615ae98db067ed77780 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sun, 16 Jul 2023 13:39:14 +0200
|
||||
Subject: [PATCH] Use configparser.ConfigParser instead of SafeConfigParser
|
||||
|
||||
The latter is a compat alias (since python 3.2) that was finally
|
||||
removed in python 3.12.
|
||||
|
||||
https://bugs.python.org/issue45173
|
||||
---
|
||||
versioneer.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/versioneer.py b/versioneer.py
|
||||
index 13901fcd1b..1e461ba029 100644
|
||||
--- a/versioneer.py
|
||||
+++ b/versioneer.py
|
||||
@@ -339,9 +339,9 @@ def get_config_from_root(root):
|
||||
# configparser.NoOptionError (if it lacks "VCS="). See the docstring at
|
||||
# the top of versioneer.py for instructions on writing your setup.cfg .
|
||||
setup_cfg = os.path.join(root, "setup.cfg")
|
||||
- parser = configparser.SafeConfigParser()
|
||||
+ parser = configparser.ConfigParser()
|
||||
with open(setup_cfg, "r") as f:
|
||||
- parser.readfp(f)
|
||||
+ parser.read_file(f)
|
||||
VCS = parser.get("versioneer", "VCS") # mandatory
|
||||
|
||||
def get(parser, name):
|
||||
--
|
||||
2.41.0
|
||||
|
@ -0,0 +1,44 @@
|
||||
From 3763937b7c986a35c17c816699fdc81c1859191c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sun, 16 Jul 2023 13:46:40 +0200
|
||||
Subject: [PATCH] setup.py: specify cython language_level
|
||||
|
||||
Cython still defaults to compat with python2, but ndindex requires >=3.7,
|
||||
so this is not useful. Specifying the level allows slightly shorter code
|
||||
and gets rid of a bunch of warnings:
|
||||
|
||||
/usr/lib64/python3.12/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /builddir/build/BUILD/ndindex-1.7/ndindex/_crt.py
|
||||
tree = Parsing.p_module(s, pxd, full_module_name)
|
||||
...
|
||||
---
|
||||
setup.py | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 5d7e7efe0d..f39b71f980 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -18,7 +18,9 @@ def check_cython():
|
||||
from Cython.Build import cythonize
|
||||
sys.argv = argv_org[:1] + ["build_ext"]
|
||||
setuptools.setup(name="foo", version="1.0.0",
|
||||
- ext_modules=cythonize(["ndindex/__init__.py"]))
|
||||
+ ext_modules=cythonize(
|
||||
+ ["ndindex/__init__.py"],
|
||||
+ language_level="3"))
|
||||
except:
|
||||
return False
|
||||
finally:
|
||||
@@ -37,7 +39,8 @@ else:
|
||||
|
||||
if use_cython:
|
||||
from Cython.Build import cythonize
|
||||
- ext_modules = cythonize(["ndindex/*.py"])
|
||||
+ ext_modules = cythonize(["ndindex/*.py"],
|
||||
+ language_level="3")
|
||||
else:
|
||||
ext_modules = []
|
||||
|
||||
--
|
||||
2.41.0
|
||||
|
@ -0,0 +1,113 @@
|
||||
## START: Set by rpmautospec
|
||||
## (rpmautospec version 0.6.5)
|
||||
## RPMAUTOSPEC: autorelease, autochangelog
|
||||
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
|
||||
release_number = 13;
|
||||
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
|
||||
print(release_number + base_release_number - 1);
|
||||
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
|
||||
## END: Set by rpmautospec
|
||||
|
||||
Name: python-ndindex
|
||||
Version: 1.7
|
||||
Release: %autorelease
|
||||
Summary: Python library for manipulating indices of ndarrays
|
||||
# Upstream specified license as MIT and this covers almost all source files.
|
||||
# ndindex-1.7/ndindex/_crt.py is BSD-3-Clause
|
||||
License: MIT AND BSD-3-Clause
|
||||
URL: https://quansight-labs.github.io/ndindex/
|
||||
Source: https://github.com/quansight-labs/ndindex/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
Patch: 0001-Use-configparser.ConfigParser-instead-of-SafeConfigP.patch
|
||||
Patch: 0002-setup.py-specify-cython-language_level.patch
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-Cython
|
||||
BuildRequires: gcc
|
||||
# For tests:
|
||||
BuildRequires: python3-pytest
|
||||
BuildRequires: python3-hypothesis
|
||||
BuildRequires: python3-numpy
|
||||
|
||||
ExcludeArch: %{ix86}
|
||||
|
||||
%global _description %{expand:
|
||||
ndindex is a library that allows representing and manipulating objects that can
|
||||
be valid indices to numpy arrays, i.e., slices, integers, ellipses, None,
|
||||
integer and boolean arrays, and tuples thereof.
|
||||
|
||||
The goals of the library are to provide a uniform API to manipulate these
|
||||
objects, match semantics of numpy's ndarray, and to provide useful
|
||||
transformation and manipulation functions on index objects.}
|
||||
|
||||
%description %_description
|
||||
|
||||
%package -n python3-ndindex
|
||||
Summary: %{summary}
|
||||
Requires: python3-numpy
|
||||
|
||||
%description -n python3-ndindex %_description
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n ndindex-%{version}
|
||||
|
||||
# It wants to add coverage and flakes, which is not useful for us
|
||||
rm pytest.ini
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
|
||||
%check
|
||||
OPTIONS=(
|
||||
# This test is flaky
|
||||
--deselect=ndindex/tests/test_shapetools.py::test_iter_indices_matmul
|
||||
# https://github.com/Quansight-Labs/ndindex/issues/158
|
||||
--deselect=ndindex/tests/test_ndindex.py::test_eq
|
||||
)
|
||||
|
||||
%pytest -v "${OPTIONS[@]}"
|
||||
|
||||
%files -n python3-ndindex
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
%{python3_sitearch}/ndindex/
|
||||
%{python3_sitearch}/ndindex-%{version}-py%{python3_version}.egg-info/
|
||||
|
||||
%changelog
|
||||
* Sun Jan 05 2025 Arkady L. Shane <tigro@msvsphere-os.ru> - 1.7-13
|
||||
- Rebuilt for MSVSphere 10
|
||||
|
||||
## START: Generated by rpmautospec
|
||||
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.7-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Sat Jun 08 2024 Python Maint <python-maint@redhat.com> - 1.7-12
|
||||
- Rebuilt for Python 3.13
|
||||
|
||||
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.7-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.7-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.7-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Sun Jul 16 2023 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.7-8
|
||||
- Fix build with python 3.12 (rhbz#2220349)
|
||||
|
||||
* Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 1.7-7
|
||||
- Rebuilt for Python 3.12
|
||||
|
||||
* Sat May 20 2023 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.7-6
|
||||
- Do not build for i686
|
||||
|
||||
* Fri May 19 2023 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.7-2
|
||||
- Fix license tag
|
||||
|
||||
* Sun May 14 2023 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.7-1
|
||||
- First working version
|
||||
## END: Generated by rpmautospec
|
Loading…
Reference in new issue