summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2021-05-25 13:03:27 +0100
committerMarek Szuba <marecki@gentoo.org>2021-05-25 13:30:58 +0100
commit601bee8634604f80b438ed706f46a45c97554ac1 (patch)
tree0d17ac7c279e956e87d9110bbd8ee95a87509bd6 /dev-vcs
parentapp-emulation/protontricks: add 1.5.1 (diff)
downloadgentoo-601bee8634604f80b438ed706f46a45c97554ac1.tar.gz
gentoo-601bee8634604f80b438ed706f46a45c97554ac1.tar.bz2
gentoo-601bee8634604f80b438ed706f46a45c97554ac1.zip
dev-vcs/pre-commit: add 2.13.0
Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'dev-vcs')
-rw-r--r--dev-vcs/pre-commit/Manifest1
-rw-r--r--dev-vcs/pre-commit/pre-commit-2.13.0.ebuild59
2 files changed, 60 insertions, 0 deletions
diff --git a/dev-vcs/pre-commit/Manifest b/dev-vcs/pre-commit/Manifest
index b94fd505fbe6..6a58d3a08e15 100644
--- a/dev-vcs/pre-commit/Manifest
+++ b/dev-vcs/pre-commit/Manifest
@@ -1 +1,2 @@
DIST pre-commit-2.12.1.tar.gz 246313 BLAKE2B 45ee7c8217f88eeaa2e9eb11efd79291d6577134799b328f252bd4d4283c11754b36ffeedf045a5101c6edc8cdf330d566e404ae34f1a831a830e8e0346337e9 SHA512 6dbd804e1001276e6e8cea7c31b321a05798b38c59f37d5900317c3a9ceccf5103afcbdfd29f9438be3595a18ae15eb09dd222c91c439da47d7728a0e0a55c70
+DIST pre-commit-2.13.0.tar.gz 252631 BLAKE2B 7e6b3af46dfaf9928d2cb2aa6cad05423bf6e417e2324af71b241e1aaa2eec6fcb271869f98c040cd4fb8c608a1fabd244c8286864f469a06c44684cd2bf33eb SHA512 5dfc297b3f900afef8f1c355b38ce086af7c836d1e577af8ec95ffb30e82df8b866131da4ff12933339bda63e4a90833c3852265d4f2d4a59bf92bce2b972a5e
diff --git a/dev-vcs/pre-commit/pre-commit-2.13.0.ebuild b/dev-vcs/pre-commit/pre-commit-2.13.0.ebuild
new file mode 100644
index 000000000000..d2e6b60c37b1
--- /dev/null
+++ b/dev-vcs/pre-commit/pre-commit-2.13.0.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..9} )
+DISTUTILS_SINGLE_IMPL=1
+DISTUTILS_USE_SETUPTOOLS=rdepend
+PYTHON_REQ_USE="sqlite"
+
+inherit distutils-r1
+
+DESCRIPTION="A framework for managing and maintaining multi-language Git pre-commit hooks"
+HOMEPAGE="https://pre-commit.com/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+# TODO: figure out why these tests - all of which invoke git - fail:
+# - tests/main_test.py::test_all_cmds[autoupdate,hook-impl,install,install-hooks,migrate-config,run,uninstall],
+# tests/main_test.py::test_try_repo:
+# Calling "git rev-parse" fails with "fatal: not a git repository (or any of the parent directories): .git".
+# NOT a sandbox issue it seems, as disabling it does not help.
+# - tests/commands/install_uninstall_test.py::test_environment_not_sourced:
+# Unexpected error "/usr/bin/env: 'python3.8': No such file or directory" - but only if pre-commit
+# has previously been installed.
+# - tests/commands/install_uninstall_test.py::test_installed_from_venv:
+# the function invoking "git commit" returns 1 instead of 0, no details.
+RESTRICT="test"
+
+RDEPEND="dev-vcs/git
+ $(python_gen_cond_dep '
+ dev-python/cfgv[${PYTHON_USEDEP}]
+ dev-python/identify[${PYTHON_USEDEP}]
+ dev-python/nodeenv[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/toml[${PYTHON_USEDEP}]
+ >=dev-python/virtualenv-20.0.8[${PYTHON_USEDEP}]
+ ')"
+BDEPEND="test? (
+ $(python_gen_cond_dep '
+ dev-python/pytest-env[${PYTHON_USEDEP}]
+ dev-python/re-assert[${PYTHON_USEDEP}]
+ ')
+)"
+
+DOCS=( CHANGELOG.md CONTRIBUTING.md README.md )
+
+distutils_enable_tests --install pytest
+
+src_prepare() {
+ default
+
+ # These tests 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.
+ rm -rf tests/languages tests/repository_test.py
+}