1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Maintainer: Caleb Maclennan <caleb@alerque.com>
4 pkgname=python-commonmark
7 pkgdesc='Python parser for the CommonMark Markdown spec'
8 url='https://pypi.org/project/commonmark/'
11 depends=('python-docutils'
13 makedepends=('python-'{build,installer,wheel}
16 'python-sphinx_rtd_theme')
17 checkdepends=('python-hypothesis')
18 options=('!makeflags')
19 source=(${pkgname}-${pkgver}.tar.gz::https://github.com/readthedocs/commonmark.py/archive/${pkgver}.tar.gz)
20 sha256sums=('b5d5be6af35a183c3f915d714b31b61e6918894051114419f9ac0bbb715bf4c6')
21 sha512sums=('a6de0b384247ff79fe326012bd1fc71135e6ae5bc7b6a15d5402969a94f81fdd802f1a9d557c504eb74bfb3fea68f55355a70a6e0112a620cc285cf9039892e4')
24 cd commonmark.py-${pkgver}
26 make -C docs man text SPHINXBUILD=sphinx-build
30 cd commonmark.py-${pkgver}
32 python commonmark/tests/unit_tests.py
33 python -m unittest discover
37 cd commonmark.py-${pkgver}
38 python -m installer -d "${pkgdir}" dist/*.whl
39 install -Dm 644 README.rst CHANGELOG.md -t "${pkgdir}/usr/share/doc/${pkgname}"
40 install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
41 install -Dm 644 docs/_build/text/* -t "${pkgdir}/usr/share/doc/${pkgname}"
42 install -Dm 644 docs/_build/man/commonmark-py.1 "${pkgdir}/usr/share/man/man1/${pkgname}.1"
43 mv "${pkgdir}/usr/bin/cmark"{,-py3}