## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 6; 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/Washington-University/gradunwarp # NumPy emits deprecation warning, but it seems turning that off makes # things worse (more errors). # There are some incompatible pointer warnings, but I don't have a clue # how to go about fixing those. # Ergo: Disable build type safety (at least for now) %global build_type_safety_c 0 Name: python-gradunwarp Version: 1.2.2 Release: %autorelease Summary: Gradient Unwarping %global tag %{version} %forgemeta # SPDX License: MIT URL: %forgeurl Source0: %forgesource Source1: gradient_unwarp.1 BuildRequires: gcc %description Python/Numpy package used to unwarp the distorted volumes (due to the gradient field inhomogenities). %package -n python3-gradunwarp Summary: %{summary} BuildRequires: python3-devel BuildRequires: python3-pytest # used in setup.py BuildRequires: python3-numpy # not mentioned in setup.py BuildRequires: python3-scipy BuildRequires: python3-nibabel # not mentioned in setup.py Requires: python3-numpy Requires: python3-scipy Requires: python3-nibabel %description -n python3-gradunwarp Python/Numpy package used to unwarp the distorted volumes (due to the gradient field inhomogenities). %prep %forgeautosetup -p1 # correct version string # remove extra compilation flags sed -i -e "s/HCP-%{version}/%{version}/" \ -e "s/extra_compile_args=.*)/)/" \ setup.py %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install # install script mv %{buildroot}%{_bindir}/gradient_unwarp.py %{buildroot}%{_bindir}/gradient_unwarp sed -i -e '1s|^.*$|#!%{__python3}|' %{buildroot}%{_bindir}/gradient_unwarp # fix perms on .so find %{buildroot}%{python3_sitearch}/gradunwarp/ -name '*.so' -exec chmod 755 {} \+ %pyproject_save_files gradunwarp # install man page generated using help2man install -m 0644 %{SOURCE1} -Dt $RPM_BUILD_ROOT/%{_mandir}/man1/ %check # See: https://github.com/Washington-University/gradunwarp/blob/master/.github/workflows/test.yml %pytest --pyargs gradunwarp # Run import test in addition %pyproject_check_import %files -n python3-gradunwarp -f %{pyproject_files} %exclude %{python3_sitearch}/gradunwarp/core/gradient_unwarp.py %license Copying.md %doc README.md %{_bindir}/gradient_unwarp %{_mandir}/man1/gradient_unwarp.* %changelog ## START: Generated by rpmautospec * Fri Jul 19 2024 Fedora Release Engineering - 1.2.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Sat Jun 08 2024 Python Maint - 1.2.2-5 - Rebuilt for Python 3.13 * Wed Mar 13 2024 Sandro - 1.2.2-4 - Fix Packit config * Wed Feb 21 2024 Sandro - 1.2.2-3 - Add Packit config * Wed Feb 21 2024 Sandro - 1.2.2-2 - Migrate to SPDX license (no change) * Wed Feb 21 2024 Sandro - 1.2.2-1 - Update to 1.2.2 (RHBZ#2254868) - Switch to forge macros (upstream dropped the 'v' prefix from tag) - Disable build type safety (mask RHBZ#2261566) - Fix test invocation - Also run import tests * Fri Jan 26 2024 Fedora Release Engineering - 1.2.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 1.2.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Wed Dec 13 2023 Sandro - 1.2.1-5 - Patch for use of numpy.distutils (RHBZ#2250668) * Fri Jul 21 2023 Fedora Release Engineering - 1.2.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Tue Jul 18 2023 Sandro - 1.2.1-3 - Rebuild for Python3.12 * Fri Jan 20 2023 Fedora Release Engineering - 1.2.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Tue Jan 10 2023 Ankur Sinha (Ankur Sinha Gmail) - 1.2.1-1 - feat: update to 1.2.1 (fixes rhbz#2159137) * Tue Jan 10 2023 Ankur Sinha (Ankur Sinha Gmail) - 1.2.0-12 - feat: modernise spec, add man page * Tue Jan 10 2023 Ankur Sinha (Ankur Sinha Gmail) - 1.2.0-11 - chore: remove unneeded macro * Fri Jul 22 2022 Fedora Release Engineering - 1.2.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Tue Jun 14 2022 Python Maint - 1.2.0-8 - Rebuilt for Python 3.11 * Fri Jan 21 2022 Fedora Release Engineering - 1.2.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jul 23 2021 Fedora Release Engineering - 1.2.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 1.2.0-5 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 1.2.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 1.2.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue May 26 2020 Miro Hrončok - 1.2.0-2 - Rebuilt for Python 3.9 * Sat Feb 01 2020 Ankur Sinha - 1.2.0-1 - Update to new release * Thu Jan 30 2020 Fedora Release Engineering - 1.0.3-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Oct 03 2019 Miro Hrončok - 1.0.3-13 - Rebuilt for Python 3.8.0rc1 (#1748018) * Mon Aug 19 2019 Miro Hrončok - 1.0.3-12 - Rebuilt for Python 3.8 * Fri Jul 26 2019 Fedora Release Engineering - 1.0.3-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Sat Feb 02 2019 Fedora Release Engineering - 1.0.3-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Mon Aug 13 2018 Igor Gnatenko - 1.0.3-9 - Drop python2 subpackage * Sat Jul 14 2018 Fedora Release Engineering - 1.0.3-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Tue Jun 19 2018 Miro Hrončok - 1.0.3-7 - Rebuilt for Python 3.7 * Fri Feb 09 2018 Fedora Release Engineering - 1.0.3-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Aug 03 2017 Fedora Release Engineering - 1.0.3-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 1.0.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 1.0.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro Hrončok - 1.0.3-2 - Rebuild for Python 3.6 * Thu Oct 20 2016 Igor Gnatenko - 1.0.3-1 - Update to 1.0.3 * Tue Jul 19 2016 Fedora Release Engineering - 1.0.2-5 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Thu Feb 04 2016 Fedora Release Engineering - 1.0.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Sun Nov 29 2015 Igor Gnatenko - 1.0.2-3 - Drop unused provides_exclude * Wed Nov 25 2015 Igor Gnatenko - 1.0.2-2 - Fix shebang - Add python3 version - Fix perms on so * Sun Nov 08 2015 Igor Gnatenko - 1.0.2-1 - Initial package ## END: Generated by rpmautospec