#1 Many bugfix patches, more tests, rpmautospec, pyproject-rpm-macros, SPDX, deal with arch-dependent problems
Merged 7 months ago by music. Opened 7 months ago by music.
rpms/ music/python-pypet v0.5.2-improvements  into  rawhide

@@ -0,0 +1,132 @@ 

+ From 2cf72fd784f4d90d24c3d3bb1f3a67fe29cebd5c Mon Sep 17 00:00:00 2001

+ From: Steve Kowalik <steven@wedontsleep.org>

+ 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)

file added
+25
@@ -0,0 +1,25 @@ 

+ From f18eadca185f884acfe9a76204bbd0530eaf6fe7 Mon Sep 17 00:00:00 2001

+ From: "Benjamin A. Beasley" <code@musicinmybrain.net>

+ 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,

file added
+50
@@ -0,0 +1,50 @@ 

+ From 1cf5bd7deffe2eaa91c6fd96b63dbb5f0d7eeafb Mon Sep 17 00:00:00 2001

+ From: "Benjamin A. Beasley" <code@musicinmybrain.net>

+ 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()

file added
+45
@@ -0,0 +1,45 @@ 

+ From 323289c46927d6d249d85429d27ba83a4529edc1 Mon Sep 17 00:00:00 2001

+ From: "Benjamin A. Beasley" <code@musicinmybrain.net>

+ 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]

file added
+60
@@ -0,0 +1,60 @@ 

+ * Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-7

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

+ 

+ * Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 0.5.2-6

+ - Rebuilt for Python 3.12

+ 

+ * Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-5

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

+ 

+ * Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-4

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

+ 

+ * Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.5.2-3

+ - Rebuilt for Python 3.11

+ 

+ * Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-2

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

+ 

+ * Fri Jul 30 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.5.2-1

+ - Update to latest release

+ - disable tests on s390x

+ - temporarily disable tests

+ 

+ * Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-5

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

+ 

+ * Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.5.1-4

+ - Rebuilt for Python 3.10

+ 

+ * Sat May 22 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.5.1-3

+ - Correctly detect host builder cpu

+ 

+ * Sat May 22 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.5.1-2

+ - Use correct macro for build arch

+ 

+ * Fri May 21 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.5.1-2

+ - Disable tests for s390x where it runs into memory issues

+ 

+ * Fri May 21 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.5.1-1

+ - Update to latest release

+ - Include patch to for py3.10

+ 

+ * Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-4

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

+ 

+ * Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-3

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

+ 

+ * Thu Jun 25 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.5.0-2

+ - Explicitly BR setuptools

+ 

+ * Tue Jun 02 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.5.0-1

+ - Update to 0.5.0

+ - Enable tests

+ 

+ * Thu May 28 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.4.3-1

+ - Add missing BRs for docs

+ 

+ * Fri May 22 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.4.3-1

+ - Initial spec

file modified
+140 -111
@@ -1,9 +1,21 @@ 

- # Multiple tests currently failing.

- # Temporarily disabling tests

- # https://github.com/SmokinCaterpillar/pypet/issues/63

- %bcond_with tests

+ # 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

  

- %global pypi_name pypet

+ # 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
@@ -12,151 +24,168 @@ 

  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:        7%{?dist}

+ 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

- 

- BuildArch:      noarch

- 

- %{?python_enable_dependency_generator}

+ # 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

+ 

+ # Support NumPy >= 1.20

+ # 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

+ 

+ # Replace deprecated/removed unittest.TestCase method aliases

+ # 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

+ # package.

+ %global debug_package %{nil}

+ # ==== 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

  

- %package -n python3-%{pypi_name}

+ %package -n python3-pypet

  Summary:        %{summary}

- BuildRequires:  make

+ 

+ BuildArch:      noarch

+ 

  BuildRequires:  python3-devel

- BuildRequires:  %{py3_dist setuptools}

- BuildRequires:  google-benchmark-devel

- # For tests

- %if %{with tests}

+ 

+ # 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.

+ 

+ # 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

  

- # 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-%{pypi_name} %_description

+ %description -n python3-pypet %_description

  

  %package doc

  Summary:        %{summary}

  

+ BuildArch:      noarch

+ 

  %description doc

  Documentation for %{name}.

  

  %prep

- %autosetup -n %{pypi_name}-%{version}

- rm -rf %{pypi_name}.egg-info

- 

- # Remove gitignore files

- rm -fv  examples/{,example_17_wrapping_an_existing_project,example_24_large_scale_brian2_simulation}/.gitignore

+ %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.

+ 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

  

  %build

- %py3_build

+ %pyproject_wheel

  

- 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

+ %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

  %if %{with tests}

- export HDF5_DISABLE_VERSION_CHECK=1

- # 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

+ %{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-%{pypi_name}

- %license LICENSE

+ %files -n python3-pypet -f %{pyproject_files}

  %doc README.md

- %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info

- %{python3_sitelib}/%{pypi_name}

  

  %files doc

- %license LICENSE CHANGES.txt

- %doc doc/build/html examples/

+ %license LICENSE

+ %doc CHANGES.txt

+ %doc _clean/examples/

+ %if %{with doc_pdf}

+ %doc doc/build/latex/pypet.pdf

+ %endif

  

  %changelog

- * Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-7

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

- 

- * Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 0.5.2-6

- - Rebuilt for Python 3.12

- 

- * Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-5

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

- 

- * Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-4

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

- 

- * Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.5.2-3

- - Rebuilt for Python 3.11

- 

- * Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-2

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

- 

- * Fri Jul 30 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.5.2-1

- - Update to latest release

- - disable tests on s390x

- - temporarily disable tests

- 

- * Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-5

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

- 

- * Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.5.1-4

- - Rebuilt for Python 3.10

- 

- * Sat May 22 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.5.1-3

- - Correctly detect host builder cpu

- 

- * Sat May 22 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.5.1-2

- - Use correct macro for build arch

- 

- * Fri May 21 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.5.1-2

- - Disable tests for s390x where it runs into memory issues

- 

- * Fri May 21 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.5.1-1

- - Update to latest release

- - Include patch to for py3.10

- 

- * Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-4

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

- 

- * Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-3

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

- 

- * Thu Jun 25 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.5.0-2

- - Explicitly BR setuptools

- 

- * Tue Jun 02 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.5.0-1

- - Update to 0.5.0

- - Enable tests

- 

- * Thu May 28 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.4.3-1

- - Add missing BRs for docs

- 

- * Fri May 22 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.4.3-1

- - Initial spec

+ %autochangelog

Please see the commit messages for details. Highlights include:

  • Many bugs and compatibility issues fixed via PR’s to upstream
  • Run many more tests
  • Port to rpmautospec, pyproject-rpm-macros, and SPDX
  • Build Sphinx documentation as PDF instead of HTML

This PR should be OK for all current releases. I will follow up with a PR that applies on this top of this one and updates to 0.6.1. Since 0.6.0 includes a backwards-incompatible change (“Can no longer load sparse matrices stored with older versions!”), that should probably be for Rawhide only.

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/99ea90a1117e452cbdc20a7abf11f7e0

Pull-Request has been merged by music

7 months ago