Date: Thursday, October 7, 2021 @ 16:32:12 Author: freswa Revision: 1027956
archrelease: copy trunk to community-testing-any Added: python-pre-commit/repos/community-testing-any/ python-pre-commit/repos/community-testing-any/PKGBUILD (from rev 1027955, python-pre-commit/trunk/PKGBUILD) ----------+ PKGBUILD | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) Copied: python-pre-commit/repos/community-testing-any/PKGBUILD (from rev 1027955, python-pre-commit/trunk/PKGBUILD) =================================================================== --- community-testing-any/PKGBUILD (rev 0) +++ community-testing-any/PKGBUILD 2021-10-07 16:32:12 UTC (rev 1027956) @@ -0,0 +1,57 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +pkgname=python-pre-commit +pkgver=2.15.0 +pkgrel=1 +pkgdesc="A framework for managing and maintaining multi-language pre-commit hooks" +url="https://github.com/pre-commit/pre-commit" +license=('MIT') +arch=('any') +depends=('python-cfgv' 'python-identify' 'python-nodeenv' 'python-yaml' 'python-toml' + 'python-virtualenv') +makedepends=('python-setuptools') +checkdepends=('python-pytest' 'python-pytest-env' 'python-re-assert' 'dotnet-sdk' 'git' + 'go' 'nodejs' 'npm' 'python2' 'rubygems' 'rust' 'r' 'dart') +source=("https://github.com/pre-commit/pre-commit/archive/v$pkgver/$pkgname-$pkgver.tar.gz") +sha512sums=('b87985aa625509d7a21e31e5774f259c264ec74fef88fc5e290cbac0326cdbadc37ab54b5bf3048d815cf9bc6d4adb71619fcb84c955c1bc9741da8dfd34251c') + +build() { + cd pre-commit-$pkgver + python setup.py build +} + +check() { + cd pre-commit-$pkgver + git init + git config user.email "pony@arch" + git config user.name "Lucky Pony" + export GIT_AUTHOR_NAME="Lucky Pony" + export GIT_COMMITTER_NAME="Lucky Pony" + export GIT_AUTHOR_EMAIL="pony@arch" + export GIT_COMMITTER_EMAIL="pony@arch" + export VIRTUALENV_NO_DOWNLOAD=1 + export PRE_COMMIT_NO_CONCURRENCY=1 + + # Empty venv so that `importlib` picks up the local "pre-commit" package + python -m venv --system-site-packages venv + source "$PWD/venv/bin/activate" + python setup.py develop + + # Deselect conda because we don't have it! + # test_install_ruby_with_version,test_run_a_ruby_hook: https://github.com/pre-commit/pre-commit/issues/1368 + python -m pytest --deselect tests/repository_test.py::test_conda_hook \ + --deselect tests/repository_test.py::test_conda_with_additional_dependencies_hook \ + --deselect tests/repository_test.py::test_local_conda_additional_dependencies \ + --deselect tests/repository_test.py::test_run_a_ruby_hook \ + --deselect tests/languages/ruby_test.py::test_install_ruby_with_version \ + --deselect tests/repository_test.py::test_switch_language_versions_doesnt_clobber \ + --deselect tests/repository_test.py::test_dotnet_hook + deactivate +} + +package() { + cd pre-commit-$pkgver + python setup.py install --root="$pkgdir" --optimize=1 + + install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/ +}