diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2019-04-01 20:14:22 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2019-04-01 21:05:08 -0400 |
commit | 7954b0741996a9997e753041fb2b065fe3ecbc6b (patch) | |
tree | e677b632583dcbe474bf80c88a2435473ca4ec6a /libre/python-markdown2 | |
parent | c46b33f57bc0d686b1a0d5822da0caa8ad378d05 (diff) | |
download | abslibre-7954b0741996a9997e753041fb2b065fe3ecbc6b.tar.gz abslibre-7954b0741996a9997e753041fb2b065fe3ecbc6b.tar.bz2 abslibre-7954b0741996a9997e753041fb2b065fe3ecbc6b.zip |
Import old versions of parabolaweb dependencies from Arch to [libre]
package version next revision
-----------------------------------------------------------------------------------------------------------------------------------------
community/python-markdown 2.6.11-1 → 3.0-1 git-svn-id: file:///srv/repos/svn-community/svn@349084 9fca08f4-af9d-4005-b8df-a31f2cc04f65
community/python-psycopg2 2.6.2-2 → 2.7-1 git-svn-id: file:///srv/repos/svn-community/svn@201380 9fca08f4-af9d-4005-b8df-a31f2cc04f65
community/python2-memcached 1.54-2 → 1.57-1 git-svn-id: file:///srv/repos/svn-community/svn@133225 9fca08f4-af9d-4005-b8df-a31f2cc04f65
packages/django 1.8.7 -1 → 1.9-1 git-svn-id: file:///srv/repos/svn-packages/svn@252064 eb2447ed-0c53-47e4-bac8-5bc4a241df78
packages/python-markupsafe 0.24-4 → 1.0-1 git-svn-id: file:///srv/repos/svn-packages/svn@284569 eb2447ed-0c53-47e4-bac8-5bc4a241df78
Diffstat (limited to 'libre/python-markdown2')
-rw-r--r-- | libre/python-markdown2/PKGBUILD | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/libre/python-markdown2/PKGBUILD b/libre/python-markdown2/PKGBUILD new file mode 100644 index 000000000..cf326ca5a --- /dev/null +++ b/libre/python-markdown2/PKGBUILD @@ -0,0 +1,55 @@ +# $Id$ +# Maintainer: Kyle Keen <keenerd@gmail.com> +# Contributor: Angel Velasquez <angvp@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.11 +pkgrel=2 +pkgdesc="Python implementation of John Gruber's Markdown." +arch=('any') +url='http://pypi.python.org/pypi/Markdown' +license=('BSD') +depends=('python') +makedepends=('python' 'python2' 'python-setuptools' 'python2-setuptools') +source=("https://files.pythonhosted.org/packages/source/M/$_pkgbasename/$_pkgbasename-$pkgver.tar.gz") +md5sums=('a67c1b2914f7d74eeede2ebe0fdae470') + +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>" ]] +} + |