dev-vcs/pre-commit: new package, add 3.0.0
Signed-off-by: Andreas Billmeier <b@edevau.net>
This commit is contained in:
parent
c967319603
commit
e7c13457ee
4
dev-vcs/pre-commit/Manifest
Normal file
4
dev-vcs/pre-commit/Manifest
Normal file
@ -0,0 +1,4 @@
|
||||
AUX pre-commit-2.20.0-tests_git_file_transport.patch 2021 BLAKE2B 764b353d3268176162ae2a5d6fc97c0cb9ad7d2cd5de69f19f8fcd78c8bba507f25f53cd3d6c767fbcb9b9f885f8eceda2fc82d1b6ed54f34c1d4907d0fddd72 SHA512 6d8a3b5c9026f5c20a84d581ca92d74743643de010af468217b2f44324560d56b504e033ccebe102194492b25a01a4ed503995c222561ce406577fce211c2eab
|
||||
DIST pre-commit-3.0.0.gh.tar.gz 265698 BLAKE2B 8182a0dc24cd8e99895dd8e3a9dd5fb786ea19e926d4d252420bedd0571f0ada0088e1e842cb8e3dfb27f44662e70068fbff02d98158456dfcb34db0f897a9f6 SHA512 ce7b53d76ce0f1e09de01fb5cb3f825f086687703ed1fcf1badf9276635d91402b53bc4d513a985c9e11f47348b162012f0f4969ed010e79992ca1e437c77895
|
||||
EBUILD pre-commit-3.0.0.ebuild 1703 BLAKE2B c505ffe9e8054cf5ea4fbbe55bbc28cf43e4397a32d34a9528d8a74dd41882113fcb6fd31019bfa9f99ee9c8ddc6d337efe4118e0fb026687e00fef8487361ae SHA512 b22542fc0addca8268034b6925d305801a6dc4cded6fb99e4b84a63610899aabc0ad5056f01df25c81163ee3b0400153cd8da8aebfd891de86a02dace2c4eb5a
|
||||
MISC metadata.xml 519 BLAKE2B 7469b66ef61333b6a6c6b48a1c2ec373f0d3f75dc2b8cd5a9807bf26a72022c437b88b14907617317bab7c19c9a2300357c71dfe28b67828671bee0d59e1ccd2 SHA512 343867cf7f60f4456d9818ba7c0a652496c8c3ce1b5cca2b2be1510c2af793b062a4f3902d02f60c2874563bbd61691668370e25349c54ddc89aa5c425affc6d
|
@ -0,0 +1,44 @@
|
||||
--- 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/repository_test.py
|
||||
+++ b/tests/repository_test.py
|
||||
@@ -443,7 +443,7 @@
|
||||
repo.join('main.go').write(main_go)
|
||||
cmd_output('git', '-C', str(repo), 'init', '.')
|
||||
cmd_output('git', '-C', str(repo), 'add', '.')
|
||||
- cmd_output('git', '-C', str(repo), 'submodule', 'add', str(sub), 'sub')
|
||||
+ cmd_output('git', '-C', str(repo), '-c', 'protocol.file.allow=always', 'submodule', 'add', str(sub), 'sub')
|
||||
git.commit(str(repo))
|
||||
|
||||
config = make_config_from_repo(str(repo))
|
||||
--- a/tests/staged_files_only_test.py
|
||||
+++ b/tests/staged_files_only_test.py
|
||||
@@ -207,7 +207,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')
|
16
dev-vcs/pre-commit/metadata.xml
Normal file
16
dev-vcs/pre-commit/metadata.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>b@edevau.net</email>
|
||||
<name>Andreas Billmeier</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="pypi">pre-commit</remote-id>
|
||||
<remote-id type="github">pre-commit/pre-commit</remote-id>
|
||||
<maintainer status="unknown">
|
||||
<email>asottile@umich.edu</email>
|
||||
<name>Anthony Sottile</name>
|
||||
</maintainer>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
56
dev-vcs/pre-commit/pre-commit-3.0.0.ebuild
Normal file
56
dev-vcs/pre-commit/pre-commit-3.0.0.ebuild
Normal file
@ -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 arm arm64 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}-2.20.0-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
|
Loading…
Reference in New Issue
Block a user