[arch-commits] Commit in (python-smartypants/trunk/PKGBUILD python2-smartypants)
Jiachen Yang
farseerfc at archlinux.org
Fri Jan 6 08:55:40 UTC 2017
Date: Friday, January 6, 2017 @ 08:55:39
Author: farseerfc
Revision: 205707
merge python2-smartypants into python-smartypants
Modified:
python-smartypants/trunk/PKGBUILD
Deleted:
python2-smartypants/
----------+
PKGBUILD | 28 +++++++++++++++++++++++-----
1 file changed, 23 insertions(+), 5 deletions(-)
Modified: python-smartypants/trunk/PKGBUILD
===================================================================
--- python-smartypants/trunk/PKGBUILD 2017-01-06 08:34:42 UTC (rev 205706)
+++ python-smartypants/trunk/PKGBUILD 2017-01-06 08:55:39 UTC (rev 205707)
@@ -2,20 +2,38 @@
# AUR Maintainer: Aetf <aetf at unlimitedcodeworks dot xyz>
# Contributor: carstene1ns <arch carsten-teibes de>
-pkgname=python-smartypants
+pkgbase=python-smartypants
+pkgname=(python-smartypants python2-smartypants)
_pkgname=smartypants
pkgver=2.0.0
-pkgrel=1
+pkgrel=2
pkgdesc="Python with the SmartyPants"
url="https://bitbucket.org/livibetter/smartypants.py"
license=('BSD')
arch=('any')
-depends=('python')
-source=("https://pypi.python.org/packages/09/dd/08848ea21422a585ecd2dd32c032fd8f75f0f8345225b455f3bf9e5a0feb/smartypants-2.0.0.tar.gz#md5=00b9105ac7ee1d53ca50c05dca4d5ad8")
+makedepends=('python' 'python2')
md5sums=('00b9105ac7ee1d53ca50c05dca4d5ad8')
+source=("https://pypi.python.org/packages/09/dd/08848ea21422a585ecd2dd32c032fd8f75f0f8345225b455f3bf9e5a0feb/${_pkgname}-${pkgver}.tar.gz#md5=${md5sums[0]}")
-package() {
+package_python-smartypants() {
+ depends=('python')
+
cd "$srcdir/$_pkgname-$pkgver"
python setup.py install --root="$pkgdir" --optimize=1
install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}
+
+package_python2-smartypants() {
+ depends=('python2')
+
+ cd "$srcdir/$_pkgname-$pkgver"
+ install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
+
+ # python2 fix
+ sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' setup.py
+ sed -i 's|#!/usr/bin/python|#!/usr/bin/env python2|' smartypants{.py,}
+ python2 setup.py install --root="${pkgdir}" -O1
+
+ # Prevent conflict with python-smartypants
+ mv "${pkgdir}/usr/bin/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}2"
+}
More information about the arch-commits
mailing list