## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-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*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Require network, so run locally in mock with --with=tests --enable-network # All tests pass %bcond_with tests # Use forge macros for pulling from GitLab %global forgeurl https://gitlab.com/radiology/infrastructure/xnatpy %global desc %{expand: \ A new XNAT client that exposes XNAT objects/functions as python objects/functions. The aim is to abstract as much of the REST API away as possible and make xnatpy feel like native Python code. This reduces the need for the user to know the details of the REST API. Low level functionality can still be accessed via the connection object which has get, head, put, post, delete methods for more directly calling the REST API.} Name: python-xnat Version: 0.5.1 Release: %autorelease Summary: A new XNAT client that exposes XNAT objects/functions as python objects/functions # Only expand forge macros in fedora >= 40 since %%forgesource is broken # in older releases. %if %{fedora} >= 40 %forgemeta -v %endif License: Apache-2.0 URL: %forgeurl # The %%forgesource macro only works correctly in rawhide for group URLs %if %{fedora} >= 40 Source0: %forgesource %else Source0: https://gitlab.com/radiology/infrastructure/xnatpy/-/archive/%{version}/xnatpy-%{version}.tar.bz2 %endif BuildArch: noarch %description %{desc} %package -n python3-xnat Summary: %{summary} BuildRequires: python3-devel %description -n python3-xnat %{desc} %prep %autosetup -p1 -n xnatpy-%{version} # Remove version locks etc. sed -i -e 's/pytest==.*/pytest/' -e 's/pytest-cov==.*/pytest-cov/' -e '/tox/ d' test_requirements.txt sed -i '/sphinx/d' requirements.txt %generate_buildrequires %pyproject_buildrequires %{?with_tests: -r requirements.txt test_requirements.txt} %build %pyproject_wheel %install %pyproject_install %pyproject_save_files xnat %check %if %{with tests} %{pytest} %endif %files -n python3-xnat -f %{pyproject_files} %doc README.rst %{_bindir}/xnat %{_bindir}/xnat_cp_project %{_bindir}/xnat_data_integrity-check %changelog * Fri Sep 15 2023 Sandro - 0.5.1-1 - Update to 0.5.1 (RHBZ#2138814) - Use forge macros for fedora >= 40 - Migrate to SPDX license * Fri Jul 21 2023 Fedora Release Engineering - 0.4.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Wed Jun 14 2023 Python Maint - 0.4.2-5 - Rebuilt for Python 3.12 * Fri Jan 20 2023 Fedora Release Engineering - 0.4.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 0.4.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint - 0.4.2-2 - Rebuilt for Python 3.11 * Fri May 06 2022 Ankur Sinha (Ankur Sinha Gmail) - 0.4.2-1 - feat: update to 0.4.2 (fixes rhbz#2056929) * Thu Feb 10 2022 Ankur Sinha (Ankur Sinha Gmail) - 0.4.0-1 - feat: update to 4.0.1 (fixes rhbz#2018060) * Fri Jul 23 2021 Fedora Release Engineering - 0.3.26-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Tue Jul 06 2021 Ankur Sinha - 0.3.26-1 - Update to latest release * Fri Jun 04 2021 Python Maint - 0.3.25-3 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 0.3.25-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Sat Nov 28 2020 Ankur Sinha - 0.3.25-1 - Update to latest release * Sat Aug 08 2020 Luis Bazan - 0.3.24-1 - New upstream version * Wed Jul 29 2020 Fedora Release Engineering - 0.3.22-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue May 26 2020 Miro Hrončok - 0.3.22-2 - Rebuilt for Python 3.9 * Fri Feb 28 2020 Luis Bazan - 0.3.22-1 - New upstream version * Thu Jan 30 2020 Fedora Release Engineering - 0.3.21-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Wed Oct 23 2019 Aniket Pradhan - 0.3.21-1 - Upgraded to v0.3.21 * Sun Sep 22 2019 Luis Bazan - 0.3.19-1 - New upstream * Mon Aug 19 2019 Miro Hrončok - 0.3.18-3 - Rebuilt for Python 3.8 * Fri Jul 26 2019 Fedora Release Engineering - 0.3.18-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Thu Jun 06 2019 Luis Bazan - 0.3.18-1 - New upstream version * Mon Apr 08 2019 Luis Bazan - 0.3.17-1 - New upstream version * Sat Feb 02 2019 Fedora Release Engineering - 0.3.11-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Wed Dec 19 2018 Luis Bazan - 0.3.11-4 - enable python-progressbar2 * Thu Nov 29 2018 Luis Bazan - 0.3.11-3 - Use template of neuro-sig * Tue Nov 20 2018 Luis Bazan - 0.3.11-2 - Add remove bundled egg info * Mon Nov 19 2018 Luis Bazan - 0.3.11-1 - New upstream