From f466bb07c71ab615cdf90fe85b7b088cfa070801 Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 13 2023 21:18:59 +0000 Subject: [PATCH 1/25] Convert to %autorelease and %autochangelog [skip changelog] --- diff --git a/changelog b/changelog new file mode 100644 index 0000000..bc1e43f --- /dev/null +++ b/changelog @@ -0,0 +1,60 @@ +* Fri Jul 21 2023 Fedora Release Engineering - 0.5.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Jun 14 2023 Python Maint - 0.5.2-6 +- Rebuilt for Python 3.12 + +* Fri Jan 20 2023 Fedora Release Engineering - 0.5.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 0.5.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 0.5.2-3 +- Rebuilt for Python 3.11 + +* Fri Jan 21 2022 Fedora Release Engineering - 0.5.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 30 2021 Ankur Sinha - 0.5.2-1 +- Update to latest release +- disable tests on s390x +- temporarily disable tests + +* Fri Jul 23 2021 Fedora Release Engineering - 0.5.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 0.5.1-4 +- Rebuilt for Python 3.10 + +* Sat May 22 2021 Ankur Sinha - 0.5.1-3 +- Correctly detect host builder cpu + +* Sat May 22 2021 Ankur Sinha - 0.5.1-2 +- Use correct macro for build arch + +* Fri May 21 2021 Ankur Sinha - 0.5.1-2 +- Disable tests for s390x where it runs into memory issues + +* Fri May 21 2021 Ankur Sinha - 0.5.1-1 +- Update to latest release +- Include patch to for py3.10 + +* Wed Jan 27 2021 Fedora Release Engineering - 0.5.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 0.5.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu Jun 25 2020 Ankur Sinha - 0.5.0-2 +- Explicitly BR setuptools + +* Tue Jun 02 2020 Ankur Sinha - 0.5.0-1 +- Update to 0.5.0 +- Enable tests + +* Thu May 28 2020 Ankur Sinha - 0.4.3-1 +- Add missing BRs for docs + +* Fri May 22 2020 Ankur Sinha - 0.4.3-1 +- Initial spec diff --git a/python-pypet.spec b/python-pypet.spec index d6d9022..537cfe6 100644 --- a/python-pypet.spec +++ b/python-pypet.spec @@ -14,7 +14,7 @@ of your simulations and analyses becomes a piece of cake!} Name: python-%{pypi_name} Version: 0.5.2 -Release: 7%{?dist} +Release: %autorelease Summary: Parameter exploration toolbox License: BSD @@ -100,63 +100,4 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} pypet/tests/all_single_co %doc doc/build/html examples/ %changelog -* Fri Jul 21 2023 Fedora Release Engineering - 0.5.2-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Wed Jun 14 2023 Python Maint - 0.5.2-6 -- Rebuilt for Python 3.12 - -* Fri Jan 20 2023 Fedora Release Engineering - 0.5.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Fri Jul 22 2022 Fedora Release Engineering - 0.5.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Mon Jun 13 2022 Python Maint - 0.5.2-3 -- Rebuilt for Python 3.11 - -* Fri Jan 21 2022 Fedora Release Engineering - 0.5.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Jul 30 2021 Ankur Sinha - 0.5.2-1 -- Update to latest release -- disable tests on s390x -- temporarily disable tests - -* Fri Jul 23 2021 Fedora Release Engineering - 0.5.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Fri Jun 04 2021 Python Maint - 0.5.1-4 -- Rebuilt for Python 3.10 - -* Sat May 22 2021 Ankur Sinha - 0.5.1-3 -- Correctly detect host builder cpu - -* Sat May 22 2021 Ankur Sinha - 0.5.1-2 -- Use correct macro for build arch - -* Fri May 21 2021 Ankur Sinha - 0.5.1-2 -- Disable tests for s390x where it runs into memory issues - -* Fri May 21 2021 Ankur Sinha - 0.5.1-1 -- Update to latest release -- Include patch to for py3.10 - -* Wed Jan 27 2021 Fedora Release Engineering - 0.5.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Wed Jul 29 2020 Fedora Release Engineering - 0.5.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Thu Jun 25 2020 Ankur Sinha - 0.5.0-2 -- Explicitly BR setuptools - -* Tue Jun 02 2020 Ankur Sinha - 0.5.0-1 -- Update to 0.5.0 -- Enable tests - -* Thu May 28 2020 Ankur Sinha - 0.4.3-1 -- Add missing BRs for docs - -* Fri May 22 2020 Ankur Sinha - 0.4.3-1 -- Initial spec +%autochangelog From 68d07e6f55675ae85ac3e084d1a1864a3cbcf7f2 Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 13 2023 21:19:45 +0000 Subject: [PATCH 2/25] Use new (rpm 4.17.1+) bcond style [skip changelog] --- diff --git a/python-pypet.spec b/python-pypet.spec index 537cfe6..e9b7bbd 100644 --- a/python-pypet.spec +++ b/python-pypet.spec @@ -1,7 +1,7 @@ # Multiple tests currently failing. # Temporarily disabling tests # https://github.com/SmokinCaterpillar/pypet/issues/63 -%bcond_with tests +%bcond tests 0 %global pypi_name pypet From f6c362296bf2ad0cb597e9f4574a2afd379d18b4 Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 13 2023 21:20:56 +0000 Subject: [PATCH 3/25] Reduce macro indirection in the spec file [skip changelog] --- diff --git a/python-pypet.spec b/python-pypet.spec index e9b7bbd..a67d049 100644 --- a/python-pypet.spec +++ b/python-pypet.spec @@ -3,8 +3,6 @@ # https://github.com/SmokinCaterpillar/pypet/issues/63 %bcond tests 0 -%global pypi_name pypet - %global _description %{expand: The new python parameter exploration toolkit: pypet manages exploration of the parameter space of any numerical simulation in python, thereby storing your @@ -12,14 +10,14 @@ data into HDF5 files for you. Moreover, pypet offers a new data container which lets you access all your parameters and results from a single source. Data I/O of your simulations and analyses becomes a piece of cake!} -Name: python-%{pypi_name} +Name: python-pypet Version: 0.5.2 Release: %autorelease Summary: Parameter exploration toolbox License: BSD -URL: https://pypi.org/pypi/%{pypi_name} -Source0: https://github.com/SmokinCaterpillar/%{pypi_name}/archive/%{version}/%{pypi_name}-%{version}.tar.gz +URL: https://pypi.org/pypi/pypet +Source0: https://github.com/SmokinCaterpillar/pypet/archive/%{version}/pypet-%{version}.tar.gz BuildArch: noarch @@ -27,7 +25,7 @@ BuildArch: noarch %description %_description -%package -n python3-%{pypi_name} +%package -n python3-pypet Summary: %{summary} BuildRequires: make BuildRequires: python3-devel @@ -51,7 +49,7 @@ BuildRequires: tex(anyfontsize.sty) BuildRequires: tex(amsthm.sty) BuildRequires: /usr/bin/dvipng -%description -n python3-%{pypi_name} %_description +%description -n python3-pypet %_description %package doc Summary: %{summary} @@ -60,8 +58,8 @@ Summary: %{summary} Documentation for %{name}. %prep -%autosetup -n %{pypi_name}-%{version} -rm -rf %{pypi_name}.egg-info +%autosetup -n pypet-%{version} +rm -rf pypet.egg-info # Remove gitignore files rm -fv examples/{,example_17_wrapping_an_existing_project,example_24_large_scale_brian2_simulation}/.gitignore @@ -89,11 +87,11 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} pypet/tests/all_single_co %endif %endif -%files -n python3-%{pypi_name} +%files -n python3-pypet %license LICENSE %doc README.md -%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info -%{python3_sitelib}/%{pypi_name} +%{python3_sitelib}/pypet-%{version}-py%{python3_version}.egg-info +%{python3_sitelib}/pypet %files doc %license LICENSE CHANGES.txt From 3d9b498918d3c4d8feff59f5f5f24d1423aa73ca Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 13 2023 21:28:22 +0000 Subject: [PATCH 4/25] Don’t number the sole Source [skip changelog] --- diff --git a/python-pypet.spec b/python-pypet.spec index a67d049..7024581 100644 --- a/python-pypet.spec +++ b/python-pypet.spec @@ -17,7 +17,7 @@ Summary: Parameter exploration toolbox License: BSD URL: https://pypi.org/pypi/pypet -Source0: https://github.com/SmokinCaterpillar/pypet/archive/%{version}/pypet-%{version}.tar.gz +Source: https://github.com/SmokinCaterpillar/pypet/archive/%{version}/pypet-%{version}.tar.gz BuildArch: noarch From e70457ad1d2d1b5d9eb8870a90bed89af4f41040 Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 13 2023 21:28:55 +0000 Subject: [PATCH 5/25] Switch the URL to the GitHub project page --- diff --git a/python-pypet.spec b/python-pypet.spec index 7024581..62f86ae 100644 --- a/python-pypet.spec +++ b/python-pypet.spec @@ -16,8 +16,8 @@ Release: %autorelease Summary: Parameter exploration toolbox License: BSD -URL: https://pypi.org/pypi/pypet -Source: https://github.com/SmokinCaterpillar/pypet/archive/%{version}/pypet-%{version}.tar.gz +URL: https://github.com/SmokinCaterpillar/pypet +Source: %{url}/archive/%{version}/pypet-%{version}.tar.gz BuildArch: noarch From cf20fdc0486628697dba0c2e640e5dd1dbbe302b Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 13 2023 21:29:48 +0000 Subject: [PATCH 6/25] Remove an obsolete macro [skip changelog] --- diff --git a/python-pypet.spec b/python-pypet.spec index 62f86ae..7ec65de 100644 --- a/python-pypet.spec +++ b/python-pypet.spec @@ -21,8 +21,6 @@ Source: %{url}/archive/%{version}/pypet-%{version}.tar.gz BuildArch: noarch -%{?python_enable_dependency_generator} - %description %_description %package -n python3-pypet From 8805a05f8dfea29ce3877a86c1fc28ef14f5eba1 Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 13 2023 21:35:05 +0000 Subject: [PATCH 7/25] Remove .gitignore files by finding rather than enumerating them [skip changelog] --- diff --git a/python-pypet.spec b/python-pypet.spec index 7ec65de..955b12d 100644 --- a/python-pypet.spec +++ b/python-pypet.spec @@ -59,8 +59,7 @@ Documentation for %{name}. %autosetup -n pypet-%{version} rm -rf pypet.egg-info -# Remove gitignore files -rm -fv examples/{,example_17_wrapping_an_existing_project,example_24_large_scale_brian2_simulation}/.gitignore +find . -type f -name .gitignore -print -delete %build %py3_build From 8ef045b33fc044a6c235bb111a9c5f09f51f446b Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 13 2023 21:44:06 +0000 Subject: [PATCH 8/25] Build Sphinx documentation as PDF instead of HTML --- diff --git a/python-pypet.spec b/python-pypet.spec index 955b12d..b3fa40d 100644 --- a/python-pypet.spec +++ b/python-pypet.spec @@ -3,6 +3,12 @@ # https://github.com/SmokinCaterpillar/pypet/issues/63 %bcond tests 0 +# Sphinx-generated HTML documentation is not suitable for packaging; see +# https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion. +# +# We can generate PDF documentation as a substitute. +%bcond doc_pdf 1 + %global _description %{expand: The new python parameter exploration toolkit: pypet manages exploration of the parameter space of any numerical simulation in python, thereby storing your @@ -25,7 +31,6 @@ BuildArch: noarch %package -n python3-pypet Summary: %{summary} -BuildRequires: make BuildRequires: python3-devel BuildRequires: %{py3_dist setuptools} BuildRequires: google-benchmark-devel @@ -41,11 +46,13 @@ BuildRequires: %{py3_dist scipy} BuildRequires: %{py3_dist tables} %endif -# For documentation +%if %{with doc_pdf} +BuildRequires: make +BuildRequires: python3dist(sphinx) BuildRequires: %{py3_dist sphinx} -BuildRequires: tex(anyfontsize.sty) -BuildRequires: tex(amsthm.sty) -BuildRequires: /usr/bin/dvipng +BuildRequires: python3-sphinx-latex +BuildRequires: latexmk +%endif %description -n python3-pypet %_description @@ -64,8 +71,11 @@ find . -type f -name .gitignore -print -delete %build %py3_build -make -C doc SPHINXBUILD=sphinx-build-3 html -rm -rf doc/build/html/{.doctrees,.buildinfo} -vf +%if %{with doc_pdf} +PYTHONPATH="${PWD}" %make_build -C doc latex \ + SPHINXOPTS='-j%{?_smp_build_ncpus}' +%make_build -C doc/build/latex LATEXMKOPTS='-quiet' +%endif %install %py3_install @@ -92,7 +102,10 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} pypet/tests/all_single_co %files doc %license LICENSE CHANGES.txt -%doc doc/build/html examples/ +%doc examples/ +%if %{with doc_pdf} +%doc doc/build/latex/pypet.pdf +%endif %changelog %autochangelog From caaf308532db00af60dbca2057859ccc4cde1545 Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 13 2023 22:06:18 +0000 Subject: [PATCH 9/25] Convert License to SPDX --- diff --git a/python-pypet.spec b/python-pypet.spec index b3fa40d..17883a7 100644 --- a/python-pypet.spec +++ b/python-pypet.spec @@ -21,7 +21,18 @@ Version: 0.5.2 Release: %autorelease Summary: Parameter exploration toolbox -License: BSD +# The entire source is BSD-3-Clause, except: +# +# CC0-1.0: +# - ciscripts/appveyor/install.ps1 +# +# While the CI script is clearly code, and CC0-1.0 is allowed only for content +# in Fedora, the file is covered by the exception for pre-existing code files +# in +# https://gitlab.com/fedora/legal/fedora-license-data/-/issues/91#note_1151947383. +# Furthermore, we remove the file in %%prep to show that it does not contribute +# to the license of the binary RPMs. +License: BSD-3-Clause URL: https://github.com/SmokinCaterpillar/pypet Source: %{url}/archive/%{version}/pypet-%{version}.tar.gz @@ -65,8 +76,9 @@ Documentation for %{name}. %prep %autosetup -n pypet-%{version} rm -rf pypet.egg-info - find . -type f -name .gitignore -print -delete +# This file is CC0-1.0. Remove it to show it doesn’t contribute to the build. +rm -v ciscripts/appveyor/install.ps1 %build %py3_build From 92d7dfedf57cecc8199865ec6cca013e70b6cfc0 Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 13 2023 22:23:11 +0000 Subject: [PATCH 10/25] Ensure tests always run on all architectures --- diff --git a/python-pypet.spec b/python-pypet.spec index 17883a7..ea64540 100644 --- a/python-pypet.spec +++ b/python-pypet.spec @@ -36,12 +36,19 @@ License: BSD-3-Clause URL: https://github.com/SmokinCaterpillar/pypet Source: %{url}/archive/%{version}/pypet-%{version}.tar.gz -BuildArch: noarch +# We have an arched base package and noarch binary RPMs to ensure that the +# tests always run on all architectures, since this package has a history of +# architecture-dependent failures. However, there is no compiled code in the +# package. +%global debug_package %{nil} %description %_description %package -n python3-pypet Summary: %{summary} + +BuildArch: noarch + BuildRequires: python3-devel BuildRequires: %{py3_dist setuptools} BuildRequires: google-benchmark-devel @@ -70,6 +77,8 @@ BuildRequires: latexmk %package doc Summary: %{summary} +BuildArch: noarch + %description doc Documentation for %{name}. @@ -98,8 +107,8 @@ PYTHONPATH="${PWD}" %make_build -C doc latex \ # https://github.com/SmokinCaterpillar/pypet/issues/56 %if %{with tests} export HDF5_DISABLE_VERSION_CHECK=1 +%ifarch s390x # Memory issues on s390x: OverflowError: Python int too large to convert to C int -%if "%{_host_cpu}" == "s390x" echo "Skip tests on s390x" %else PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} pypet/tests/all_single_core_tests.py From 2764f5e03402fb4fb24e4fc10c88b93caeed0dc4 Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 13 2023 22:23:11 +0000 Subject: [PATCH 11/25] Use %{python3} instead of %{__python3} [skip changelog] --- diff --git a/python-pypet.spec b/python-pypet.spec index ea64540..ffcdd85 100644 --- a/python-pypet.spec +++ b/python-pypet.spec @@ -111,7 +111,7 @@ export HDF5_DISABLE_VERSION_CHECK=1 # Memory issues on s390x: OverflowError: Python int too large to convert to C int echo "Skip tests on s390x" %else -PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} pypet/tests/all_single_core_tests.py +PYTHONPATH=%{buildroot}%{python3_sitelib} %{python3} pypet/tests/all_single_core_tests.py %endif %endif From e60403ac81bfcb79a28f2f02271d0c69db5ae863 Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 13 2023 22:23:11 +0000 Subject: [PATCH 12/25] Use %{py3_test_envvars} to run tests --- diff --git a/python-pypet.spec b/python-pypet.spec index ffcdd85..0575934 100644 --- a/python-pypet.spec +++ b/python-pypet.spec @@ -111,7 +111,7 @@ export HDF5_DISABLE_VERSION_CHECK=1 # Memory issues on s390x: OverflowError: Python int too large to convert to C int echo "Skip tests on s390x" %else -PYTHONPATH=%{buildroot}%{python3_sitelib} %{python3} pypet/tests/all_single_core_tests.py +%{py3_test_envvars} %{python3} pypet/tests/all_single_core_tests.py %endif %endif From 5b478e853ca4874f8cb9f21c347e8f89abd9ed70 Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 13 2023 22:34:23 +0000 Subject: [PATCH 13/25] Remove a spurious dependency on google-benchmark-devel --- diff --git a/python-pypet.spec b/python-pypet.spec index 0575934..3a8b7aa 100644 --- a/python-pypet.spec +++ b/python-pypet.spec @@ -51,8 +51,7 @@ BuildArch: noarch BuildRequires: python3-devel BuildRequires: %{py3_dist setuptools} -BuildRequires: google-benchmark-devel -# For tests + %if %{with tests} BuildRequires: %{py3_dist brian2} BuildRequires: %{py3_dist deap} From 60a8fb93a9bbade6f8cb5899569f88fe7c31ec37 Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 13 2023 22:40:58 +0000 Subject: [PATCH 14/25] Add a note about *not* depending on m2r [skip changelog] --- diff --git a/python-pypet.spec b/python-pypet.spec index 3a8b7aa..d8fcaab 100644 --- a/python-pypet.spec +++ b/python-pypet.spec @@ -52,6 +52,10 @@ BuildArch: noarch BuildRequires: python3-devel BuildRequires: %{py3_dist setuptools} +# The setup.py file has an optional dependency on m2r; if present, the long +# description is loaded from README.md. Since this isn’t the case for the +# actual wheel on PyPI, we omit the m2r dependency for consistency. + %if %{with tests} BuildRequires: %{py3_dist brian2} BuildRequires: %{py3_dist deap} From c3526e4deddc549c2478da0edba03cb0fa7ebe0b Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 13 2023 23:03:36 +0000 Subject: [PATCH 15/25] Backport support for NumPy >= 1.20 (and especially >= 1.24) --- diff --git a/2cf72fd784f4d90d24c3d3bb1f3a67fe29cebd5c.patch b/2cf72fd784f4d90d24c3d3bb1f3a67fe29cebd5c.patch new file mode 100644 index 0000000..0dffe15 --- /dev/null +++ b/2cf72fd784f4d90d24c3d3bb1f3a67fe29cebd5c.patch @@ -0,0 +1,132 @@ +From 2cf72fd784f4d90d24c3d3bb1f3a67fe29cebd5c Mon Sep 17 00:00:00 2001 +From: Steve Kowalik +Date: Tue, 14 Feb 2023 18:00:47 +1100 +Subject: [PATCH] Support NumPy >= 1.20 + +NumPy 1.20 deprecated the usage of aliases of builtin types, such as +np.float and np.int, and NumPy 1.24 removed them entirely. Switch to +using the builtin types everywhere. +--- + pypet/parameter.py | 4 ++-- + pypet/pypetconstants.py | 11 +++++------ + pypet/tests/integration/shared_data_test.py | 4 ++-- + pypet/tests/testutils/data.py | 2 +- + pypet/tests/unittests/shared_data_test.py | 6 +++--- + 5 files changed, 13 insertions(+), 14 deletions(-) + +diff --git a/pypet/parameter.py b/pypet/parameter.py +index ce260e41..ba8ef4af 100644 +--- a/pypet/parameter.py ++++ b/pypet/parameter.py +@@ -894,8 +894,8 @@ def f_supports(self, data): + # Numpy has many string types that depend on the length of the string, + # We allow all of them + dtype = data.dtype +- if np.issubdtype(dtype, np.str): +- dtype = np.str ++ if np.issubdtype(dtype, str): ++ dtype = str + + return dtype in pypetconstants.PARAMETER_SUPPORTED_DATA + +diff --git a/pypet/pypetconstants.py b/pypet/pypetconstants.py +index 8b1bcc18..35bd484e 100644 +--- a/pypet/pypetconstants.py ++++ b/pypet/pypetconstants.py +@@ -105,23 +105,22 @@ + numpy.int16, + numpy.int32, + numpy.int64, +- numpy.int, + numpy.int_, +- numpy.long, + numpy.uint8, + numpy.uint16, + numpy.uint32, + numpy.uint64, +- numpy.bool, + numpy.bool_, + numpy.float32, + numpy.float64, +- numpy.float, + numpy.float_, + numpy.complex64, +- numpy.complex, + numpy.complex_, + numpy.str_, ++ bool, ++ int, ++ complex, ++ float, + str, + bytes) + """Set of supported scalar types by the storage service and the standard parameter""" +@@ -329,4 +328,4 @@ + """Wildcard replaced by the name of the current run set""" + + DEFAULT_LOGGING = 'DEFAULT' +-"""Default logging configuration""" +\ No newline at end of file ++"""Default logging configuration""" +diff --git a/pypet/tests/integration/shared_data_test.py b/pypet/tests/integration/shared_data_test.py +index d823ee75..009fb63b 100644 +--- a/pypet/tests/integration/shared_data_test.py ++++ b/pypet/tests/integration/shared_data_test.py +@@ -172,7 +172,7 @@ def tearDown(self): + + def add_array_params(self, traj): + length = len(traj) +- da_data = np.zeros(length, dtype=np.int) ++ da_data = np.zeros(length, dtype=int) + traj.f_store(only_init=True) + traj.f_add_result(SharedResult, 'daarrays.a', SharedArray()).create_shared_data(obj=da_data) + traj.f_add_result(SharedResult, 'daarrays.ca', SharedCArray()).create_shared_data( obj=da_data) +@@ -459,4 +459,4 @@ def set_mode(self): + + if __name__ == '__main__': + opt_args = parse_args() +- run_suite(**opt_args) +\ No newline at end of file ++ run_suite(**opt_args) +diff --git a/pypet/tests/testutils/data.py b/pypet/tests/testutils/data.py +index 8c98c403..39b9691f 100644 +--- a/pypet/tests/testutils/data.py ++++ b/pypet/tests/testutils/data.py +@@ -118,7 +118,7 @@ def add_params(traj,param_dict): + traj.f_add_derived_parameter('Another.crun.String2', 'Really, again?', comment='test4') + + +- traj.f_add_result('Peter_Jackson',np.str(['is','full','of','suboptimal ideas']), ++ traj.f_add_result('Peter_Jackson', 'is full of suboptimal ideas', + comment='Only my opinion bro!',) + + traj.results.f_add_leaf('Test', 42, comment='NC') +diff --git a/pypet/tests/unittests/shared_data_test.py b/pypet/tests/unittests/shared_data_test.py +index 5987d0c0..50e85474 100644 +--- a/pypet/tests/unittests/shared_data_test.py ++++ b/pypet/tests/unittests/shared_data_test.py +@@ -267,7 +267,7 @@ def test_all_arrays(self): + traj = Trajectory(name=make_trajectory_name(self), filename=filename) + trajname = traj.v_name + +- npearray = np.ones((2, 10, 3), dtype=np.float) ++ npearray = np.ones((2, 10, 3), dtype=float) + thevlarray = np.array(['j'.encode('utf-8'), 22.2, 'gutter'.encode('utf-8')]) + traj.f_store(only_init=True) + res = traj.f_add_result(SharedResult, 'arrays') +@@ -345,7 +345,7 @@ def test_errors(self): + filename = make_temp_dir('hdf5errors.hdf5') + traj = Trajectory(name=make_trajectory_name(self), filename=filename) + +- npearray = np.ones((2, 10, 3), dtype=np.float) ++ npearray = np.ones((2, 10, 3), dtype=float) + thevlarray = np.array(['j'.encode('utf-8'), 22.2, 'gutter'.encode('utf-8')]) + + with self.assertRaises(TypeError): +@@ -979,4 +979,4 @@ def test_array_len(self): + + if __name__ == '__main__': + opt_args = parse_args() +- run_suite(**opt_args) +\ No newline at end of file ++ run_suite(**opt_args) diff --git a/python-pypet.spec b/python-pypet.spec index d8fcaab..9c49ce3 100644 --- a/python-pypet.spec +++ b/python-pypet.spec @@ -36,6 +36,10 @@ License: BSD-3-Clause URL: https://github.com/SmokinCaterpillar/pypet Source: %{url}/archive/%{version}/pypet-%{version}.tar.gz +# Support NumPy >= 1.20 +# https://github.com/SmokinCaterpillar/pypet/commit/2cf72fd784f4d90d24c3d3bb1f3a67fe29cebd5c +Patch: %{url}/commit/2cf72fd784f4d90d24c3d3bb1f3a67fe29cebd5c.patch + # We have an arched base package and noarch binary RPMs to ensure that the # tests always run on all architectures, since this package has a history of # architecture-dependent failures. However, there is no compiled code in the @@ -86,7 +90,7 @@ BuildArch: noarch Documentation for %{name}. %prep -%autosetup -n pypet-%{version} +%autosetup -n pypet-%{version} -p1 rm -rf pypet.egg-info find . -type f -name .gitignore -print -delete # This file is CC0-1.0. Remove it to show it doesn’t contribute to the build. From 4a389219854799c5c4352c264b7a4d6d9c1962d0 Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 14 2023 14:49:51 +0000 Subject: [PATCH 16/25] Patch for ConfigParser.readfp() removal in Python 3.12 --- diff --git a/69.patch b/69.patch new file mode 100644 index 0000000..766e3c1 --- /dev/null +++ b/69.patch @@ -0,0 +1,25 @@ +From f18eadca185f884acfe9a76204bbd0530eaf6fe7 Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Sat, 14 Oct 2023 10:29:12 -0400 +Subject: [PATCH] Replace ConfigParser.readfp() with ConfigParser.read_file() + +The former is deprecated since Python 3.2, and was removed in Python 3.12. + +https://docs.python.org/3.11/library/configparser.html#configparser.ConfigParser.readfp +--- + pypet/pypetlogging.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pypet/pypetlogging.py b/pypet/pypetlogging.py +index 5605c2da..3eb866f6 100644 +--- a/pypet/pypetlogging.py ++++ b/pypet/pypetlogging.py +@@ -556,7 +556,7 @@ def _handle_config_parsing(self, log_config): + + """ + parser = NoInterpolationParser() +- parser.readfp(log_config) ++ parser.read_file(log_config) + + rename_func = lambda string: rename_log_file(string, + env_name=self.env_name, diff --git a/python-pypet.spec b/python-pypet.spec index 9c49ce3..80ee174 100644 --- a/python-pypet.spec +++ b/python-pypet.spec @@ -40,6 +40,10 @@ Source: %{url}/archive/%{version}/pypet-%{version}.tar.gz # https://github.com/SmokinCaterpillar/pypet/commit/2cf72fd784f4d90d24c3d3bb1f3a67fe29cebd5c Patch: %{url}/commit/2cf72fd784f4d90d24c3d3bb1f3a67fe29cebd5c.patch +# Replace ConfigParser.readfp() with ConfigParser.read_file() +# https://github.com/SmokinCaterpillar/pypet/pull/69 +Patch: %{url}/pull/69.patch + # We have an arched base package and noarch binary RPMs to ensure that the # tests always run on all architectures, since this package has a history of # architecture-dependent failures. However, there is no compiled code in the From 35a15bf0c7bced5fade6ffd8effd516c2ffadb5b Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 14 2023 14:49:51 +0000 Subject: [PATCH 17/25] Port to pyproject-rpm-macros --- diff --git a/python-pypet.spec b/python-pypet.spec index 80ee174..b2be3eb 100644 --- a/python-pypet.spec +++ b/python-pypet.spec @@ -58,21 +58,21 @@ Summary: %{summary} BuildArch: noarch BuildRequires: python3-devel -BuildRequires: %{py3_dist setuptools} # The setup.py file has an optional dependency on m2r; if present, the long # description is loaded from README.md. Since this isn’t the case for the # actual wheel on PyPI, we omit the m2r dependency for consistency. -%if %{with tests} +# Needed to “smoke test” importing pypet.brian2 and for many tests and +# examples. Not a hard runtime dependency. BuildRequires: %{py3_dist brian2} -BuildRequires: %{py3_dist deap} + +%if %{with tests} BuildRequires: hdf5 +# Needed in several examples. +BuildRequires: %{py3_dist deap} +# Needed in several tests and examples BuildRequires: %{py3_dist matplotlib} -BuildRequires: %{py3_dist numpy} -BuildRequires: %{py3_dist pandas} -BuildRequires: %{py3_dist scipy} -BuildRequires: %{py3_dist tables} %endif %if %{with doc_pdf} @@ -100,8 +100,11 @@ find . -type f -name .gitignore -print -delete # This file is CC0-1.0. Remove it to show it doesn’t contribute to the build. rm -v ciscripts/appveyor/install.ps1 +%generate_buildrequires +%pyproject_buildrequires + %build -%py3_build +%pyproject_wheel %if %{with doc_pdf} PYTHONPATH="${PWD}" %make_build -C doc latex \ @@ -110,9 +113,11 @@ PYTHONPATH="${PWD}" %make_build -C doc latex \ %endif %install -%py3_install +%pyproject_install +%pyproject_save_files pypet %check +%pyproject_check_import -e '*tests*' # https://github.com/SmokinCaterpillar/pypet/blob/develop/ciscripts/travis/runtests.sh # Scoop is unmaintained. I've asked upstream to drop support for it: # https://github.com/SmokinCaterpillar/pypet/issues/56 @@ -126,11 +131,8 @@ echo "Skip tests on s390x" %endif %endif -%files -n python3-pypet -%license LICENSE +%files -n python3-pypet -f %{pyproject_files} %doc README.md -%{python3_sitelib}/pypet-%{version}-py%{python3_version}.egg-info -%{python3_sitelib}/pypet %files doc %license LICENSE CHANGES.txt From 37b0635d00a75dc90f363d3dfb86b72a04db0d2a Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 14 2023 14:56:08 +0000 Subject: [PATCH 18/25] Replace deprecated/removed unittest.TestCase method aliases --- diff --git a/70.patch b/70.patch new file mode 100644 index 0000000..da29f9e --- /dev/null +++ b/70.patch @@ -0,0 +1,50 @@ +From 1cf5bd7deffe2eaa91c6fd96b63dbb5f0d7eeafb Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Sat, 14 Oct 2023 10:54:25 -0400 +Subject: [PATCH] Replace deprecated/removed unittest.TestCase method aliases + +The method alias unittest.TestCase.assertEquals() was deprecated in +Python 3.2 and removed in Python 3.12. Replace it with +unittest.TestCase.assertEqual(). + +https://docs.python.org/3.11/library/unittest.html#deprecated-aliases +--- + pypet/tests/unittests/brian2tests/brian2_parameter_test.py | 2 +- + pypet/tests/unittests/storage_test.py | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/pypet/tests/unittests/brian2tests/brian2_parameter_test.py b/pypet/tests/unittests/brian2tests/brian2_parameter_test.py +index b7d0d4cd..e34e73f4 100644 +--- a/pypet/tests/unittests/brian2tests/brian2_parameter_test.py ++++ b/pypet/tests/unittests/brian2tests/brian2_parameter_test.py +@@ -250,7 +250,7 @@ class Brian2GetUnitFastTest(unittest.TestCase): + + def test_get_unit_fast(self): + unit = get_unit_fast(42 * mV) +- self.assertEquals(unit, 1000 * mV) ++ self.assertEqual(unit, 1000 * mV) + + + if __name__ == '__main__': +diff --git a/pypet/tests/unittests/storage_test.py b/pypet/tests/unittests/storage_test.py +index 6e189699..0bd849da 100644 +--- a/pypet/tests/unittests/storage_test.py ++++ b/pypet/tests/unittests/storage_test.py +@@ -481,7 +481,7 @@ def test_maximum_overview_size(self): + + store = pt.open_file(filename, mode='r+') + table = store.root._f_get_child(traj.v_name).overview.parameters_overview +- self.assertEquals(table.nrows, pypetconstants.HDF5_MAX_OVERVIEW_TABLE_LENGTH) ++ self.assertEqual(table.nrows, pypetconstants.HDF5_MAX_OVERVIEW_TABLE_LENGTH) + store.close() + + for irun in range(pypetconstants.HDF5_MAX_OVERVIEW_TABLE_LENGTH, +@@ -492,7 +492,7 @@ def test_maximum_overview_size(self): + + store = pt.open_file(filename, mode='r+') + table = store.root._f_get_child(traj.v_name).overview.parameters_overview +- self.assertEquals(table.nrows, pypetconstants.HDF5_MAX_OVERVIEW_TABLE_LENGTH) ++ self.assertEqual(table.nrows, pypetconstants.HDF5_MAX_OVERVIEW_TABLE_LENGTH) + store.close() + + env.f_disable_logging() diff --git a/python-pypet.spec b/python-pypet.spec index b2be3eb..166300e 100644 --- a/python-pypet.spec +++ b/python-pypet.spec @@ -44,6 +44,10 @@ Patch: %{url}/commit/2cf72fd784f4d90d24c3d3bb1f3a67fe29cebd5c.patch # https://github.com/SmokinCaterpillar/pypet/pull/69 Patch: %{url}/pull/69.patch +# Replace deprecated/removed unittest.TestCase method aliases +# https://github.com/SmokinCaterpillar/pypet/pull/70 +Patch: %{url}/pull/70.patch + # We have an arched base package and noarch binary RPMs to ensure that the # tests always run on all architectures, since this package has a history of # architecture-dependent failures. However, there is no compiled code in the From 3ee7fe05a6e9e51ac5bfab9bb8d058a065fd049a Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 14 2023 21:00:45 +0000 Subject: [PATCH 19/25] Don’t set HDF5_DISABLE_VERSION_CHECK We should *not* tolerate errors of this nature from dependencies. We should report them and request rebuilds. --- diff --git a/python-pypet.spec b/python-pypet.spec index 166300e..7b877f2 100644 --- a/python-pypet.spec +++ b/python-pypet.spec @@ -126,7 +126,6 @@ PYTHONPATH="${PWD}" %make_build -C doc latex \ # Scoop is unmaintained. I've asked upstream to drop support for it: # https://github.com/SmokinCaterpillar/pypet/issues/56 %if %{with tests} -export HDF5_DISABLE_VERSION_CHECK=1 %ifarch s390x # Memory issues on s390x: OverflowError: Python int too large to convert to C int echo "Skip tests on s390x" From c29f705fc66950899f916808ecba6100b896a6bd Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 14 2023 21:01:34 +0000 Subject: [PATCH 20/25] Re-enable the tests --- diff --git a/python-pypet.spec b/python-pypet.spec index 7b877f2..f2a87af 100644 --- a/python-pypet.spec +++ b/python-pypet.spec @@ -1,7 +1,4 @@ -# Multiple tests currently failing. -# Temporarily disabling tests -# https://github.com/SmokinCaterpillar/pypet/issues/63 -%bcond tests 0 +%bcond tests 1 # Sphinx-generated HTML documentation is not suitable for packaging; see # https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion. From 61bec3bad43faacf70afaf1b0de7e01ea6f45eb4 Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 14 2023 21:42:20 +0000 Subject: [PATCH 21/25] Drop i686 support for F39+ Normally, we couldn’t drop an architecture after final freeze, but in this case the i686 package was never installable due to dependency issues, so nothing is lost by dropping it. --- diff --git a/python-pypet.spec b/python-pypet.spec index f2a87af..79e5f2f 100644 --- a/python-pypet.spec +++ b/python-pypet.spec @@ -50,6 +50,14 @@ Patch: %{url}/pull/70.patch # architecture-dependent failures. However, there is no compiled code in the # package. %global debug_package %{nil} +%if !0%{?fc38} +# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +# +# Also, mandatory dependency python-tables dropped i686 support in F39 because +# python-blosc2 does not support it: +# https://src.fedoraproject.org/rpms/python-tables/c/ee27ac0dd4352ee415ad5089aee76c50f4bd2028 +ExcludeArch: %{ix86} +%endif %description %_description @@ -123,13 +131,8 @@ PYTHONPATH="${PWD}" %make_build -C doc latex \ # Scoop is unmaintained. I've asked upstream to drop support for it: # https://github.com/SmokinCaterpillar/pypet/issues/56 %if %{with tests} -%ifarch s390x -# Memory issues on s390x: OverflowError: Python int too large to convert to C int -echo "Skip tests on s390x" -%else %{py3_test_envvars} %{python3} pypet/tests/all_single_core_tests.py %endif -%endif %files -n python3-pypet -f %{pyproject_files} %doc README.md From f8c81d8cd8f9911a0a2193eb0de9f61a431a91da Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 16 2023 14:25:48 +0000 Subject: [PATCH 22/25] Run all tests, not only single-core tests --- diff --git a/python-pypet.spec b/python-pypet.spec index 79e5f2f..7166e53 100644 --- a/python-pypet.spec +++ b/python-pypet.spec @@ -131,7 +131,7 @@ PYTHONPATH="${PWD}" %make_build -C doc latex \ # Scoop is unmaintained. I've asked upstream to drop support for it: # https://github.com/SmokinCaterpillar/pypet/issues/56 %if %{with tests} -%{py3_test_envvars} %{python3} pypet/tests/all_single_core_tests.py +%{py3_test_envvars} %{python3} pypet/tests/all_tests.py %endif %files -n python3-pypet -f %{pyproject_files} From a3db995074f5a41d76e9fefeeb3912506157b9b7 Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 16 2023 20:42:18 +0000 Subject: [PATCH 23/25] Run (non-SCOOP) examples as additional tests --- diff --git a/71.patch b/71.patch new file mode 100644 index 0000000..898bc35 --- /dev/null +++ b/71.patch @@ -0,0 +1,45 @@ +From 323289c46927d6d249d85429d27ba83a4529edc1 Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Mon, 16 Oct 2023 10:41:56 -0400 +Subject: [PATCH] =?UTF-8?q?In=20examples,=20don=E2=80=99t=20pass=20keyword?= + =?UTF-8?q?s=20to=20Figure.gca()?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This was deprecated in matplotlib 3.4.0: + +https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.4.0.html#pyplot-gca-and-figure-gca-keyword-arguments + +This does not work at all with current versions of matplotlib. +--- + examples/example_05_custom_parameter.py | 2 +- + examples/example_06_parameter_presetting.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/examples/example_05_custom_parameter.py b/examples/example_05_custom_parameter.py +index 56923452..d0b7340c 100644 +--- a/examples/example_05_custom_parameter.py ++++ b/examples/example_05_custom_parameter.py +@@ -228,7 +228,7 @@ def main(): + + #Plot fancy 3d plot + fig = plt.figure(idx) +- ax = fig.gca(projection='3d') ++ ax = fig.add_subplot(projection='3d') + x = euler_data[:,0] + y = euler_data[:,1] + z = euler_data[:,2] +diff --git a/examples/example_06_parameter_presetting.py b/examples/example_06_parameter_presetting.py +index 06f15f34..9c516674 100644 +--- a/examples/example_06_parameter_presetting.py ++++ b/examples/example_06_parameter_presetting.py +@@ -146,7 +146,7 @@ def main(): + + # Plot fancy 3d plot + fig = plt.figure(idx) +- ax = fig.gca(projection='3d') ++ ax = fig.add_subplot(projection='3d') + x = euler_data[:,0] + y = euler_data[:,1] + z = euler_data[:,2] diff --git a/python-pypet.spec b/python-pypet.spec index 7166e53..5455d1e 100644 --- a/python-pypet.spec +++ b/python-pypet.spec @@ -1,4 +1,6 @@ %bcond tests 1 +# Run examples as additional tests? +%bcond test_examples 1 # Sphinx-generated HTML documentation is not suitable for packaging; see # https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion. @@ -45,6 +47,10 @@ Patch: %{url}/pull/69.patch # https://github.com/SmokinCaterpillar/pypet/pull/70 Patch: %{url}/pull/70.patch +# In examples, don’t pass keywords to Figure.gca() +# https://github.com/SmokinCaterpillar/pypet/pull/71 +Patch: %{url}/pull/71.patch + # We have an arched base package and noarch binary RPMs to ensure that the # tests always run on all architectures, since this package has a history of # architecture-dependent failures. However, there is no compiled code in the @@ -108,6 +114,16 @@ rm -rf pypet.egg-info find . -type f -name .gitignore -print -delete # This file is CC0-1.0. Remove it to show it doesn’t contribute to the build. rm -v ciscripts/appveyor/install.ps1 +# If we run the examples as tests, it will spew output into the examples/ tree. +# Not only do we not want to package that output, but it is non-reproducible, +# which causes build failures when the noarch -doc subpackage has different +# contents on different architectures. To work around that, we have two +# options: manually install all documentation in %%build and list it with +# absolute paths in the appropriate %%files section, or install the examples +# via a relative path referencing a clean copy. That’s the simpler options, so +# here’s the clean copy: +mkdir -p _clean +cp -rp examples _clean/examples %generate_buildrequires %pyproject_buildrequires @@ -132,6 +148,11 @@ PYTHONPATH="${PWD}" %make_build -C doc latex \ # https://github.com/SmokinCaterpillar/pypet/issues/56 %if %{with tests} %{py3_test_envvars} %{python3} pypet/tests/all_tests.py +%if %{with test_examples} +pushd pypet/tests +%{py3_test_envvars} %{python3} all_examples.py +popd +%endif %endif %files -n python3-pypet -f %{pyproject_files} @@ -139,7 +160,7 @@ PYTHONPATH="${PWD}" %make_build -C doc latex \ %files doc %license LICENSE CHANGES.txt -%doc examples/ +%doc _clean/examples/ %if %{with doc_pdf} %doc doc/build/latex/pypet.pdf %endif From 3c87f0a304dca5df9c8e39367dc6572726a6e4fc Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 16 2023 20:42:18 +0000 Subject: [PATCH 24/25] F40+: Exclude s390x; <=F39: Skip tests on s390x --- diff --git a/python-pypet.spec b/python-pypet.spec index 5455d1e..90f7390 100644 --- a/python-pypet.spec +++ b/python-pypet.spec @@ -1,4 +1,13 @@ -%bcond tests 1 +# We shouldn’t *add* ExcludeArch in a stable release, so we must skip the tests +# instead. We can remove this after F39 goes end-of-life, or when the spec +# files for older branches diverge from those in F40+. +%ifarch s390x +%if 0%{?fc38} || 0%{?fc39} +%global tests_default_off 1 +%endif +%endif + +%bcond tests 0%{?!tests_default_off:1} # Run examples as additional tests? %bcond test_examples 1 @@ -56,13 +65,25 @@ Patch: %{url}/pull/71.patch # architecture-dependent failures. However, there is no compiled code in the # package. %global debug_package %{nil} -%if !0%{?fc38} +# ==== Exclude i686 ==== +# # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval # # Also, mandatory dependency python-tables dropped i686 support in F39 because # python-blosc2 does not support it: # https://src.fedoraproject.org/rpms/python-tables/c/ee27ac0dd4352ee415ad5089aee76c50f4bd2028 +# +# ==== Exclude s390x ==== +# +# Many python-pypet tests fail on s390x due to apparent endian issues in +# pandas.HDFStore +# https://bugzilla.redhat.com/show_bug.cgi?id=2244500 ExcludeArch: %{ix86} +# We shouldn’t *add* ExcludeArch in a stable release. We can remove the +# conditional after F39 goes end-of-life, or when the spec files for older +# branches diverge from those in F40+. +%if !0%{?fc38} && !0%{?fc39} +ExcludeArch: s390x %endif %description %_description From 70db7acb0a9dbc0f0e6686e22ba0745e55cd3a25 Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 16 2023 20:42:51 +0000 Subject: [PATCH 25/25] CHANGES.txt is documentation, not a license file --- diff --git a/python-pypet.spec b/python-pypet.spec index 90f7390..96921f8 100644 --- a/python-pypet.spec +++ b/python-pypet.spec @@ -180,7 +180,8 @@ popd %doc README.md %files doc -%license LICENSE CHANGES.txt +%license LICENSE +%doc CHANGES.txt %doc _clean/examples/ %if %{with doc_pdf} %doc doc/build/latex/pypet.pdf