## START: Set by rpmautospec ## (rpmautospec version 0.2.5) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} ## END: Set by rpmautospec # These are problematic, sometimes they randomly fail or hang %bcond_with xvfb_tests %global desc \ The fslpy project is a FSL programming library written in Python. It is used by \ FSLeyes. Name: python-fslpy Version: 3.7.0 Release: %autorelease Summary: The FSL Python Library License: ASL 2.0 URL: https://pypi.python.org/pypi/fslpy Source0: %{pypi_source fslpy} BuildArch: noarch BuildRequires: python3-devel BuildRequires: dcm2niix BuildRequires: %{py3_dist pytest} BuildRequires: %{py3_dist pytest-cov} %if %{with xvfb_tests} BuildRequires: xorg-x11-server-Xvfb %endif %description %{desc} %package -n python3-fslpy Summary: %{summary} %description -n python3-fslpy %{desc} %package doc Summary: %{summary} BuildRequires: %{py3_dist sphinx_rtd_theme} %description doc This package contains documentation for %{name}. %prep %autosetup -n fslpy-%{version} # For the dep generator to pick up cat requirements-extra.txt >> requirements.txt # remove unneeded shebangs find . -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/env python$/ d' {} 2>/dev/null ';' # some scripts have the shebang, so we correct these find . -type f -name "*.py" -exec sed -i 's/#![ ]*\/usr\/bin\/env python$/#!\/usr\/bin\/python3/' {} 2>/dev/null ';' %generate_buildrequires %pyproject_buildrequires -r %build %pyproject_wheel # Build documentation PYTHONPATH=. sphinx-build-3 doc html # Remove build artefacts rm -frv html/.buildinfo rm -frv html/.doctrees %install %pyproject_install %pyproject_save_files fsl # Remove test packages that are installed in site packages rm -rfv %{buildroot}/%{python3_sitelib}/tests/ %check %if %{with xvfb_tests} # From https://git.fmrib.ox.ac.uk/fsl/fslpy/blob/master/.ci/test_template.sh xvfb-run pytest-3 tests/test_idle.py sleep 10 # Sometimes fails, sometimes passes xvfb-run pytest-3 tests/test_platform.py || exit 0 %endif # Ignore tests that have already been done # Ignore immv_imcp because it requires a "nobody" user # Ignore tests that require downloading data. # Ignore tests requiring trimesh # Ignore test using dcm2niix # Ignore intermittently failing test: https://github.com/pauldmccarthy/fslpy/issues/10 # Ignore submit tests %{pytest} tests -m "not longtest and not test_submit" \ --ignore=tests/test_idle.py --ignore=tests/test_platform.py \ --ignore=tests/test_immv_imcp.py --ignore=tests/test_atlases.py \ --ignore=tests/test_atlases_query.py \ --ignore=tests/test_scripts/test_atlasq_list_summary.py \ --ignore=tests/test_scripts/test_atlasq_ohi.py \ --ignore=tests/test_scripts/test_atlasq_query.py --ignore=tests/test_callfsl.py \ --ignore=tests/test_mesh.py --ignore=tests/test_dicom.py \ --ignore=tests/test_parse_data.py \ --ignore=tests/test_scripts/test_fsl_apply_x5.py %files -n python3-fslpy -f %{pyproject_files} %doc README.rst %{_bindir}/atlasq %{_bindir}/atlasquery %{_bindir}/fsl_apply_x5 %{_bindir}/fsl_ents %{_bindir}/fsl_convert_x5 %{_bindir}/imcp %{_bindir}/imglob %{_bindir}/immv %{_bindir}/resample_image %{_bindir}/Text2Vest %{_bindir}/Vest2Text %{_bindir}/fsl_abspath %{_bindir}/imln %{_bindir}/imrm %{_bindir}/imtest %{_bindir}/remove_ext %files doc %license LICENSE COPYRIGHT %doc html %changelog * Sun Oct 03 2021 Ankur Sinha (Ankur Sinha Gmail) 3.7.0-1 - feat: update to 3.7.0 * Sat Aug 07 2021 Ankur Sinha (Ankur Sinha Gmail) 3.6.4-1 - feat: update to 3.6.4 * Fri Jul 23 2021 Fedora Release Engineering 3.5.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint 3.5.3-2 - Rebuilt for Python 3.10 * Sun Mar 28 2021 Ankur Sinha (Ankur Sinha Gmail) 3.5.3-1 - enh: update to 3.5.3 * Wed Jan 27 2021 Fedora Release Engineering 3.4.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Sat Nov 28 2020 Ankur Sinha (Ankur Sinha Gmail) 3.4.0-1 - Update to 3.4.0 * Tue Oct 27 2020 Tomas Hrnciar 3.3.3-2 - Replace Python version glob with macro (needed for Python 3.10+) * Sun Oct 18 2020 Ankur Sinha (Ankur Sinha Gmail) 3.3.3-1 - Update to 3.3.3 * Thu Oct 01 2020 Ankur Sinha (Ankur Sinha Gmail) 3.3.0-2 - Disable tests on F<33 * Thu Oct 01 2020 Ankur Sinha (Ankur Sinha Gmail) 3.3.0-1 - Update to 3.3.0 * Mon Sep 07 2020 Ankur Sinha (Ankur Sinha Gmail) 3.2.2-1 - Fix macro usage * Mon Sep 07 2020 Ankur Sinha (Ankur Sinha Gmail) None-1 - Workaround F32 bug * Fri Sep 04 2020 Ankur Sinha (Ankur Sinha Gmail) 3.2.2-1 - Update to 3.2.2 * Wed Jul 29 2020 Fedora Release Engineering 3.2.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Fri Jul 03 2020 Ankur Sinha (Ankur Sinha Gmail) 3.2.0-3 - Fix FTI * Thu Jun 25 2020 Ankur Sinha (Ankur Sinha Gmail) 3.2.0-2 - Explicitly BR setuptools * Sun Jun 21 2020 Ankur Sinha (Ankur Sinha Gmail) 3.2.0-1 - Update to 3.2.0 * Tue May 26 2020 Miro Hrončok 3.0.1-2 - Rebuilt for Python 3.9 * Fri May 01 2020 Ankur Sinha (Ankur Sinha Gmail) 3.0.1-1 - Update to 3.0.1 * Fri Feb 21 2020 Ankur Sinha (Ankur Sinha Gmail) 2.8.1-1 - Update to 2.8.1 * Thu Jan 30 2020 Ankur Sinha (Ankur Sinha Gmail) 2.8.0-2 - Tweak requirements to work around rpm dep gen bug * Thu Jan 30 2020 Ankur Sinha (Ankur Sinha Gmail) 2.8.0-1 - Update to 2.8.0 * Thu Jan 30 2020 Fedora Release Engineering 2.7.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Nov 14 2019 Aniket Pradhan 2.7.0-1 - Update to v2.7.0 * Mon Oct 28 2019 Ankur Sinha (Ankur Sinha Gmail) 2.6.2-1 - Update to 2.6.2 * Mon Sep 23 2019 Aniket Pradhan 2.6.1-3 - Updated dependencies. * Mon Sep 23 2019 Aniket Pradhan 2.6.1-2 - Fixed the date in changelog * Mon Sep 23 2019 Aniket Pradhan 2.6.1-1 - Update to 2.6.1 * Sat Aug 31 2019 Ankur Sinha (Ankur Sinha Gmail) 2.5.0-2 - Disable another failing test * Sat Aug 31 2019 Ankur Sinha (Ankur Sinha Gmail) 2.5.0-1 - Update to 2.5.0 * Mon Aug 19 2019 Miro Hrončok 2.3.1-3 - Rebuilt for Python 3.8 * Fri Jul 26 2019 Fedora Release Engineering 2.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Fri Jul 05 2019 Luis M. Segundo 2.3.1-1 - New upstream version * Mon May 27 2019 Ankur Sinha (Ankur Sinha Gmail) 2.2.0-3 - Remove added src rpms * Mon May 27 2019 Ankur Sinha (Ankur Sinha Gmail) 2.2.0-2 - Disable a failing test * Mon May 27 2019 Ankur Sinha (Ankur Sinha Gmail) 2.2.0-1 - Update to 2.2.0 * Sun Apr 14 2019 Ankur Sinha (Ankur Sinha Gmail) 2.1.0-1 - Update to 2.1.0 * Wed Apr 10 2019 Ankur Sinha (Ankur Sinha Gmail) 2.0.1-1 - Update to 2.0.1 * Sat Feb 02 2019 Fedora Release Engineering 1.12.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Thu Nov 08 2018 Ankur Sinha (Ankur Sinha Gmail) 1.12.0-2 - Fix build on F28 and F29 * Thu Nov 08 2018 Ankur Sinha (Ankur Sinha Gmail) 1.12.0-1 - Initial SCM import