summaryrefslogtreecommitdiff
path: root/dev-vcs/pre-commit
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-03-08 18:00:27 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-03-08 18:00:27 +0000
commit78ebdce6a16942c7081565472862ab6730321ee3 (patch)
tree91e2d66a20ff982c4ccfdb6e95573a0d4ad2b3df /dev-vcs/pre-commit
parent0d96a0e47c83a107ad92e2bc90e5389f577cc9a4 (diff)
gentoo auto-resync : 08:03:2023 - 18:00:26
Diffstat (limited to 'dev-vcs/pre-commit')
-rw-r--r--dev-vcs/pre-commit/Manifest3
-rw-r--r--dev-vcs/pre-commit/files/pre-commit-3.1.1-tests_git_file_transport.patch33
-rw-r--r--dev-vcs/pre-commit/pre-commit-3.1.1.ebuild56
3 files changed, 92 insertions, 0 deletions
diff --git a/dev-vcs/pre-commit/Manifest b/dev-vcs/pre-commit/Manifest
index e362701dded1..fb74f52ab20b 100644
--- a/dev-vcs/pre-commit/Manifest
+++ b/dev-vcs/pre-commit/Manifest
@@ -1,7 +1,10 @@
AUX pre-commit-2.20.0-no_toml.patch 2448 BLAKE2B 1f067b87826fe582b4b9afaf235ec25ff53eefb5b05b28edcc477c9a697e223df0bcda3330afc6ed868c5cdf0ca836da53c884901039c05a7cbd06cbd9e8e2a7 SHA512 7fbd1dcc0fae28d8265827def2ed73eccc65791912e6bd410c457d4c437a385991af9675107634be319ba5fe1521af3309d29f49e2bcc6dcdc091a2a28925beb
AUX pre-commit-2.20.0-tests_git_file_transport.patch 2021 BLAKE2B 764b353d3268176162ae2a5d6fc97c0cb9ad7d2cd5de69f19f8fcd78c8bba507f25f53cd3d6c767fbcb9b9f885f8eceda2fc82d1b6ed54f34c1d4907d0fddd72 SHA512 6d8a3b5c9026f5c20a84d581ca92d74743643de010af468217b2f44324560d56b504e033ccebe102194492b25a01a4ed503995c222561ce406577fce211c2eab
+AUX pre-commit-3.1.1-tests_git_file_transport.patch 1527 BLAKE2B 18d047f3b8a6fdc3da77aa5b8d9f60970ab5b69adc3790489ceffc17839a4cd21ed46428c5e2e98b50278b2c4dc49e35a09dd778000546828327ae96f910f95b SHA512 36cb194250dc0fefad2900452447ab590f678e6cd5edf07a7f072363733c263b7cb1167297c465a9372d4a38ab77a6c057046c66b872a958132a97d1a937d029
DIST pre-commit-2.20.0.gh.tar.gz 266604 BLAKE2B 470f032e6d5bfcdd9ac8ba8f37d4323b601da0c82bcd524ffc575dc688fe81ad326a1f6a8ddd03da6e37130319ee40070c03d9789cd6e0e4b427a1d6e646416e SHA512 b1da558a0e5d8f2f655427089f1d0b11b01ad7513ece7a0b3b67c33529cf3584edba558c78704e6da6ca18876b1d6c0fa8698e01fd7c2439b8d4dc0a93961e52
DIST pre-commit-3.0.4.gh.tar.gz 264952 BLAKE2B 3c45da675d5a1a1fc115db0ef7186c1ec1e5a6d6d9353c5a53dba85a14de2c94bafe0ef9e8d0b04bae55ded81890d726997e695c95889719096205e1b212a237 SHA512 d51aca29b50f67ae42aa70d849939e6af96ff64c6fb214cddbc5a35cacebb8a54a4911110d0615a1a499516fcc2a06bb47d7e11da84ef636c3fcfdc8d2cbe343
+DIST pre-commit-3.1.1.gh.tar.gz 265999 BLAKE2B eff0708397ae88d0223b65168d1dca4e2a6ced808a504d28c10ab6c626682475ef0c5c165dbd13975fb29cdc869abc018d2c1b3a596f904e14357bb3598f1a96 SHA512 e707b9c28f75ae61a9c08dc7031e22c048c8757b4ae6c8fa18c712ab8c5a6d891f62d7b0c8962456931b7281d3a55bfce55569bf44bf65e03661596ed367120c
EBUILD pre-commit-2.20.0-r1.ebuild 1752 BLAKE2B 92c0729e7ab388bcd1d3e37a5f7201deb99a7e966c6858757ab53ca3c1fe518af1b3163b195d7a67f6e14fd03eaae23e7d9f08eb76e5eac07b350102ca9c1fea SHA512 9fe82ca436aa4bc482a2ed6772acd86db1ddbd1931e1fb170e3b4664a17b60afdba5dd524deef18937d95329155a9a48b50e1ec75853d159f9f847d6b7375195
EBUILD pre-commit-3.0.4.ebuild 1713 BLAKE2B ab2caef14c49a15079f3fc02956abb3c973d0ed168f6d231befd780921dbb1541d791313bd5b999850db072a53ffd963c3686b8cbf845caa650e6804c6b8cefd SHA512 0060581011dbd0e85e86dea57e29c8e9db2187ed70a9fe226bdf9f220f56c9e1c065a76d9471e6590abf50d9e234cbc54ee873075868aeec6438edc8c78c9ab5
+EBUILD pre-commit-3.1.1.ebuild 1712 BLAKE2B 9278f8bd3f30783e7b9be66e51ec12ec7f2d1a38ff0d2490f267471949555a2d636a170b252db05c3c42fdc0b8ce616b39ec71ef367d25a03e400abebff8389b SHA512 59184158fea49d36dca187b2c92f38ce00d964df1536f848ba10e217aef44ac7cd236b6ac3f9e76198139fec5347d66bbc3198c0d4108f887523d985e343b027
MISC metadata.xml 380 BLAKE2B 99842a97367e91700c6f714f427b7b3d4b7212c401abae5ab715dfaa724776f02fe250184a33504d3433bb58cd5679af59a32ec21a7e7432481160dab36a4d95 SHA512 45330930d1e58fc1de0fd0ba55cd488dee96579ceab3be5073b91ff8f4f2b9adefff533dbfa5b0e8b23fbb648d45c0b7b4073a1ec57b586600cc2bf6347e0bbb
diff --git a/dev-vcs/pre-commit/files/pre-commit-3.1.1-tests_git_file_transport.patch b/dev-vcs/pre-commit/files/pre-commit-3.1.1-tests_git_file_transport.patch
new file mode 100644
index 000000000000..7a65aecae160
--- /dev/null
+++ b/dev-vcs/pre-commit/files/pre-commit-3.1.1-tests_git_file_transport.patch
@@ -0,0 +1,33 @@
+--- a/tests/commands/install_uninstall_test.py
++++ b/tests/commands/install_uninstall_test.py
+@@ -176,7 +176,7 @@
+ def test_install_in_submodule_and_run(tempdir_factory, store):
+ src_path = make_consuming_repo(tempdir_factory, 'script_hooks_repo')
+ parent_path = git_dir(tempdir_factory)
+- cmd_output('git', 'submodule', 'add', src_path, 'sub', cwd=parent_path)
++ cmd_output('git', '-c', 'protocol.file.allow=always', 'submodule', 'add', src_path, 'sub', cwd=parent_path)
+ git_commit(cwd=parent_path)
+
+ sub_pth = os.path.join(parent_path, 'sub')
+--- a/tests/conftest.py
++++ b/tests/conftest.py
+@@ -90,7 +90,7 @@
+ git_dir_1 = git_dir(tempdir_factory)
+ git_dir_2 = git_dir(tempdir_factory)
+ git_commit(msg=in_conflicting_submodule.__name__, cwd=git_dir_2)
+- cmd_output('git', 'submodule', 'add', git_dir_2, 'sub', cwd=git_dir_1)
++ cmd_output('git', '-c', 'protocol.file.allow=always', 'submodule', 'add', git_dir_2, 'sub', cwd=git_dir_1)
+ with cwd(os.path.join(git_dir_1, 'sub')):
+ _make_conflict()
+ yield
+--- a/tests/staged_files_only_test.py
++++ b/tests/staged_files_only_test.py
+@@ -211,7 +211,7 @@
+ cmd_output('git', 'add', 'bar')
+ git_commit()
+ cmd_output(
+- 'git', 'submodule', 'add', repo_with_commits.path, 'sub',
++ 'git', '-c', 'protocol.file.allow=always', 'submodule', 'add', repo_with_commits.path, 'sub',
+ )
+ checkout_submodule(repo_with_commits.rev1)
+ cmd_output('git', 'add', 'sub')
diff --git a/dev-vcs/pre-commit/pre-commit-3.1.1.ebuild b/dev-vcs/pre-commit/pre-commit-3.1.1.ebuild
new file mode 100644
index 000000000000..7207920c1aee
--- /dev/null
+++ b/dev-vcs/pre-commit/pre-commit-3.1.1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+DISTUTILS_SINGLE_IMPL=1
+DISTUTILS_USE_PEP517=setuptools
+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}.gh.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86"
+
+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="test? (
+ $(python_gen_cond_dep '
+ dev-python/pytest-env[${PYTHON_USEDEP}]
+ dev-python/re-assert[${PYTHON_USEDEP}]
+ ')
+ sys-apps/coreutils[-multicall]
+)"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1.1-tests_git_file_transport.patch
+)
+
+DOCS=( CHANGELOG.md CONTRIBUTING.md README.md )
+
+# The former two 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.
+# The latter 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 and when run manually with tox.
+EPYTEST_DESELECT=(
+ tests/languages/
+ tests/repository_test.py
+ tests/main_test.py::test_all_cmds
+ tests/main_test.py::test_try_repo
+)
+
+distutils_enable_tests pytest