## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 3; 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 check 1 # We can run these in a local mock build with --enable-network. %bcond network_tests 0 Name: pre-commit Version: 4.1.0 Release: %autorelease Summary: Framework for managing and maintaining multi-language pre-commit hooks # SPDX License: MIT URL: https://pre-commit.com %global forgeurl https://github.com/pre-commit/pre-commit Source: %{forgeurl}/archive/v%{version}/pre-commit-%{version}.tar.gz BuildArch: noarch BuildRequires: git-core BuildRequires: python3-devel %if %{with check} # Manually added to speed up the %%check section BuildRequires: python3dist(pytest-xdist) %endif %description A framework for managing and maintaining multi-language pre-commit hooks. %prep %autosetup -p1 -S git # Do not generate BR’s for coverage, linters, etc.: sed -r '/^(covdefaults|coverage)\b/d' requirements-dev.txt | tee requirements-dev-filtered.txt %generate_buildrequires %pyproject_buildrequires -r %{?with_check:requirements-dev-filtered.txt} %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l pre_commit %check # Any Python files inside pre_commit.resources are templates and are not # intended to be imported. %pyproject_check_import -e 'pre_commit.resources.*' %if %{with check} # For general discusson on test failures building distribution packages, see: # https://github.com/pre-commit/pre-commit/issues/1183, # https://github.com/pre-commit/pre-commit/issues/1202 # Does not work under (i.e., respect) an “external” PYTHONPATH k="${k-}${k+ and }not test_installed_from_venv" %if %{without network_tests} k="${k-}${k+ and }not test_additional_dependencies_roll_forward" k="${k-}${k+ and }not test_repository_state_compatibility[v1]" k="${k-}${k+ and }not test_repository_state_compatibility[v2]" k="${k-}${k+ and }not test_reinstall" k="${k-}${k+ and }not test_control_c_control_c_on_install" k="${k-}${k+ and }not test_invalidated_virtualenv" k="${k-}${k+ and }not test_really_long_file_paths" k="${k-}${k+ and }not test_local_python_repo" %endif # These are the tests that run by default via tox; see tox.ini. See also # .github/workflows/main.yml. %pytest --ignore=tests/languages -k "${k-}" -v %endif %files -f %{pyproject_files} %doc README.md CHANGELOG.md CONTRIBUTING.md %{_bindir}/pre-commit %changelog ## START: Generated by rpmautospec * Mon Feb 24 2025 Benjamin A. Beasley - 4.1.0-3 - Simplify testing - Always run an import-only “smoke test” - Do not run language-specific tests; run only the tests that tox would run * Tue Jan 21 2025 Benjamin A. Beasley - 4.1.0-1 - Update to 4.1.0 (close RHBZ#2339032) * Sat Jan 18 2025 Fedora Release Engineering - 4.0.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild * Tue Oct 08 2024 Benjamin A. Beasley - 4.0.1-1 - Update to 4.0.1 (close RHBZ#2317289) * Mon Oct 07 2024 Benjamin A. Beasley - 4.0.0-1 - Update to 4.0.0 (close RHBZ#2316717) * Mon Jul 29 2024 Benjamin A. Beasley - 3.8.0-1 - Update to 3.8.0 (close RHBZ#2300465) * Fri Jul 19 2024 Fedora Release Engineering - 3.7.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Fri Jun 07 2024 Python Maint - 3.7.0-2 - Rebuilt for Python 3.13 * Tue Mar 26 2024 Benjamin A. Beasley - 3.7.0-1 - Update to 3.7.0 (close RHBZ#2271311) * Sun Feb 18 2024 Benjamin A. Beasley - 3.6.2-1 - Update to 3.6.2 (close RHBZ#2264761) * Mon Feb 12 2024 Benjamin A. Beasley - 3.6.1-1 - Update to 3.6.1 (close RHBZ#2263682) * Fri Jan 26 2024 Fedora Release Engineering - 3.6.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Jan 21 2024 Fedora Release Engineering - 3.6.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 01 2024 Benjamin A. Beasley - 3.6.0-2 - Assert that the .dist-info directory contains a license file - Simplify setting up the git repository required by the tests * Tue Dec 19 2023 Benjamin A. Beasley - 3.6.0-1 - Update to 3.6.0 (close RHBZ#2253802) * Fri Nov 03 2023 Benjamin A. Beasley - 3.5.0-2 - Patch for Python 3.13 (close RHBZ#2247263) * Tue Oct 24 2023 Benjamin A. Beasley - 3.5.0-1 - Update to 3.5.0 (close RHBZ#2243884) * Sun Sep 03 2023 Benjamin A. Beasley - 3.4.0-1 - Update to 3.4.0 (close RHBZ#2237001) * Mon Jul 24 2023 Benjamin A. Beasley - 3.3.3-1 - Update to 3.3.3 (close RHBZ#2192407) * Fri Jul 21 2023 Fedora Release Engineering - 3.2.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Thu Jun 29 2023 Python Maint - 3.2.2-2 - Rebuilt for Python 3.12 * Tue Apr 04 2023 Benjamin A. Beasley - 3.2.2-1 - Update to 3.2.2 (close RHBZ#2173816) * Thu Feb 23 2023 Benjamin A. Beasley - 3.1.0-1 - Update to 3.1.0 (close RHBZ#2172751) * Fri Feb 03 2023 Benjamin A. Beasley - 3.0.4-1 - Update to 3.0.4 (close RHBZ#2163591) * Mon Jan 23 2023 Benjamin A. Beasley - 2.21.0-2 - Use ruby, not rubypick * Fri Jan 20 2023 Benjamin A. Beasley - 2.21.0-1 - Update to 2.21.0 (close RHBZ#2156253); fixes FTBFS with git ≥ 2.38.1 * Fri Jan 20 2023 Fedora Release Engineering - 2.20.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 2.20.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Tue Jul 12 2022 Benjamin A. Beasley - 2.20.0-1 - Update to 2.20.0 (close RHBZ#2105849) * Mon Jun 13 2022 Python Maint - 2.19.0-2 - Rebuilt for Python 3.11 * Sun May 15 2022 Benjamin A. Beasley - 2.19.0-1 - Update to 2.19.0 * Thu Mar 24 2022 Benjamin A. Beasley - 2.16.0-3 - Use pytest-env, now that it is packaged - Skip tests more precisely/selectively - Drop unnecessary BR on deprecated python-mock - Port to pyproject-rpm-macros * Fri Jan 21 2022 Fedora Release Engineering - 2.16.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Mon Dec 06 2021 Chedi Toueiti - 2.16.0-1 - Update to version 2.16.0 (#2027887) * Fri Oct 01 2021 Chedi Toueiti - 2.14.1-1 - Update to version 2.15.0 (#2000799) * Wed Sep 01 2021 Chedi Toueiti - 2.14.1-1 - Upate to version 2.14.1 (#1990997) * Tue Jul 27 2021 Fedora Release Engineering - 2.13.0-2 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Sat Jul 03 2021 Aniket Pradhan - 2.13.0-1 - Version update to 2.13.0 - Remove redundant dependency generator call - Use pytest macro - Remove unnecessary python-devel version requirement - Removed the dependency for Fedora 31 or lower * Fri Jun 04 2021 Python Maint - 2.11.1-2 - Rebuilt for Python 3.10 * Sun Mar 21 2021 Chedi Toueiti - 2.11.1-1 - Update to version 2.11.1 * Wed Jan 27 2021 Fedora Release Engineering - 2.5.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Tue Jul 28 2020 Fedora Release Engineering - 2.5.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Mon Jun 22 2020 Lumír Balhar - 2.5.1-1 - Update to 2.5.1 * Tue May 26 2020 Miro Hrončok - 2.4.0-2 - Rebuilt for Python 3.9 * Wed May 13 2020 Artem Polishchuk - 2.4.0-1 - Update to 2.4.0 * Thu Apr 23 2020 Artem Polishchuk - 2.3.0-1 - Update to 2.3.0 * Thu Mar 12 2020 Artem Polishchuk - 2.2.0-1 - Update to 2.2.0 * Mon Feb 24 2020 Artem Polishchuk - 2.1.1-1 - Update to 2.1.1 * Mon Feb 24 2020 Artem Polishchuk - 2.1.0-1 - Update to 2.1.0 * Mon Jan 20 2020 Artem Polishchuk - 1.21.0-1 - Update to 1.21.0 - Thanks Aniket Pradhan for help with packaging - Thanks Miro Hrončok for help with packaging * Sun Dec 08 2019 Artem Polishchuk - 1.20.0-1 - Update to 1.20.0 * Thu Oct 24 2019 Artem Polishchuk - 1.18.3-8 - Update to 1.18.3 * Sat Mar 30 2019 Artem Polishchuk - 1.14.4-1 - Initial package ## END: Generated by rpmautospec