commit: f2ac6d51ab0547bf9d123fe4fb2b1776bf24787e
Author: Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 31 11:50:29 2026 +0000
Commit: Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Sat Jan 31 14:03:49 2026 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2ac6d51
dev-vcs/pre-commit: bump to 4.5.1
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>
dev-vcs/pre-commit/Manifest | 1 +
dev-vcs/pre-commit/pre-commit-4.5.1.ebuild | 76 ++++++++++++++++++++++++++++++
2 files changed, 77 insertions(+)
diff --git a/dev-vcs/pre-commit/Manifest b/dev-vcs/pre-commit/Manifest
index 979e6bf84eaa..773da2733dd8 100644
--- a/dev-vcs/pre-commit/Manifest
+++ b/dev-vcs/pre-commit/Manifest
@@ -1,2 +1,3 @@
DIST pre-commit-4.1.0.gh.tar.gz 289203 BLAKE2B
8a3264dcbc01f6a7544b7f8425f320e701eb8aad63a4be9843bec5c95cda3bc47a8458b94967eaf4fad5d24c5b86062c999de0e482386293d6562aa5b4244631
SHA512
d10f90da9c8b2130cd6c17d337787648fb28774e5b4df4017cd57264530dca87b03a07e549b46cc2e5c8f292c34c0890c4940f03ed132a7a274176c45f387607
DIST pre-commit-4.2.0.gh.tar.gz 289863 BLAKE2B
1f338e9b610f79ec4bd537ab69110f86b36e8ff2f84628b5b7a54af4312f43a358f9c8da7c54c7327512cd14ec39819aa3724009dae11c9d016ef5beae6127e8
SHA512
6843c56ae06c8c2cabb23e72217a1a8696ede4e4ddf2d4fae28c43076438e47e6f9d73642377b529ce629f184ece4c0076df613afff233ca1e28c5aa672f3b4a
+DIST pre-commit-4.5.1.gh.tar.gz 299858 BLAKE2B
416e842a618fda5d32ef8b40d9b9ea9ec181a1c915493c6647429229b361bf6138a8730016103a9772d11324c3e0503592c65aed5f8174e2d1397abc9d83cee4
SHA512
9600b09e10a4811886849ad881a3584c66a5f8a5ae217ef13e373df7fe78c2b5e72d7c9ae40c2174bda520a24c8bd26280c4292a3c500b2dd5879229c9a9a9fb
diff --git a/dev-vcs/pre-commit/pre-commit-4.5.1.ebuild
b/dev-vcs/pre-commit/pre-commit-4.5.1.ebuild
new file mode 100644
index 000000000000..56d344bf9fc5
--- /dev/null
+++ b/dev-vcs/pre-commit/pre-commit-4.5.1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{12..14} )
+PYTHON_REQ_USE="sqlite"
+DISTUTILS_SINGLE_IMPL="ON"
+DISTUTILS_USE_PEP517="setuptools"
+EPYTEST_PLUGINS=( pytest-env )
+
+inherit distutils-r1
+
+DESCRIPTION="A framework for managing and maintaining multi-language Git
pre-commit hooks"
+HOMEPAGE="https://pre-commit.com/
+ https://github.com/pre-commit/pre-commit/"
+
+if [[ "${PV}" == *9999* ]] ; then
+ inherit git-r3
+
+ EGIT_REPO_URI="https://github.com/${PN}/${PN}.git"
+else
+ SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz
+ -> ${P}.gh.tar.gz"
+
+ KEYWORDS="~amd64 ~arm64 ~hppa ~ppc ~ppc64 ~x86"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+
+RDEPEND="
+ dev-vcs/git
+ $(python_gen_cond_dep '
+ >=dev-python/cfgv-2.0.0[${PYTHON_USEDEP}]
+ >=dev-python/identify-1.0.0[${PYTHON_USEDEP}]
+ >=dev-python/nodeenv-0.11.1[${PYTHON_USEDEP}]
+ >=dev-python/pyyaml-5.1[${PYTHON_USEDEP}]
+ >=dev-python/virtualenv-20.10.0[${PYTHON_USEDEP}]
+ ')
+"
+# coreutils requirement, see bug #885559
+BDEPEND="
+ sys-apps/coreutils[-multicall]
+ test? (
+ $(python_gen_cond_dep '
+ dev-python/re-assert[${PYTHON_USEDEP}]
+ ')
+ )
+"
+
+PATCHES=( "${FILESDIR}/${PN}-3.1.1-tests_git_file_transport.patch" )
+
+EPYTEST_DESELECT=(
+ # All of these require a boatload of dependencies (e.g. Conda, Go, R and
+ # more) in order to run and while some of them do include
+ # "skip if not found" logic, most of them do not.
+ tests/languages/
+ tests/repository_test.py
+
+ # These three consistently fail with
+ # Calling "git rev-parse" fails with "fatal:
+ # not a git repository (or any of the parent directories): .git".
+ # including with the sandbox disabled.
+ tests/main_test.py::test_all_cmds
+ tests/main_test.py::test_hook_stage_migration
+ tests/main_test.py::test_try_repo
+
+ # These two fail if pre-commit is already installed (Bug #894502)
+ tests/commands/install_uninstall_test.py::test_environment_not_sourced
+ tests/commands/install_uninstall_test.py::test_installed_from_venv
+)
+
+distutils_enable_tests pytest
+
+DOCS=( CHANGELOG.md CONTRIBUTING.md README.md )