archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-sphinxcontrib-applehelp / trunk / PKGBUILD
blob1e13f4a4f124420b6f71fc84e56636c0f08d5327
1 # Maintainer: Daniel M. Capella <polyzen@archlinux.org>
3 _name=sphinxcontrib-applehelp
4 pkgname=python-sphinxcontrib-applehelp
5 pkgver=1.0.4
6 pkgrel=3
7 pkgdesc='Sphinx extension which outputs Apple help books'
8 arch=('any')
9 url=https://github.com/sphinx-doc/sphinxcontrib-applehelp
10 license=('BSD')
11 makedepends=('python-build' 'python-installer' 'python-setuptools'
12              'python-wheel')
13 checkdepends=('python-pytest' 'python-sphinx')
14 source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
15 sha256sums=('828f867945bbe39817c210a1abfd1bc4895c8b73fcaade56d45357a348a07d7e')
16 b2sums=('02a68ab585ecc8429056aa00c2ac3f0f555857cf649238a8df5cb1d39f1cd9c91d637ef55f2247df311b656e74a961b0418a1c552122b2a88ea160db5f996ee3')
18 build() {
19   cd $_name-$pkgver
20   python -m build --wheel --skip-dependency-check --no-isolation
23 check() {
24   cd $_name-$pkgver
25   pytest
28 package() {
29   cd $_name-$pkgver
30   python -m installer --destdir="$pkgdir" dist/*.whl
32   # Symlink license file
33   local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
34   install -d "$pkgdir"/usr/share/licenses/$pkgname
35   ln -s "$site_packages"/sphinxcontrib_applehelp-$pkgver.dist-info/LICENSE \
36     "$pkgdir"/usr/share/licenses/$pkgname/LICENSE