Skip to content
Snippets Groups Projects
Commit b3571f2d authored by Levente Polyak's avatar Levente Polyak :rocket:
Browse files

upgpkg: 0.7.4-1

parents
No related branches found
No related tags found
No related merge requests found
PKGBUILD 0 → 100644
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
pkgbase=python-commonmark
pkgname=('python-commonmark' 'python2-commonmark')
pkgver=0.7.4
pkgrel=1
pkgdesc='Python parser for the CommonMark Markdown spec'
url='https://pypi.python.org/pypi/CommonMark'
arch=('any')
license=('BSD')
makedepends=('python-setuptools' 'python-docutils' 'python-future'
'python2-setuptools' 'python2-docutils' 'python2-future')
checkdepends=('python-hypothesis' 'python2-hypothesis')
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/rtfd/CommonMark-py/archive/${pkgver}.tar.gz)
sha256sums=('fe9210e59299a291b0da87c3aecedc5ff50cb9976b0850d72a6eb5151a269478')
sha512sums=('1973bad380197c6e42215077505c91f4a5d485653635683f5b192c806b4366fedb1c67285e716b9632fb3ebd0e1e2e587c5247422c82a936f84ed81d56e342ca')
prepare() {
cp -r CommonMark-py-${pkgver}{,-py2}
}
build() {
(cd CommonMark-py-${pkgver}
python setup.py build
)
(cd CommonMark-py-${pkgver}-py2
python2 setup.py build
)
}
check() {
(cd CommonMark-py-${pkgver}
export PYTHONPATH=.
python CommonMark/tests/unit_tests.py
python setup.py test
)
(cd CommonMark-py-${pkgver}-py2
export PYTHONPATH=.
export PYTHONIOENCODING=UTF-8
python2 CommonMark/tests/unit_tests.py
python2 setup.py test
)
}
package_python-commonmark() {
depends=('python-docutils' 'python-future')
cd CommonMark-py-${pkgver}
python setup.py install --root="${pkgdir}" --skip-build -O1
install -Dm 644 README.rst CHANGELOG.md -t "${pkgdir}/usr/share/doc/${pkgname}"
install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
package_python2-commonmark() {
depends=('python2-docutils' 'python2-future')
cd CommonMark-py-${pkgver}-py2
python2 setup.py install --root="${pkgdir}" --skip-build -O1
install -Dm 644 README.rst CHANGELOG.md -t "${pkgdir}/usr/share/doc/${pkgname}"
install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
mv "${pkgdir}/usr/bin/cmark"{,2}
}
# vim: ts=2 sw=2 et:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment