mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-16 22:22:12 +01:00
74 lines
1.6 KiB
Plaintext
74 lines
1.6 KiB
Plaintext
# Contributor: Galen Abell <galen@galenabell.com>
|
|
# Maintainer: Galen Abell <galen@galenabell.com>
|
|
pkgname=pre-commit
|
|
pkgver=3.2.1
|
|
pkgrel=0
|
|
pkgdesc="framework for managing and maintaining multi-language pre-commit hooks"
|
|
url="https://pre-commit.com"
|
|
arch="noarch"
|
|
license="MIT"
|
|
depends="
|
|
python3
|
|
py3-cfgv
|
|
py3-identify
|
|
py3-nodeenv
|
|
py3-yaml
|
|
py3-toml
|
|
py3-virtualenv
|
|
py3-platformdirs
|
|
"
|
|
makedepends="
|
|
py3-gpep517
|
|
py3-setuptools
|
|
py3-wheel
|
|
"
|
|
checkdepends="
|
|
git
|
|
py3-distlib
|
|
py3-pytest
|
|
py3-pytest-env
|
|
py3-re-assert
|
|
"
|
|
options="net"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/pre-commit/pre-commit/archive/refs/tags/v$pkgver.tar.gz"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
# setup for some of the integration tests
|
|
git init
|
|
git config user.email "test@alpinelinux.org"
|
|
git config user.name "Alpine Linux"
|
|
}
|
|
|
|
build() {
|
|
gpep517 build-wheel \
|
|
--wheel-dir dist \
|
|
--output-fd 3 3>&1 >&2
|
|
}
|
|
|
|
check() {
|
|
export PYTHONPATH="."
|
|
|
|
export GIT_AUTHOR_NAME="Alpine Linux"
|
|
export GIT_COMMITTER_NAME="Alpine Linux"
|
|
export GIT_AUTHOR_EMAIL="test@alpinelinux.org"
|
|
export GIT_COMMITTER_EMAIL="test@alpinelinux.org"
|
|
export PRE_COMMIT_NO_CONCURRENCY=1
|
|
|
|
python3 -m venv --clear --without-pip --system-site-packages testenv
|
|
testenv/bin/python3 -m installer dist/*.whl
|
|
|
|
PATH="$PATH:$PWD/testenv/bin" \
|
|
testenv/bin/python3 -m pytest -v \
|
|
--ignore tests/languages
|
|
}
|
|
|
|
package() {
|
|
python3 -m installer -d "$pkgdir" \
|
|
dist/*.whl
|
|
}
|
|
|
|
sha512sums="
|
|
5e2c114049d84eae2ec6cbf123c8e3976d8e9e392a6e04f78d446ad85758a78fb912c0f6070b9c506f8c1bb87e1fd1ecbe763deb8d1430e1d3d8f296dd0cc389 pre-commit-3.2.1.tar.gz
|
|
"
|