## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 12; 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 %bcond_without tests %global _description %{expand: Helper module to easily develop special remotes for git annex. AnnexRemote handles all the protocol stuff for you, so you can focus on the remote itself. It implements the complete external special remote protocol and fulfils all specifications regarding whitespaces etc. This is ensured by an excessive test suite. Extensions to the protocol are normally added within hours after they have been published.} Name: python-annexremote Version: 1.6.0 Release: %autorelease Summary: Git annex special remotes made easy # The entire source is GPL-3.0-only, except: # - The script versioneer.py and the file annexremote/_version.py, which was # generated by it, are both (after patching to Versioneer 0.28) Unlicense. License: GPL-3.0-only AND Unlicense URL: https://github.com/Lykos153/AnnexRemote Source: %{url}/archive/v%{version}/AnnexRemote-%{version}.tar.gz # BF(TST): match newer pythons exception to include the class name when stating # signature is not met # https://github.com/Lykos153/AnnexRemote/pull/67 # # Backported to 1.6.0 Patch: 0001-BF-TST-match-newer-pythons-exception-to-include-the-.patch # Fix invalid escape sequences in test regexes # https://github.com/Lykos153/AnnexRemote/pull/76 # # (Applies on top of the PR#67 backport.) Patch: %{url}/pull/76.patch # Update Versioneer to 0.28 to support Python 3.12. This is a downstream-only # patch, because upstream updated Versioneer to 0.22 # (https://github.com/Lykos153/AnnexRemote/pull/49) then, in the subsequent # commit, replaced it with setuptools_scm. We use our own patch for Versioneer # 0.28 instead of backporting upstream’s short-lived migration to 0.22 because # the next release won’t use Versioneer anyway, and because 0.28 is Unlicense # rather than the not-allowed-for-code CC0-1.0. Patch: 0001-Update-versioneer-to-0.28.patch BuildArch: noarch %description %_description %package -n python3-annexremote Summary: %{summary} BuildRequires: python3-devel BuildRequires: git-core %description -n python3-annexremote %_description %package doc Summary: Documentation for %{name} %description doc This package provides documentation for %{name}. %prep %autosetup -n AnnexRemote-%{version} -p1 # Replace nose with pytest sed -i "s/'nose'/'pytest'/" setup.py sed -i 's/ def Test/ def test_/' tests/test_*.py # Remove shebang sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' examples/git-annex-remote-directory chmod -x examples/git-annex-remote-directory # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters sed -r -i "s/(['\"])coverage\1(, ?)?//" setup.py %generate_buildrequires %pyproject_buildrequires %{?with_tests:-x test} %build %pyproject_wheel %install %pyproject_install %pyproject_save_files annexremote %check %pyproject_check_import %if %{with tests} %{pytest} %endif %files -n python3-annexremote -f %{pyproject_files} %doc README.md %files doc %license LICENSE %doc docs/annexremote examples %changelog * Fri Jul 21 2023 Fedora Release Engineering - 1.6.0-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Wed Jun 28 2023 Benjamin A. Beasley - 1.6.0-11 - Fix a warning in the tests on Python 3.12 * Wed Jun 28 2023 Benjamin A. Beasley - 1.6.0-10 - Patch out coverage dependencies * Wed Jun 28 2023 Benjamin A. Beasley - 1.6.0-9 - Fix some test assertions again * Wed Jun 28 2023 Benjamin A. Beasley - 1.6.0-8 - Update License to SPDX * Wed Jun 28 2023 Benjamin A. Beasley - 1.6.0-7 - Tidy up some obsolete spec-file minutiae * Wed Jun 28 2023 Benjamin A. Beasley - 1.6.0-6 - Update to versioneer 0.28 (fix RHBZ#2155216) * Tue Jun 13 2023 Python Maint - 1.6.0-5 - Rebuilt for Python 3.12 * Fri Jan 20 2023 Fedora Release Engineering - 1.6.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 1.6.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint - 1.6.0-2 - Rebuilt for Python 3.11 * Sat Apr 02 2022 Ankur Sinha (Ankur Sinha Gmail) - 1.6.0-1 - feat: to 1.6.0 (fixes rhbz#2064053) * Fri Jan 21 2022 Fedora Release Engineering - 1.5.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Tue Sep 07 2021 Ankur Sinha (Ankur Sinha Gmail) - 1.5.0-2 - feat: only apply patch for F35+ * Tue Sep 07 2021 Ankur Sinha (Ankur Sinha Gmail) - 1.5.0-1 - feat: init