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

Evangelos Foutras foutrelis at archlinux.org
Sat Sep 19 16:18:01 UTC 2015


    Date: Saturday, September 19, 2015 @ 18:18:00
  Author: foutrelis
Revision: 140926

archrelease: copy trunk to community-staging-any

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

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

Copied: python-uritemplate/repos/community-staging-any/PKGBUILD (from rev 140925, python-uritemplate/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2015-09-19 16:18:00 UTC (rev 140926)
@@ -0,0 +1,52 @@
+# $Id$
+# Maintainer: Andrzej Giniewicz <gginiu at gmail.com>
+
+pkgbase=python-uritemplate
+pkgname=('python2-uritemplate' 'python-uritemplate')
+pkgver=0.6
+pkgrel=2
+pkgdesc="a Python implementation of RFC6570"
+arch=('any')
+url="https://github.com/uri-templates/uritemplate-py/"
+license=('Apache')
+makedepends=('python2-setuptools' 'python-setuptools')
+source=("https://pypi.python.org/packages/source/u/uritemplate/uritemplate-${pkgver}.tar.gz")
+md5sums=('ecfc1ea8d62c7f2b47aad625afae6173')
+
+prepare() {
+  cd "$srcdir"
+  cp -a uritemplate-${pkgver} uritemplate-py2-${pkgver}
+  cd uritemplate-py2-${pkgver}
+
+  sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
+      -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
+      -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \
+      -i $(find . -name '*.py')
+}
+
+build() {
+  msg "Building Python2"
+  cd "$srcdir"/uritemplate-py2-${pkgver}
+  python2 setup.py build
+
+  msg "Building Python3"
+  cd "$srcdir"/uritemplate-${pkgver}
+  python setup.py build
+}
+
+package_python2-uritemplate() {
+  depends=('python2')
+
+  cd "$srcdir"/uritemplate-py2-${pkgver}
+
+  python2 setup.py install --skip-build --root="$pkgdir" --optimize=1
+}
+
+package_python-uritemplate() {
+  depends=('python')
+
+  cd "$srcdir"/uritemplate-${pkgver}
+
+  python setup.py install --skip-build --root="$pkgdir" --optimize=1
+}
+



More information about the arch-commits mailing list