[arch-commits] Commit in python-markdown/repos (2 files)
Evangelos Foutras
foutrelis at archlinux.org
Sat Sep 19 16:17:39 UTC 2015
Date: Saturday, September 19, 2015 @ 18:17:38
Author: foutrelis
Revision: 140924
archrelease: copy trunk to community-staging-any
Added:
python-markdown/repos/community-staging-any/
python-markdown/repos/community-staging-any/PKGBUILD
(from rev 140923, python-markdown/trunk/PKGBUILD)
----------+
PKGBUILD | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
Copied: python-markdown/repos/community-staging-any/PKGBUILD (from rev 140923, python-markdown/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2015-09-19 16:17:38 UTC (rev 140924)
@@ -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.2
+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=("http://pypi.python.org/packages/source/M/$_pkgbasename/$_pkgbasename-$pkgver.tar.gz")
+md5sums=('256d19afcc564dc4ce4c229bb762f7ae')
+
+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