1 # Maintainer: Daniel M. Capella <polyzen@archlinux.org>
3 _name=sphinxcontrib-jsmath
4 pkgname=python-sphinxcontrib-jsmath
7 pkgdesc='Sphinx extension which renders display math in HTML via JavaScript'
9 url=https://github.com/sphinx-doc/sphinxcontrib-jsmath
11 makedepends=('python-build' 'python-installer' 'python-setuptools'
13 checkdepends=('python-pytest' 'python-sphinx')
14 source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz"
15 'jsmath-read_text.patch::https://github.com/sphinx-doc/sphinxcontrib-jsmath/commit/3297b27177ab4862d1b2408a2db66235397fe212.patch')
16 sha256sums=('a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8'
17 '697764efeaa1a6ef234d516a4a6b3fde0c77197a89eaae3246daf8b3ad1f12df')
18 b2sums=('055ff298e11678d7d30975e4bef509ece0128be30ca0c5fd2be1323c2eb4fe92f861826ea5ddfcbd2d3e3a80535b374d2b1a13446c2604f3e448d5a8982b9881'
19 '028e21e345de13f86e11bd5e7b5bd80c1add25b50321c983db3c61ebf5de9c776750fc763584abab0485a6e5e470b19dcbdbd1a068be35ddd18e4b4285fe569a')
23 # https://github.com/sphinx-doc/sphinxcontrib-jsmath/pull/10
24 patch --forward --strip=1 --input=../jsmath-read_text.patch
29 python -m build --wheel --skip-dependency-check --no-isolation
39 python -m installer --destdir="$pkgdir" dist/*.whl
41 # Symlink license file
42 local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
43 install -d "$pkgdir"/usr/share/licenses/$pkgname
44 ln -s "$site_packages"/sphinxcontrib_jsmath-$pkgver.dist-info/LICENSE \
45 "$pkgdir"/usr/share/licenses/$pkgname/LICENSE