[arch-commits] Commit in python-pypandoc/repos (2 files)
Evangelos Foutras
foutrelis at archlinux.org
Fri Oct 25 16:19:25 UTC 2019
Date: Friday, October 25, 2019 @ 16:19:24
Author: foutrelis
Revision: 519429
archrelease: copy trunk to community-staging-any
Added:
python-pypandoc/repos/community-staging-any/
python-pypandoc/repos/community-staging-any/PKGBUILD
(from rev 519428, python-pypandoc/trunk/PKGBUILD)
----------+
PKGBUILD | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
Copied: python-pypandoc/repos/community-staging-any/PKGBUILD (from rev 519428, python-pypandoc/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2019-10-25 16:19:24 UTC (rev 519429)
@@ -0,0 +1,55 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-pypandoc
+pkgname=('python-pypandoc' 'python2-pypandoc')
+pkgver=1.4
+pkgrel=3
+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