blob: 5050d5b00c5c7e3408da065c175b067b83034532 (
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# Maintainer: Blair Bonnett <blair.bonnett@gmail.com>
# Contributor: Andrej Radović <r.andrej@gmail.com>
pkgname=python-copier
_name=${pkgname#python-}
pkgver=9.4.1
pkgrel=1
pkgdesc='Library and command-line utility for rendering projects templates'
arch=('any')
url='https://github.com/copier-org/copier'
license=('MIT')
depends=(
'python-colorama'
'python-dunamai'
'python-funcy'
'python-jinja'
'python-jinja2-ansible-filters'
'python-packaging'
'python-pathspec'
'python-plumbum'
'python-prompt_toolkit'
'python-pydantic'
'python-pygments'
'python-questionary'
'python-yaml'
)
makedepends=(
'git' 'python-build' 'python-installer' 'python-wheel'
'python-poetry-dynamic-versioning'
)
checkdepends=(
'python-poethepoet' 'python-pytest' 'python-pytest-cov'
'python-pytest-gitconfig' 'python-pytest-xdist'
)
optdepends=(
'git: VCS support'
)
# PyPI tarball does not include tests; GitHub tarball fails to build
# as poetry-dynamic-versioning fails to find metadata.
source=(
"git+https://github.com/copier-org/copier.git#tag=v$pkgver"
)
sha256sums=(
'692e5340353f2e76b73eac194bff97489f151dfe0649d26e8ceebc55fd4679ac'
)
build() {
cd copier
python -m build --wheel --no-isolation
}
check() {
cd copier
python -m venv --system-site-packages test-env
test-env/bin/python -m installer "dist/$_name-$pkgver-"*.whl
test-env/bin/python -m pytest -k 'not test_types and not test_commit_hooks_respected'
}
package() {
cd copier
python -m installer --destdir="$pkgdir" "dist/$_name-$pkgver-"*.whl
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dm644 *.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}
|