## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; 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 %global forgeurl https://github.com/nipy/nibabel %global _description %{expand: Read / write access to some common neuroimaging file formats This package provides read +/- write access to some common medical and neuroimaging file formats, including: ANALYZE (plain, SPM99, SPM2 and later), GIFTI, NIfTI1, NIfTI2, MINC1, MINC2, MGH and ECAT as well as Philips PAR/REC. We can read and write Freesurfer geometry, and read Freesurfer morphometry and annotation files. There is some very limited support for DICOM. NiBabel is the successor of PyNIfTI. The various image format classes give full or selective access to header (meta) information and access to the image data is made available via NumPy arrays. } Name: python-nibabel Version: 5.2.0 Release: %autorelease Summary: Python package to access a cacophony of neuro-imaging file formats %global tag %{version} %forgemeta License: MIT and PDDL-1.0 URL: http://nipy.org/nibabel/ Source0: %forgesource BuildArch: noarch %description %_description %package -n python3-nibabel Summary: %{summary} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pytest BuildRequires: python3-pytest-httpserver BuildRequires: help2man Recommends: python3-scipy Recommends: python3-pydicom # Bundles their own version of netcdf reader # that is different from Scipy version Provides: bundled(python%{python3_version}dist(netcdf)) %description -n python3-nibabel %_description %prep # warning: don't use -S git/git_am here, or hatchling/hatch-vcs generates a wrong version %forgeautosetup -p1 # delete shebangs from files that don't need it find nibabel/cmdline/ -name "*.py" -execdir sed -i '/^#!python/ d' '{}' \; # correct other shebangs # upstream uses #!python as a shebang, correct it find . -name "*.py" -execdir sed -i 's|^#!python|#!%{python3}|' '{}' \; # delete .gitignore files rm -fv nibabel/{tests/data/,}.gitignore %generate_buildrequires %pyproject_buildrequires -x dicom,minc2,spm %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l nibabel nisext for binary in "parrec2nii" "nib-conform" "nib-convert" "nib-diff" "nib-dicomfs" "nib-ls" "nib-nifti-dx" "nib-roi" "nib-stats" "nib-tck2trk" "nib-trk2tck" do echo "Generating man page for ${binary}" PATH="$PATH:%{buildroot}/%{_bindir}/" help2man --no-info --no-discard-stderr --output="${binary}.1" "${binary}" install -t '%{buildroot}%{_mandir}/man1' -p -m 0644 -D "${binary}.1" done %check %{pytest} -v %files -n python3-nibabel -f %{pyproject_files} %{_bindir}/parrec2nii %{_bindir}/nib-conform %{_bindir}/nib-convert %{_bindir}/nib-diff %{_bindir}/nib-dicomfs %{_bindir}/nib-ls %{_bindir}/nib-nifti-dx %{_bindir}/nib-roi %{_bindir}/nib-stats %{_bindir}/nib-tck2trk %{_bindir}/nib-trk2tck %{_mandir}/man1/nib* %{_mandir}/man1/parrec2nii.* %changelog ## START: Generated by rpmautospec * Fri Feb 23 2024 Sandro - 5.2.0-2 - Add Packit config * Fri Feb 23 2024 Sandro - 5.2.0-1 - Update to 5.2.0 (RHBZ#2254284) - Drop distutils patch (no longer required) - Run all tests again * Fri Feb 23 2024 Sandro - 5.1.0-10 - Use forge macros * Fri Jan 26 2024 Fedora Release Engineering - 5.1.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 5.1.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Thu Jan 04 2024 Benjamin A. Beasley - 5.1.0-7 - Assert that the .dist-info directory contains a license file * Fri Jul 21 2023 Fedora Release Engineering - 5.1.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Tue Jul 18 2023 Sandro - 5.1.0-5 - Drop dependency on looseversion * Tue Jul 18 2023 Sandro - 5.1.0-4 - Drop BR python3-looseversion * Mon Jul 17 2023 Sandro - 5.1.0-3 - Apply patch for removed distutils (RHBZ#2220356) * Wed Jul 12 2023 Python Maint - 5.1.0-2 - Rebuilt for Python 3.12 * Mon May 01 2023 Ankur Sinha (Ankur Sinha Gmail) - 5.1.0-1 - feat: update to 5.1.0 (fixes rhbz#2184180) * Fri Feb 17 2023 Ankur Sinha (Ankur Sinha Gmail) - 5.0.1-1 - feat: update to 5.0.1 (fixes rhbz#2169211) * Mon Feb 06 2023 Miro Hrončok - 5.0.0-3 - Restore broken python provides - Fixes: rhbz#2167445 - Fixes: rhbz#2167446 - Fixes: rhbz#2167447 - Fixes: rhbz#2167448 - Fixes: rhbz#2167449 - Fixes: rhbz#2167450 * Mon Feb 06 2023 Ankur Sinha (Ankur Sinha Gmail) - 5.0.0-2 - fix: backport patch to 5.x * Thu Feb 02 2023 Ankur Sinha (Ankur Sinha Gmail) - 5.0.0-1 - feat: update to 5.0.0 (fixes rhbz#2094602) * Thu Feb 02 2023 Ankur Sinha (Ankur Sinha Gmail) - 4.0.2-1 - feat: update to 4.0.2 * Fri Jan 20 2023 Fedora Release Engineering - 3.2.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 3.2.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Tue Jun 14 2022 Python Maint - 3.2.2-3 - Rebuilt for Python 3.11 * Mon Mar 07 2022 Karolina Surma - 3.2.2-2 - Use distutils from Python's standard library to run tests * Thu Feb 10 2022 Ankur Sinha (Ankur Sinha Gmail) - 3.2.2-1 - feat: update to 3.2.2 (fixes rhbz#2052120) * Fri Jan 21 2022 Fedora Release Engineering - 3.2.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jul 23 2021 Fedora Release Engineering - 3.2.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 3.2.1-3 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 3.2.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Sat Nov 28 2020 Ankur Sinha - 3.2.1-1 - Update to latest bugfix release * Sat Nov 28 2020 Ankur Sinha - 3.2.0-1 - Update to latest release * Wed Jul 29 2020 Fedora Release Engineering - 3.1.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Sat Jul 04 2020 Ankur Sinha - 3.1.1-1 - Update to 3.1.1 * Tue May 26 2020 Miro Hrončok - 3.1.0-2 - Rebuilt for Python 3.9 * Fri May 01 2020 Ankur Sinha - 3.1.0-1 - Update to 3.1.0 * Sat Feb 01 2020 Ankur Sinha - 3.0.1-1 - Update to new release - Add pytest BR * Thu Jan 30 2020 Fedora Release Engineering - 2.5.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Fri Oct 25 2019 Ankur Sinha - 2.5.1-1 - Update to 2.5.1 * Thu Oct 03 2019 Miro Hrončok - 2.5.0-3 - Rebuilt for Python 3.8.0rc1 (#1748018) * Mon Aug 19 2019 Miro Hrončok - 2.5.0-2 - Rebuilt for Python 3.8 * Sun Aug 04 2019 Ankur Sinha - 2.5.0-1 - Update to latest release---fixes broken test * Fri Jul 26 2019 Fedora Release Engineering - 2.4.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Wed Jul 10 2019 Ankur Sinha - 2.4.1-1 - Update to 2.4.1 * Sat Feb 16 2019 Ankur Sinha - 2.3.3-1 - Update to 2.3.3 * Sat Feb 02 2019 Fedora Release Engineering - 2.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Wed Nov 07 2018 Ankur Sinha - 2.3.1-1 - Update to latest upstream release - Remove unneeded patch * Mon Aug 13 2018 Igor Gnatenko - 2.3.0-3 - Drop python2 subpackage * Sat Jul 14 2018 Fedora Release Engineering - 2.3.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Fri Jun 22 2018 Ankur Sinha - 2.3.0-1 - Update to 2.3.0 - No build since tests fail, issue filed: https://github.com/nipy/nibabel/issues/579 * Tue Jun 19 2018 Miro Hrončok - 2.2.0-3 - Rebuilt for Python 3.7 * Fri Feb 09 2018 Fedora Release Engineering - 2.2.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Sun Nov 12 2017 Igor Gnatenko - 2.2.0-1 - Update to 2.2.0 * Thu Jul 27 2017 Fedora Release Engineering - 2.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Mar 11 2017 Igor Gnatenko - 2.1.0-1 - Update to 2.1.0 * Sat Feb 11 2017 Fedora Release Engineering - 2.0.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro Hrončok - 2.0.2-4 - Rebuild for Python 3.6 * Tue Jul 19 2016 Fedora Release Engineering - 2.0.2-3 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Thu Feb 04 2016 Fedora Release Engineering - 2.0.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Mon Nov 23 2015 Igor Gnatenko - 2.0.2-1 - Update to 2.0.2 - unversioned bir to python3 * Sat Oct 31 2015 Igor Gnatenko - 2.0.1-1 - Initial package ## END: Generated by rpmautospec