[arch-commits] Commit in python-pypandoc/repos (2 files)

Felix Yan felixonmars at archlinux.org
Fri Jul 13 21:01:36 UTC 2018


    Date: Friday, July 13, 2018 @ 21:01:36
  Author: felixonmars
Revision: 358828

archrelease: copy trunk to community-staging-any

Added:
  python-pypandoc/repos/community-staging-any/
  python-pypandoc/repos/community-staging-any/PKGBUILD
    (from rev 358827, python-pypandoc/trunk/PKGBUILD)

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

Copied: python-pypandoc/repos/community-staging-any/PKGBUILD (from rev 358827, python-pypandoc/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2018-07-13 21:01:36 UTC (rev 358828)
@@ -0,0 +1,56 @@
+# $Id: PKGBUILD 141139 2015-09-20 03:14:59Z fyan $
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-pypandoc
+pkgname=('python-pypandoc' 'python2-pypandoc')
+pkgver=1.4
+pkgrel=2
+pkgdesc="Thin wrapper for pandoc"
+arch=('any')
+license=('MIT')
+url="https://github.com/bebraw/pypandoc"
+makedepends=('python-setuptools' 'python2-setuptools' 'pandoc')
+checkdepends=('texlive-core' 'texlive-latexextra' 'pandoc-citeproc')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/bebraw/pypandoc/archive/$pkgver.tar.gz")
+sha512sums=('e6210c8b63758d09b12f1cef2e755ae70befa2b5cd66034d9981217b2fa684b90bf6b6edc46968abcb775721a0b32467c924866be743dde74fe77a20b94453d5')
+
+prepare() {
+  # We don't really need pip and wheel at runtime
+  sed -i "s/install_requires = .*/install_requires = ['setuptools'],/" pypandoc-$pkgver/setup.py
+
+  cp -a pypandoc-$pkgver{,-py2}
+}
+
+build() {
+  cd "$srcdir"/pypandoc-$pkgver
+  python setup.py build
+
+  cd "$srcdir"/pypandoc-$pkgver-py2
+  python2 setup.py build
+}
+
+check() {
+  # https://github.com/bebraw/pypandoc/issues/163
+
+  cd "$srcdir"/pypandoc-$pkgver
+  LC_CTYPE=en_US.UTF-8 python setup.py test || warning "Tests failed"
+
+  cd "$srcdir"/pypandoc-$pkgver-py2
+  python2 setup.py test || warning "Tests failed"
+}
+
+package_python-pypandoc() {
+  depends=('python-setuptools' 'pandoc')
+
+  cd pypandoc-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1
+  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python2-pypandoc() {
+  depends=('python2-setuptools' 'pandoc')
+
+  cd pypandoc-$pkgver-py2
+  python2 setup.py install --root="$pkgdir" --optimize=1
+  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}



More information about the arch-commits mailing list