summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a4496310a488fc71cc1287a530ab5c7064d11642 (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: Matthew Gamble <git@matthewgamble.net>

pkgname=python-freiner
pkgver=3.0.4
pkgrel=2
pkgdesc="Generic rate limiting solution for python applications, supporting various strategies and storage backends."
arch=("any")
url="https://github.com/djmattyg007/freiner/"
license=("MIT")
depends=("python" "python-typing_extensions")
makedepends=("python-setuptools")
# Right now pymemcache doesn't even build, and I still have to package python-rediscluster
#makedepends=("python-setuptools" "python-sphinx" "python-sphinx_rtd_theme" "python-pymemcache" "python-redis" "python-rediscluster")
source=("https://pypi.io/packages/source/f/freiner/freiner-${pkgver}.tar.gz")
sha256sums=("b9e660460c9b194b160233d0a59ce1b1968ea43d7b5798972c84bb17594f205f")

build() {
    cd "freiner-${pkgver}"

    python setup.py build

    #cd docs
    #sphinx-build -nb html -d build/doctrees . build/html
}

package() {
    cd "freiner-${pkgver}"

    PYTHONHASHSEED=0 python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
    install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/python-freiner/LICENSE.txt"
    install -Dm644 README.rst "${pkgdir}/usr/share/doc/python-freiner/README.rst"
    install -Dm644 CHANGELOG.rst "${pkgdir}/usr/share/doc/python-freiner/CHANGELOG.rst"
    #cp -r docs/build/html "${pkgdir}/usr/share/doc/python-freiner/html"
}