archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / python-threat9-test-bed / trunk / PKGBUILD
blobcabb2e982be737895b14edc51ebd56ed3eace772
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
3 pkgname=python-threat9-test-bed
4 _pyname=threat9-test-bed
5 _gitcommit=1ed61b34d0b138711e3f8267259cdb29787fe349
6 pkgver=0.6.0+2+g1ed61b3
7 pkgrel=9
8 pkgdesc='Threat9 Test Bed'
9 url='https://github.com/threat9/threat9-test-bed'
10 arch=('any')
11 license=('custom')
12 depends=('python' 'python-click' 'python-faker' 'python-flask'
13          'python-asgiref' 'gunicorn' 'python-pyopenssl' 'python-requests')
14 makedepends=('git' 'python-build' 'python-installer' 'python-setuptools-scm' 'python-setuptools' 'python-wheel')
15 checkdepends=('python-pytest')
16 source=(${pkgname}::"git+https://github.com/threat9/threat9-test-bed#commit=${_gitcommit}"
17         http-service-async-mock.patch)
18 sha512sums=('SKIP'
19             '50ce00674dbf9878f09b27397af2f062fab8a71b11e66b49eb710876b49812ce95c93f4ee55bf1ad103b6f5d5b48b86c826a5adc2f9fddeb393ff6bddc650839')
21 pkgver() {
22   cd ${pkgname}
23   git describe --always --tags | sed 's/^v//;s/-/+/g'
26 prepare() {
27   cd ${pkgname}
28   # not sure why this works lol
29   patch -Np1 -i ../http-service-async-mock.patch
32 build() {
33   cd ${pkgname}
34   python -m build --wheel --no-isolation
37 check() {
38   cd ${pkgname}
39   python -m pytest
42 package() {
43   cd ${pkgname}
44   python -m installer --destdir="$pkgdir" dist/*.whl
45   install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
48 # vim: ts=2 sw=2 et: