upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / python-agate-sql / trunk / PKGBUILD
blob98d2f30c895d444f3c20a3604ac373d17838e751
1 # Maintainer: Caleb Maclennan <caleb@alerque.com>
2 # Contributor: Michał Pałubicki <maln0ir@gmx.com>
4 _pyname=agate-sql
5 pkgname=python-$_pyname
6 pkgver=0.5.9
7 pkgrel=3
8 pkgdesc='Adds SQL read/write support to agate'
9 arch=(any)
10 url="https://$_pyname.readthedocs.org"
11 license=(MIT)
12 _pydeps=(agate
13          sqlalchemy
14          sphinx_rtd_theme)
15 depends=(python
16          "${_pydeps[@]/#/python-}")
17 makedepends=(python-setuptools
18              python-sphinx)
19 checkdepends=(python-crate
20               python-geojson
21               python-pytest)
22 _archive="$_pyname-$pkgver"
23 source=("$_archive.tar.gz::https://github.com/wireservice/$_pyname/archive/$pkgver.tar.gz")
24 sha256sums=('610d6a67b5e6924da72a09d5a9b5eb8aa2f7a66fc986df5bd92605163cb3742f')
26 build() {
27         cd "$_archive"
28         python setup.py build
29         make -C docs html
30         local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
31         rm -rvf docs/_build/html/_static
32         ln -svf "$site_packages/sphinx_rtd_theme/static" docs/_build/html/_static
35 check() {
36         cd "$_archive"
37         pytest tests
40 package() {
41         cd "$_archive"
42         python setup.py install --root="$pkgdir" --optimize=1 --skip-build
43         install -dm0755 "$pkgdir/usr/share/doc/"
44         cp -rv docs/_build/html "$pkgdir/usr/share/doc/$pkgname"
45         install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" COPYING