1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Maintainer: Daniel M. Capella <polyzen@archlinux.org>
5 pkgname=python-sphinx-autoapi
8 pkgdesc="A new approach to API documentation in Sphinx."
10 url="https://github.com/readthedocs/sphinx-autoapi"
12 depends=(python-astroid python-jinja python-sphinx python-unidecode
14 makedepends=(python-build python-installer python-setuptools python-wheel)
15 checkdepends=(python-pytest)
16 # TODO: package python-go and python-dotnet
17 # optdepends=(python-go python-dotnet)
18 source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
19 sha256sums=('5b5c58064214d5a846c9c81d23f00990a64654b9bca10213231db54a241bc50f')
20 b2sums=('3148c01d87a42930bc5cd89569cc58c081aeaf018bc78809ab9134492c42508549d123588bca4333f67c42f130d78ede0747d7754f1e6111473d4a87ad372e80')
24 python -m build --wheel --skip-dependency-check --no-isolation
28 local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
31 # install to temporary location, as importlib is used
32 python -m installer --destdir=test_dir dist/*.whl
33 export PYTHONPATH="test_dir/$site_packages:$PYTHONPATH"
39 python -m installer --destdir="$pkgdir" dist/*.whl
40 install -vDm 644 {CHANGELOG,README}.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
42 # Symlink license file
43 local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
44 install -d "$pkgdir"/usr/share/licenses/$pkgname
45 ln -s "$site_packages"/sphinx_autoapi-$pkgver.dist-info/LICENSE.rst "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.rst