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

Bartłomiej Piotrowski bpiotrowski at archlinux.org
Sat Dec 24 11:21:24 UTC 2016


    Date: Saturday, December 24, 2016 @ 11:21:24
  Author: bpiotrowski
Revision: 201423

archrelease: copy trunk to community-staging-any

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

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

Copied: python-markdown/repos/community-staging-any/PKGBUILD (from rev 201422, python-markdown/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2016-12-24 11:21:24 UTC (rev 201423)
@@ -0,0 +1,54 @@
+# $Id$
+# Maintainer: Kyle Keen <keenerd at gmail.com>
+# Contributor: Angel Velasquez <angvp at archlinux.org>
+# Contributor: Andrew Antle <andrew dot antle at gmail dot com>
+# Contributor: Thomas Dziedzic < gostrc at gmail >
+# Contributor: Chaiwat Suttipongsakul <cwt at bashell dot com>
+
+pkgbase=python-markdown
+pkgname=('python-markdown' 'python2-markdown')
+_pkgbasename=Markdown
+pkgver=2.6.7
+pkgrel=2
+pkgdesc="Python implementation of John Gruber's Markdown."
+arch=('any')
+url='http://pypi.python.org/pypi/Markdown'
+license=('BSD')
+makedepends=('python' 'python2')
+source=("https://files.pythonhosted.org/packages/source/M/$_pkgbasename/$_pkgbasename-$pkgver.tar.gz")
+md5sums=('a06f1c5d462b32e0e8da014e9eebb0d9')
+
+build() {
+  # bug in 2.4, some DOS line endings slipped in
+  find "$_pkgbasename-$pkgver/" -name '*py' | xargs sed -i 's|\r||g'
+
+  cp -r $_pkgbasename-$pkgver "$srcdir/python2-markdown"
+  cd "$srcdir/python2-markdown"
+  find "$srcdir/python2-markdown" -name '*py' | xargs sed -i 's|#!/usr/bin/env python$|&2|'
+}
+
+package_python-markdown() {
+  depends=('python')
+  cd "$srcdir/$_pkgbasename-$pkgver"
+  python3 setup.py install --root="$pkgdir" --optimize=0
+  install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/python-markdown/LICENSE"
+}
+
+package_python2-markdown() {
+  depends=('python2')
+  cd "$srcdir/python2-markdown"
+  python2 setup.py install --root="$pkgdir" --optimize=0
+  mv "$pkgdir/usr/bin/markdown_py" "$pkgdir/usr/bin/markdown_py2"
+  install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/python2-markdown/LICENSE"
+}
+
+check_python-markdown() {
+  [[ $(python -c "import markdown; print(markdown.version)") == "$pkgver" ]]
+  [[ $(python -c "import markdown; print(markdown.markdown('*test*'))") == "<p><em>test</em></p>" ]]
+}
+
+check_python2-markdown() {
+  [[ $(python2 -c "import markdown; print(markdown.version)") == "$pkgver" ]]
+  [[ $(python2 -c "import markdown; print(markdown.markdown('*test*'))") == "<p><em>test</em></p>" ]]
+}
+



More information about the arch-commits mailing list