blob: 0b867d8bb0ecb036b30c9fe20ac70bf9ab4e8748 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# Maintainer: Manuel Kauschinger <admin at bruzzzla dot de>
# Contributor: Serkan Hosca <serkan@hosca.com>
pkgbase=python-pre-commit
pkgname=(python-pre-commit python2-pre-commit)
pypi_name=pre_commit
pkgver=1.15.2
pkgrel=1
pkgdesc="A framework for managing and maintaining multi-language pre-commit hooks."
arch=('any')
license=('MIT')
url="http://pre-commit.com/"
makedepends=(
'python' 'python-nodeenv' 'python-aspy-yaml' 'python-virtualenv' 'python-cached-property' 'python-identify'
'python2' 'python2-aspy-yaml' 'python2-virtualenv' 'python-cached-property' 'python2-identify'
)
source=("https://pypi.io/packages/source/p/${pypi_name}/${pypi_name}-${pkgver}.tar.gz")
md5sums=('5e49f956ce0f18b4f464e4bb9fd57b9d')
prepare() {
cp -a ${pypi_name}-${pkgver}{,-python2}
}
build() {
cd "${srcdir}/${pypi_name}-${pkgver}"
python setup.py build
cd "${srcdir}/${pypi_name}-${pkgver}-python2"
python2 setup.py build
}
package_python-pre-commit() {
pkgdesc='Python 3 client for pre-commit'
depends=('python' 'python-nodeenv' 'python-aspy-yaml' 'python-virtualenv' 'python-cached-property' 'python-identify'
'python-toml' 'python-cfgv' 'python-importlib-metadata')
cd "${srcdir}/${pypi_name}-${pkgver}"
python setup.py install --optimize=1 --prefix=/usr --root="${pkgdir}" --skip-build
}
package_python2-pre-commit() {
pkgdesc='Python 2 client for pre-commit'
depends=('python2' 'python-nodeenv' 'python2-aspy-yaml' 'python2-virtualenv' 'python-cached-property' 'python2-identify'
'python2-toml' 'python2-cfgv' 'python2-importlib-metadata')
cd "${srcdir}/${pypi_name}-${pkgver}-python2"
python2 setup.py install --optimize=1 --prefix=/usr --root="${pkgdir}" --skip-build
mv ${pkgdir}/usr/bin/pre-commit ${pkgdir}/usr/bin/pre-commit2
mv ${pkgdir}/usr/bin/pre-commit-validate-config ${pkgdir}/usr/bin/pre-commit2-validate-config
mv ${pkgdir}/usr/bin/pre-commit-validate-manifest ${pkgdir}/usr/bin/pre-commit2-validate-manifest
}
# vim: set ft=sh ts=4 sw=4 noet:
|