[arch-commits] Commit in python-uritemplate/repos (2 files)
Bartłomiej Piotrowski
bpiotrowski at archlinux.org
Sun Dec 25 16:46:53 UTC 2016
Date: Sunday, December 25, 2016 @ 16:46:52
Author: bpiotrowski
Revision: 201959
archrelease: copy trunk to community-staging-any
Added:
python-uritemplate/repos/community-staging-any/
python-uritemplate/repos/community-staging-any/PKGBUILD
(from rev 201958, python-uritemplate/trunk/PKGBUILD)
----------+
PKGBUILD | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
Copied: python-uritemplate/repos/community-staging-any/PKGBUILD (from rev 201958, python-uritemplate/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2016-12-25 16:46:52 UTC (rev 201959)
@@ -0,0 +1,57 @@
+# $Id$
+# Maintainer: Andrzej Giniewicz <gginiu at gmail.com>
+
+pkgbase=python-uritemplate
+pkgname=('python2-uritemplate' 'python-uritemplate')
+pkgver=3.0.0
+pkgrel=2
+pkgdesc="a Python implementation of RFC6570"
+arch=('any')
+url="http://uritemplate.rtfd.org/"
+license=('Apache' 'BSD')
+makedepends=('python2-setuptools' 'python-setuptools')
+source=("https://github.com/sigmavirus24/uritemplate/archive/${pkgver}.tar.gz")
+md5sums=('e4c7f960a3e768b094e98c2c4cf77371')
+
+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' | grep -v old)
+}
+
+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
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+ install -Dm644 LICENSE.APACHE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.APACHE
+ install -Dm644 LICENSE.BSD "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.BSD
+}
+
+package_python-uritemplate() {
+ depends=('python')
+
+ cd "$srcdir"/uritemplate-${pkgver}
+
+ python setup.py install --skip-build --root="$pkgdir" --optimize=1
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+ install -Dm644 LICENSE.APACHE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.APACHE
+ install -Dm644 LICENSE.BSD "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.BSD
+}
More information about the arch-commits
mailing list