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

Felix Yan felixonmars at archlinux.org
Fri Oct 25 16:04:05 UTC 2019


    Date: Friday, October 25, 2019 @ 16:04:04
  Author: felixonmars
Revision: 519349

archrelease: copy trunk to community-staging-any

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

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

Copied: python-smartypants/repos/community-staging-any/PKGBUILD (from rev 519348, python-smartypants/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2019-10-25 16:04:04 UTC (rev 519349)
@@ -0,0 +1,40 @@
+# Maintainer: Jiachen Yang <farseerfc at gmail.com>
+# AUR Maintainer: Aetf <aetf at unlimitedcodeworks dot xyz>
+# Contributor: carstene1ns <arch carsten-teibes de>
+
+pkgbase=python-smartypants
+pkgname=(python-smartypants python2-smartypants)
+_pkgname=smartypants
+pkgver=2.0.1
+pkgrel=3
+pkgdesc="Python with the SmartyPants"
+url="https://bitbucket.org/livibetter/smartypants.py"
+license=('BSD')
+arch=('any')
+makedepends=('python' 'python2')
+sha512sums=('d47a866a5478c3520251f87a93a468a5eea10318b24b2e8d4bc918d533b5a5789aa56d3a8d5fb8ccff9572fb63e5b6f2eafc44f93fb57a19e6621ebef5d64d9d')
+source=(
+"https://github.com/leohemsted/${_pkgname}.py/archive/v${pkgver}.tar.gz")
+
+package_python-smartypants() {
+  depends=('python')
+
+  cd "$srcdir/${_pkgname}.py-$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}.py-$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