Date: Sunday, August 6, 2017 @ 16:54:56
  Author: anthraxx
Revision: 249056

archrelease: copy trunk to community-any

Added:
  python-commonmark/repos/community-any/
  python-commonmark/repos/community-any/PKGBUILD
    (from rev 249055, python-commonmark/trunk/PKGBUILD)

----------+
 PKGBUILD |   64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

Copied: python-commonmark/repos/community-any/PKGBUILD (from rev 249055, 
python-commonmark/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD                              (rev 0)
+++ community-any/PKGBUILD      2017-08-06 16:54:56 UTC (rev 249056)
@@ -0,0 +1,64 @@
+# 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:

Reply via email to