updated on Wed Jan 25 00:20:47 UTC 2012
[aur-mirror.git] / python-poster / PKGBUILD
blob4235e4a15d75d401c4efad503439b90ad4630a61
1 # Maintainer: Thomas Jost <schnouki@schnouki.net>
2 pkgname=python-poster
3 pkgver=0.7.0
4 pkgrel=1
5 pkgdesc="A set of classes and functions to faciliate making HTTP POST (or PUT) requests using the standard multipart/form-data encoding in Python with urllib2"
6 arch=(any)
7 url="http://atlee.ca/software/poster/"
8 license=('MIT')
9 depends=('python2')
10 makedepends=('setuptools')
11 source=(http://atlee.ca/software/poster/dist/$pkgver/poster-$pkgver.tar.gz)
12 md5sums=('b403b607a745e1f22d26cba914c20a1d')
14 build() {
15   cd "$srcdir/poster-$pkgver"
16   python2 setup.py build
19 package() {
20   cd "$srcdir/poster-$pkgver"
21   python2 setup.py install --root="$pkgdir"
23   # Patch to use python2
24   find $pkgdir -type f \( -name '*.py' -or -executable \) -exec \
25     sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
26            -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
27     \{\} +