blob: 845a4c3929c00e2f36067611e032d6b42c914b18 (
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
|
# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
# Contributor: Luis Martinez <luis dot martinez at disroot dot org>
_base=vt-py
pkgname=python-${_base}
pkgver=0.20.0
pkgrel=1
pkgdesc="Official Python client library for VirusTotal's REST API"
arch=(any)
url="https://github.com/virustotal/${_base}"
license=(Apache-2.0)
depends=(python-aiohttp python-aiofiles)
makedepends=(python-build python-installer python-setuptools python-wheel python-sphinx)
checkdepends=(python-pytest-asyncio python-pytest-httpserver)
provides=(python-virustotal)
replaces=(python-virustotal-api)
source=(${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz)
sha512sums=('fa96b65ff1d697f086b6f3cc0b8b7ed07aa0c6bac7ea1d91b696079e48e3c3275f3f2315be12f81a2963f1a7fdf6f727d6fdb358abad639dff5529b745e49795')
prepare() {
sed -i '/setup_requires/d' ${_base}-${pkgver}/setup.py
}
build() {
cd ${_base}-${pkgver}
python -m build --wheel --skip-dependency-check --no-isolation
PYTHONPATH="${PWD}" sphinx-build -b man docs/source _build
}
check() {
cd ${_base}-${pkgver}
python -m venv --system-site-packages test-env
test-env/bin/python -m installer dist/*.whl
test-env/bin/python -m pytest
}
package() {
cd ${_base}-${pkgver}
PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python -m installer --destdir="${pkgdir}" dist/*.whl
install -Dm644 "_build/${_base}.1" -t "$pkgdir/usr/share/man/man1/"
install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
|