## 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 %global desc \ FSLeyes, the FSL image viewer # PyPi tar does not include tests # Upstream says the tests, since they use xvfb etc., may not always pass on all # platforms. %bcond_with xvfb_tests %global forgeurl https://github.com/pauldmccarthy/fsleyes Name: python-fsleyes Version: 1.3.0 Release: %autorelease Summary: FSLeyes, the FSL image viewer %global tag %{version} %forgemeta License: ASL 2.0 URL: %forgeurl Source0: %forgesource BuildArch: noarch %description %{desc} %package -n python3-fsleyes Summary: %{summary} BuildRequires: python3-devel # from requirements-dev.txt %if %{with xvfb_tests} BuildRequires: graphviz BuildRequires: %{py3_dist sphinx} BuildRequires: %{py3_dist sphinx_rtd_theme} BuildRequires: %{py3_dist mock} BuildRequires: %{py3_dist pytest} BuildRequires: %{py3_dist pytest-cov} BuildRequires: %{py3_dist setuptools} BuildRequires: %{py3_dist wxpython} BuildRequires: freeglut-devel BuildRequires: xorg-x11-server-Xvfb BuildRequires: python3-matplotlib-wx %endif Requires: dcm2niix Requires: python3-matplotlib-wx Provides: fsleyes = %{version}-%{release} %description -n python3-fsleyes %{desc} %package doc Summary: %{summary} %description doc This package contains documentation for %{name}. %prep %forgesetup # remove jinja version fix # https://github.com/pauldmccarthy/fsleyes/issues/82 sed -i 's/jinja2.*/jinja2/' requirements.txt # extras: not yet packaged in Fedora sed -i '/file-tree/ d' requirements-extra.txt # Add extra requirements for autogenerator cat requirements-extra.txt >> requirements.txt cat requirements-notebook.txt >> requirements.txt # Remove unnecessary upper limit on Pillow: # https://github.com/pauldmccarthy/fsleyes/issues/7 # sed -i 's/\(Pillow>=3.2.0\),.*/\1/' requirements.txt # remove unneeded shebangs find . -name "*py" -exec sed -i '/#!\/usr\/bin\/env python/ d' '{}' \; %generate_buildrequires %pyproject_buildrequires -r requirements.txt requirements-dev.txt %build %pyproject_wheel # Build documentation %{__python3} setup.py userdoc %{__python3} setup.py apidoc # Remove build artefacts pushd userdoc rm -frv html/.buildinfo rm -frv html/.doctrees mv html userdoc_html popd pushd apidoc rm -frv html/.buildinfo rm -frv html/.doctrees mv html apidoc_html popd %install %pyproject_install %pyproject_save_files fsleyes # remove docs installed in the python bits rm -rfv %{buildroot}/%{python3_sitelib}/fsleyes/userdoc %check export MPLBACKEND=wxagg %if %{with xvfb_tests} # https://github.com/pauldmccarthy/fsleyes/blob/master/.ci/test_template.sh export FSLEYES_TEST_GL=2.1 xvfb-run -s "-screen 0 640x480x24" pytest-%{python3_version} sleep 10 # test overlay types for GL14 as well export FSLEYES_TEST_GL=1.4 xvfb-run -s "-screen 0 640x480x24" pytest-%{python3_version} %endif %files -n python3-fsleyes -f %{pyproject_files} %doc README.rst %{_bindir}/fsleyes %{_bindir}/render %{_bindir}/fsleyes_unfiltered %files doc %license LICENSE COPYRIGHT %doc userdoc/userdoc_html apidoc/apidoc_html %changelog * lun. nov. 01 2021 Ankur Sinha (Ankur Sinha Gmail) 1.3.0-1 - feat: update to 1.3.0 * dim. oct. 03 2021 Ankur Sinha (Ankur Sinha Gmail) 1.2.0-1 - feat: update to 1.2.0 * lun. août 09 2021 Ankur Sinha (Ankur Sinha Gmail) 1.1.0-2 - fix: correct requirements * sam. août 07 2021 Ankur Sinha (Ankur Sinha Gmail) 1.1.0-1 - feat: update to 1.1.0 * ven. juil. 23 2021 Fedora Release Engineering 0.34.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * ven. juin 04 2021 Python Maint 0.34.2-4 - Rebuilt for Python 3.10 * mer. janv. 27 2021 Fedora Release Engineering 0.34.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * mar. oct. 27 2020 Tomas Hrnciar 0.34.2-2 - Replace Python version glob with macro (needed for Python 3.10+) * ven. sept. 04 2020 Ankur Sinha (Ankur Sinha Gmail) 0.34.2-1 - Update to 0.34.2 * mer. juil. 29 2020 Fedora Release Engineering 0.32.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * jeu. juin 25 2020 Ankur Sinha (Ankur Sinha Gmail) 0.32.3-3 - Explicitly BR setuptools * mar. mai 26 2020 Miro Hrončok 0.32.3-2 - Rebuilt for Python 3.9 * ven. mai 01 2020 Ankur Sinha (Ankur Sinha Gmail) 0.32.3-1 - Update to 0.32.3 * ven. févr. 21 2020 Ankur Sinha (Ankur Sinha Gmail) 0.32.2-1 - Update to 0.32.2 * dim. févr. 16 2020 Ankur Sinha (Ankur Sinha Gmail) 0.32.0-3 - Fix build by working around dep autogen limitations * jeu. janv. 30 2020 Fedora Release Engineering 0.32.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * jeu. nov. 14 2019 Aniket Pradhan 0.32.0-1 - Update to v0.32.0 * mar. oct. 29 2019 Ankur Sinha (Ankur Sinha Gmail) 0.31.2-1 - Update to 0.31.2 * lun. sept. 23 2019 Aniket Pradhan 0.31.0-1 - Update to 0.31.0 * sam. août 31 2019 Ankur Sinha (Ankur Sinha Gmail) 0.30.1-1 - Update to 0.30.1 * ven. août 30 2019 Scott Talbert 0.30.0-5 - Remove sed patches for sip and revert to wx.siplib (#1739469) * lun. août 19 2019 Miro Hrončok 0.30.0-4 - Rebuilt for Python 3.8 * ven. juil. 26 2019 Fedora Release Engineering 0.30.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * mer. juil. 10 2019 Ankur Sinha (Ankur Sinha Gmail) 0.30.0-2 - Fix build * ven. juil. 05 2019 Luis M. Segundo 0.30.0-1 - New upstream version * lun. mai 27 2019 Ankur Sinha (Ankur Sinha Gmail) 0.29.0-1 - Update to 0.29.0 * jeu. avril 18 2019 Ankur Sinha (Ankur Sinha Gmail) 0.28.3-1 - Update to 0.28.3 * mer. avril 10 2019 Ankur Sinha (Ankur Sinha Gmail) 0.28.1-1 - Update to 0.28.1 * dim. févr. 17 2019 Ankur Sinha (Ankur Sinha Gmail) 0.27.3-1 - Update to latest upstream * sam. févr. 02 2019 Fedora Release Engineering 0.26.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * mar. nov. 27 2018 Ankur Sinha (Ankur Sinha Gmail) 0.26.4-3 - Fix to correctly use system libraries * lun. nov. 26 2018 Ankur Sinha (Ankur Sinha Gmail) 0.26.4-2 - Fix requires * lun. nov. 12 2018 Ankur Sinha (Ankur Sinha Gmail) 0.26.4-1 - Initial import