[arch-commits] Commit in python-commonmark/repos (2 files)
Felix Yan
felixonmars at archlinux.org
Sun Jul 8 09:06:11 UTC 2018
Date: Sunday, July 8, 2018 @ 09:06:11
Author: felixonmars
Revision: 354701
archrelease: copy trunk to community-staging-any
Added:
python-commonmark/repos/community-staging-any/
python-commonmark/repos/community-staging-any/PKGBUILD
(from rev 354700, python-commonmark/trunk/PKGBUILD)
----------+
PKGBUILD | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
Copied: python-commonmark/repos/community-staging-any/PKGBUILD (from rev 354700, python-commonmark/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2018-07-08 09:06:11 UTC (rev 354701)
@@ -0,0 +1,72 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+
+pkgbase=python-commonmark
+pkgname=('python-commonmark' 'python2-commonmark')
+pkgver=0.7.5
+pkgrel=2
+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' 'python-sphinx'
+ 'python2-setuptools' 'python2-docutils' 'python2-future' 'python2-sphinx')
+checkdepends=('python-hypothesis' 'python2-hypothesis')
+options=('!makeflags')
+source=(${pkgname}-${pkgver}.tar.gz::https://github.com/rtfd/CommonMark-py/archive/${pkgver}.tar.gz)
+sha256sums=('f483150b7b1dde5f7956e47d2345913b453c4390ff2279817520ae94e25c8eee')
+sha512sums=('91c9d0e5770430c12d155e6d4ca5a7dcde3f70e24f0ff362e54436f6a218428f1db7a4177ed7cd152c31f6d1a9a25db51f1b248727d36720fc16635d6dd4edd2')
+
+prepare() {
+ cp -r CommonMark-py-${pkgver}{,-py2}
+}
+
+build() {
+ (cd CommonMark-py-${pkgver}
+ python setup.py build
+ make -C docs man text SPHINXBUILD=sphinx-build
+ )
+ (cd CommonMark-py-${pkgver}-py2
+ python2 setup.py build
+ make -C docs man text SPHINXBUILD=sphinx-build2
+ )
+}
+
+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}" -O1 --skip-build
+ install -Dm 644 README.rst CHANGELOG.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+ install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm 644 docs/_build/text/* -t "${pkgdir}/usr/share/doc/${pkgname}"
+ install -Dm 644 docs/_build/man/commonmark-py.1 "${pkgdir}/usr/share/man/man1/${pkgname}.1"
+ mv "${pkgdir}/usr/bin/cmark"{,-py3}
+}
+
+package_python2-commonmark() {
+ depends=('python2-docutils' 'python2-future')
+
+ cd CommonMark-py-${pkgver}-py2
+ python2 setup.py install --root="${pkgdir}" -O1 --skip-build
+ install -Dm 644 README.rst CHANGELOG.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+ install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm 644 docs/_build/text/* -t "${pkgdir}/usr/share/doc/${pkgname}"
+ install -Dm 644 docs/_build/man/commonmark-py.1 "${pkgdir}/usr/share/man/man1/${pkgname}.1"
+ mv "${pkgdir}/usr/bin/cmark"{,-py2}
+}
+
+# vim: ts=2 sw=2 et:
More information about the arch-commits
mailing list