summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c9fce023f9977e16e2f8f1e5b6736d6b7195a09d (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
# Maintainer: Kyle Manna <kyle[at]kylemanna[d0t]com>
pkgname=python-crochet
_pkgname=${pkgname/python-/}
pkgver=2.0.0
pkgrel=1
pkgdesc='Crochet is a library that makes it easier to use Twisted from regular blocking code'
url="https://github.com/itamarst/crochet"
depends=('python' 'python-twisted' 'python-wrapt')
makedepends=('python-setuptools')
optdepends=()
license=('MIT')
arch=('any')
source=("https://pypi.python.org/packages/source/c/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
sha256sums=('5f7f6c0d41ec418da16080f0202faac6b30f84a6fca9d8911e9db541f8e4e521')

build() {
    cd "$srcdir/$_pkgname-$pkgver"
    python setup.py build
}

package() {
    cd "$srcdir/$_pkgname-$pkgver"
    python setup.py install --root="$pkgdir" --optimize=1 

    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

    local site_packages=$(python -c 'import site; print(site.getsitepackages()[0])')
    rm -rf "${pkgdir}${site_packages}/tests"
}