blob: 3fd63d19374d65a70850e6771ec0da0c9a4e8aec (
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
|
# Maintainer: Daniel Bermond <dbermond@archlinux.org>
pkgname=python-flatbencode
pkgver=0.2.1
pkgrel=4
pkgdesc='Fast, safe and non-recursive implementation of Bittorrent bencoding'
arch=('any')
url='https://github.com/acatton/flatbencode/'
license=('MIT')
depends=('python')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
checkdepends=('python-pytest' 'python-hypothesis')
source=("https://github.com/acatton/flatbencode/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha256sums=('867da7bf5106909dc16cc6c6b4a99a2d42b0f5770600a84115ed04bfdec9e44d')
build() {
cd "flatbencode-${pkgver}"
python -m build --wheel --no-isolation
}
check() {
cd "flatbencode-${pkgver}"
pytest
}
package() {
cd "flatbencode-${pkgver}"
python -m installer --destdir="$pkgdir" dist/*.whl
local _pyver
_pyver="$(python -c 'import sys; print("%s.%s" %sys.version_info[0:2])')"
install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}"
ln -s "../../../lib/python${_pyver}/site-packages/flatbencode-${pkgver}.dist-info/LICENSE" \
"${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
|