diff --git a/.gitignore b/.gitignore index 9ced77a..6c06b6b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,3 @@ /python-nixio-1.4.9.tar.gz /nixpy-1.5.1.tar.gz /nixpy-1.5.2.tar.gz -/nixpy-1.5.3.tar.gz -/nixpy-1.5.3-filtered.tar.gz -/nixpy-1.5.4-filtered.tar.gz diff --git a/0001-Remove-deprecated-pytest-runner-dependency.patch b/0001-Remove-deprecated-pytest-runner-dependency.patch deleted file mode 100644 index 850805a..0000000 --- a/0001-Remove-deprecated-pytest-runner-dependency.patch +++ /dev/null @@ -1,34 +0,0 @@ -From b550f88e64c01194029a50b92d94955c39bf169f Mon Sep 17 00:00:00 2001 -From: Sandro -Date: Tue, 24 Dec 2024 09:08:28 +0100 -Subject: [PATCH] Remove deprecated pytest-runner dependency - -The `pytest-runner` project has been deprecated since 2019 and has been -archived on git hub in December 2024. - -This removes the dependency on the deprecated package and also removes -deprecated keywords from `setup.py` related to it. ---- - setup.py | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/setup.py b/setup.py -index 16379a5..be594d5 100644 ---- a/setup.py -+++ b/setup.py -@@ -75,9 +75,9 @@ setup( - packages=packages, - scripts=[], - python_requires=">=3.6", -- tests_require=['pytest', 'scipy', 'pillow', 'matplotlib'], -- test_suite='pytest', -- setup_requires=['pytest-runner'], -+ extras_require={ -+ "test": ['pytest', 'scipy', 'pillow', 'matplotlib'], -+ }, - install_requires=['numpy', 'h5py', 'six', 'enum34;python_version<"3.4"'], - package_data={'nixio': [license_text, description_text]}, - include_package_data=True, --- -2.48.1 - diff --git a/changelog b/changelog deleted file mode 100644 index 7884b42..0000000 --- a/changelog +++ /dev/null @@ -1,91 +0,0 @@ -* Fri Jan 20 2023 Fedora Release Engineering - 1.5.3-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Fri Jul 22 2022 Fedora Release Engineering - 1.5.3-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Wed Jun 15 2022 Python Maint - 1.5.3-2 -- Rebuilt for Python 3.11 - -* Sat Apr 02 2022 Ankur Sinha - 1.5.3-1 -- Update to latest release - -* Fri Jan 21 2022 Fedora Release Engineering - 1.5.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Thu Dec 30 2021 Vanessa Christopher - 1.5.2-1 -- Update to latest release - -* Sun Oct 03 2021 Ankur Sinha - 1.5.1-1 -- Update to latest release - -* Fri Jul 23 2021 Fedora Release Engineering - 1.4.9-14 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Fri Jun 04 2021 Python Maint - 1.4.9-13 -- Rebuilt for Python 3.10 - -* Wed Jan 27 2021 Fedora Release Engineering - 1.4.9-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Wed Jul 29 2020 Fedora Release Engineering - 1.4.9-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Thu Jun 25 2020 Ankur Sinha - 1.4.9-10 -- Explicitly BR setuptools - -* Tue May 26 2020 Miro Hrončok - 1.4.9-9 -- Rebuilt for Python 3.9 - -* Thu Jan 30 2020 Fedora Release Engineering - 1.4.9-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Thu Oct 03 2019 Miro Hrončok - 1.4.9-7 -- Rebuilt for Python 3.8.0rc1 (#1748018) - -* Mon Aug 19 2019 Miro Hrončok - 1.4.9-6 -- Rebuilt for Python 3.8 - -* Fri Jul 26 2019 Fedora Release Engineering - 1.4.9-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Wed Jul 10 2019 Ankur Sinha - 1.4.9-4 -- Fix build: rhbz 1706159 - -* Sat Feb 02 2019 Fedora Release Engineering - 1.4.9-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Tue Jan 15 2019 Igor Gnatenko - 1.4.9-2 -- Enable python dependency generator - -* Sat Jan 12 2019 Ankur Sinha - 1.4.9-1 -- Update to 1.4.9 - -* Thu Oct 18 2018 Zbigniew Jędrzejewski-Szmek - 1.4.6-2 -- Subpackage python2-nixio has been removed - See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal - -* Wed Jul 18 2018 Ankur Sinha - 1.4.6-1 -- Update to 1.4.6 - -* Sat Jul 14 2018 Fedora Release Engineering - 1.4.5-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Tue Jun 19 2018 Miro Hrončok - 1.4.5-2 -- Rebuilt for Python 3.7 - -* Sat Jun 09 2018 Ankur Sinha - 1.4.5-1 -- Update to latest upstream release - -* Fri Feb 09 2018 Fedora Release Engineering - 1.4.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Sun Jan 21 2018 Ankur Sinha - 1.4.3-1 -- Use newer release and GitHub sources -- Run tests -- Define summary macro -- Add doc sub package - -* Fri Jan 12 2018 Ankur Sinha - 1.4.2-1 -- Initial build -- use pydist macro diff --git a/get_source b/get_source deleted file mode 100755 index 1ac2cc4..0000000 --- a/get_source +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -set -o errexit -set -o nounset - -if [ "$#" != '1' ] -then - cat 1>&2 < Downloading: ${URL}" 1>&2 -curl -L -O "${URL}" - -ARCHIVE="$(find . -mindepth 1 -maxdepth 1 -type f -name '*.tar.gz' -print -quit)" -echo "--> Extracting: $(basename "${ARCHIVE}")" 1>&2 -tar -xzf "${ARCHIVE}" -echo '--> Removing Lenna/Lena image due to licensing and other issues' 1>&2 -TARDIR="$(basename "${ARCHIVE}" '.tar.gz')" -MTIME="$(stat -c '%Y' "${TARDIR}")" -# https://github.com/G-Node/nixpy/issues/545 -find "${TARDIR}" -type f -name lenna.png -print -delete -# Make sure the original mtime is preserved even if we modified the base -# directory by removing something at the top level. (So far, we didn’t.) -touch -d @"${MTIME}" "${TARDIR}" -FILTERED="$(basename "${ARCHIVE}" .tar.gz)-filtered.tar.gz" -echo "--> Re-archiving: ${FILTERED}" 1>&2 -# https://www.gnu.org/software/tar/manual/html_section/Reproducibility.html -TZ=UTC LC_ALL=C tar \ - --create \ - --sort=name \ - --format=posix \ - --numeric-owner --owner=0 --group=0 \ - --mode=go+u,go-w \ - --pax-option='delete=atime,delete=ctime' \ - "${TARDIR}/" | - gzip -9 > "${FILTERED}" -mv -v "${FILTERED}" "${OUTDIR}" -echo 'Done.' 1>&2 diff --git a/python-nixio.spec b/python-nixio.spec index 812eabb..7afa713 100644 --- a/python-nixio.spec +++ b/python-nixio.spec @@ -1,64 +1,61 @@ %global forgeurl https://github.com/G-node/nixpy -%global desc \ -The NIX project started as an initiative within the Electrophysiology Task \ -Force a part of the INCF Data sharing Program. The NIX data model allows to \ -store fully annotated scientific data-set, i.e. the data together with its \ -metadata within the same container. Our aim is to achieve standardization by \ -providing a common/generic data structure for a multitude of data types. See \ -the wiki for more information \ - \ -The current implementations store the actual data using the HDF5 file format as \ -a storage backend. - Name: python-nixio -Version: 1.5.4 -Release: %autorelease +Version: 1.5.2 +Release: 1%{?dist} Summary: Python bindings for NIX %global tag %version %forgemeta -License: BSD-3-Clause +License: BSD URL: %forgeurl -# We need to upload a filtered version of the source archive because -# docs/source/examples/lenna.png has several issues, including the lack of a -# license. We have asked upstream to deal with this in -# Please consider replacing lenna.png -# https://github.com/G-Node/nixpy/issues/545 -# but for now, we must obtain the filtered archive by running the script in -# Source2: -# ./get_source ${VERSION} -%dnl Source0: %forgesource -Source0: nixpy-%{version}-filtered.tar.gz +Source0: %forgesource # The tagged snapshot on GitHub still says "dev" but the manually uploaded # release does not, so use the info.json from there # https://github.com/G-Node/nixpy/issues/528 Source1: info.json -# * Script used to obtain Source0: ./get_source %%{version} -Source2: get_source -# Remove deprecated pytest-runner dependency -# https://github.com/G-Node/nixpy/pull/547 -# Rebased on 1.5.4, without changes to GitHub CI configuration -# https://fedoraproject.org/wiki/Changes/DeprecatePythonPytestRunner -Patch: 0001-Remove-deprecated-pytest-runner-dependency.patch BuildArch: noarch # No need for nix, they're uncoupling it from the C++ # https://github.com/G-Node/nixpy/pull/276 -BuildRequires: python3-devel +%description +The NIX project started as an initiative within the Electrophysiology Task +Force a part of the INCF Data sharing Program. The NIX data model allows to +store fully annotated scientific data-set, i.e. the data together with its +metadata within the same container. Our aim is to achieve standardization by +providing a common/generic data structure for a multitude of data types. See +the wiki for more information -%description %{desc} +The current implementations store the actual data using the HDF5 file format as +a storage backend. %package -n python3-nixio Summary: %{summary} +BuildRequires: python3-devel +BuildRequires: gcc +# use tests_require which is deprecated +BuildRequires: %{py3_dist pytest} +BuildRequires: %{py3_dist pytest-runner} +BuildRequires: %{py3_dist scipy} +BuildRequires: %{py3_dist pillow} +BuildRequires: %{py3_dist matplotlib} -%description -n python3-nixio %{desc} +%description -n python3-nixio +%{description} + +%package doc +Summary: %{summary} +BuildRequires: python3-sphinx +BuildRequires: python3-sphinx_rtd_theme + +%description doc +Documentation files for %{name}. %prep -%autosetup -n nixpy-%{version} -p1 +%forgesetup # it sets examples_path based on the name of the cwd sed -i "s/nixpy/nixpy-%{version}/" nixio/test/test_doc_examples.py @@ -66,26 +63,110 @@ sed -i "s/nixpy/nixpy-%{version}/" nixio/test/test_doc_examples.py cp %{SOURCE1} nixio/info.json -v -p %generate_buildrequires -%pyproject_buildrequires -x test +%pyproject_buildrequires -r %build %pyproject_wheel +PYTHONPATH=. sphinx-build-3 docs/source html +# Remove unneeded files +rm -fr html/.{buildinfo,doctrees} + +# Remove shebang from documentation examples +for f in html/_downloads/*/*.py; do + sed '1{\@^#!/usr/bin/env python@d}' $f > $f.new && + touch -r $f $f.new && + mv $f.new $f +done + %install %pyproject_install -%pyproject_save_files -l nixio +%pyproject_save_files nixio %check -# These require the removed lenna.png sample file: -k="${k-}${k+ and }not (TestDocumentationExamples and test_image_data)" -k="${k-}${k+ and }not (TestDocumentationExamples and test_image_with_metadata)" -k="${k-}${k+ and }not (TestDocumentationExamples and test_multiple_rois)" -k="${k-}${k+ and }not (TestDocumentationExamples and test_single_roi)" - -%pytest -k "${k-}" +%{pytest} %files -n python3-nixio -f %{pyproject_files} %{_bindir}/nixio +%files doc +%doc README.rst html +%license LICENSE + %changelog -%autochangelog +* Thu Dec 30 2021 Vanessa Christopher - 1.5.2-1 +- Update to latest release + +* Sun Oct 03 2021 Ankur Sinha - 1.5.1-1 +- Update to latest release + +* Fri Jul 23 2021 Fedora Release Engineering - 1.4.9-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 1.4.9-13 +- Rebuilt for Python 3.10 + +* Wed Jan 27 2021 Fedora Release Engineering - 1.4.9-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 1.4.9-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu Jun 25 2020 Ankur Sinha - 1.4.9-10 +- Explicitly BR setuptools + +* Tue May 26 2020 Miro Hrončok - 1.4.9-9 +- Rebuilt for Python 3.9 + +* Thu Jan 30 2020 Fedora Release Engineering - 1.4.9-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Oct 03 2019 Miro Hrončok - 1.4.9-7 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Mon Aug 19 2019 Miro Hrončok - 1.4.9-6 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 1.4.9-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Wed Jul 10 2019 Ankur Sinha - 1.4.9-4 +- Fix build: rhbz 1706159 + +* Sat Feb 02 2019 Fedora Release Engineering - 1.4.9-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Tue Jan 15 2019 Igor Gnatenko - 1.4.9-2 +- Enable python dependency generator + +* Sat Jan 12 2019 Ankur Sinha - 1.4.9-1 +- Update to 1.4.9 + +* Thu Oct 18 2018 Zbigniew Jędrzejewski-Szmek - 1.4.6-2 +- Subpackage python2-nixio has been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + +* Wed Jul 18 2018 Ankur Sinha - 1.4.6-1 +- Update to 1.4.6 + +* Sat Jul 14 2018 Fedora Release Engineering - 1.4.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jun 19 2018 Miro Hrončok - 1.4.5-2 +- Rebuilt for Python 3.7 + +* Sat Jun 09 2018 Ankur Sinha - 1.4.5-1 +- Update to latest upstream release + +* Fri Feb 09 2018 Fedora Release Engineering - 1.4.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sun Jan 21 2018 Ankur Sinha - 1.4.3-1 +- Use newer release and GitHub sources +- Run tests +- Define summary macro +- Add doc sub package + +* Fri Jan 12 2018 Ankur Sinha - 1.4.2-1 +- Initial build +- use pydist macro diff --git a/sources b/sources index 96c2c29..75f3553 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (nixpy-1.5.4-filtered.tar.gz) = 7842e1643df0b234b8de7f8c1c30875ad70ed2681561ecf570ffff2849f60ea9510e7dba3b6544e8f507eed2583925d52d29c348cc49b2d5da0a22c686e3173d +SHA512 (nixpy-1.5.2.tar.gz) = faaf10a214b5adfcf78f69705d3f62dd7dea8dfe17c59fd7ed054f44aa7ad894b4bbc3bc19783d63c98aabe3aa4d5555ea68247538553820d81d66710a55a23a