1 |
commit: c9c3201d0fb8558827fd78f5bb20c573b863fa51 |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 22 16:27:10 2021 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 22 16:51:20 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9c3201d |
7 |
|
8 |
dev-vcs/pre-commit: add 2.12.1 |
9 |
|
10 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
11 |
|
12 |
dev-vcs/pre-commit/Manifest | 1 + |
13 |
dev-vcs/pre-commit/pre-commit-2.12.1.ebuild | 56 +++++++++++++++++++++++++++++ |
14 |
2 files changed, 57 insertions(+) |
15 |
|
16 |
diff --git a/dev-vcs/pre-commit/Manifest b/dev-vcs/pre-commit/Manifest |
17 |
index 38fb887c07e..96abbe1d8c1 100644 |
18 |
--- a/dev-vcs/pre-commit/Manifest |
19 |
+++ b/dev-vcs/pre-commit/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST pre-commit-2.12.0.tar.gz 246269 BLAKE2B a697cc0287e0cd5698d78056cd51484115788fc22ab36d951e3f390efad881353ed10a39f04fbfda78c163f2eb67357d6b0050d2a34d79fcb4c3495b9eab6046 SHA512 b65dab5dade2186785b2065d9d73427836a61acc3b2efcf54e74313361dcdb89c7ec829a1f653a4491afbe78d11cd4ed640ca579e7d2ca383daeb9680867812d |
22 |
+DIST pre-commit-2.12.1.tar.gz 246313 BLAKE2B 45ee7c8217f88eeaa2e9eb11efd79291d6577134799b328f252bd4d4283c11754b36ffeedf045a5101c6edc8cdf330d566e404ae34f1a831a830e8e0346337e9 SHA512 6dbd804e1001276e6e8cea7c31b321a05798b38c59f37d5900317c3a9ceccf5103afcbdfd29f9438be3595a18ae15eb09dd222c91c439da47d7728a0e0a55c70 |
23 |
|
24 |
diff --git a/dev-vcs/pre-commit/pre-commit-2.12.1.ebuild b/dev-vcs/pre-commit/pre-commit-2.12.1.ebuild |
25 |
new file mode 100644 |
26 |
index 00000000000..5a4c4ea945f |
27 |
--- /dev/null |
28 |
+++ b/dev-vcs/pre-commit/pre-commit-2.12.1.ebuild |
29 |
@@ -0,0 +1,56 @@ |
30 |
+# Copyright 1999-2021 Gentoo Authors |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=7 |
34 |
+ |
35 |
+PYTHON_COMPAT=( python3_{8..9} ) |
36 |
+DISTUTILS_SINGLE_IMPL=1 |
37 |
+DISTUTILS_USE_SETUPTOOLS=rdepend |
38 |
+PYTHON_REQ_USE="sqlite" |
39 |
+ |
40 |
+inherit distutils-r1 |
41 |
+ |
42 |
+DESCRIPTION="A framework for managing and maintaining multi-language Git pre-commit hooks" |
43 |
+HOMEPAGE="https://pre-commit.com/" |
44 |
+SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" |
45 |
+ |
46 |
+LICENSE="MIT" |
47 |
+SLOT="0" |
48 |
+KEYWORDS="~amd64" |
49 |
+ |
50 |
+# TODO: figure out why these tests - all of which invoke git - fail: |
51 |
+# - tests/main_test.py::test_all_cmds[autoupdate,hook-impl,install,install-hooks,migrate-config,run,uninstall] |
52 |
+# "Git failed", not much information beyond that |
53 |
+# - tests/main_test.py::test_try_repo |
54 |
+# Ditto |
55 |
+# - tests/commands/install_uninstall_test.py::test_installed_from_venv |
56 |
+# "git commit" returns 1 instead of 0, again no details |
57 |
+RESTRICT="test" |
58 |
+ |
59 |
+RDEPEND="dev-vcs/git |
60 |
+ $(python_gen_cond_dep ' |
61 |
+ dev-python/cfgv[${PYTHON_USEDEP}] |
62 |
+ dev-python/identify[${PYTHON_USEDEP}] |
63 |
+ dev-python/nodeenv[${PYTHON_USEDEP}] |
64 |
+ dev-python/pyyaml[${PYTHON_USEDEP}] |
65 |
+ dev-python/toml[${PYTHON_USEDEP}] |
66 |
+ >=dev-python/virtualenv-20.0.8[${PYTHON_USEDEP}] |
67 |
+ ')" |
68 |
+BDEPEND="test? ( |
69 |
+ $(python_gen_cond_dep ' |
70 |
+ dev-python/pytest-env[${PYTHON_USEDEP}] |
71 |
+ dev-python/re-assert[${PYTHON_USEDEP}] |
72 |
+ ') |
73 |
+)" |
74 |
+ |
75 |
+DOCS=( CHANGELOG.md CONTRIBUTING.md README.md ) |
76 |
+ |
77 |
+distutils_enable_tests --install pytest |
78 |
+ |
79 |
+src_prepare() { |
80 |
+ default |
81 |
+ |
82 |
+ # These tests require a boatload of dependencies (e.g. Conda, Go, R and more) in order to run |
83 |
+ # and while some of them do include "skip if not found" logic, most of them do not. |
84 |
+ rm -rf tests/languages tests/repository_test.py |
85 |
+} |