summaryrefslogtreecommitdiff
path: root/pcr/python2-pylons/PKGBUILD
blob: 7357b183aab91c4c1c933ddca94c18f6c9c27b13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>

_pkgname=Pylons
pkgname=(python2-${_pkgname,,})
pkgver=1.0.3
pkgrel=1
pkgdesc='A lightweight web framework emphasizing flexibility and rapid development.'
arch=(any)
url='http://pylonsproject.com/'
license=('BSD')

_depends=(routes webhelpers beaker paste paste-deploy paste-script formencode
          simplejson decorator nose mako webob weborror webtest tempita)
makedepends=(python{,2}-setuptools)
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
sha256sums=('49291401cef1bea680499dd5e3b5906cfdfe52d65f6f396f6f6b90842ff70da8')

_package() {
  depends=("$1" "${_depends[@]/#/$1-}")
  cd "$srcdir"/$_pkgname-$pkgver
  $1 setup.py install --root="$pkgdir"

  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
  sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
         -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
    $(find "$pkgdir" -name '*.py')
}

for _pkg in "${pkgname[@]}"; do
  eval "package_$_pkg () { _package ${_pkg%%-*}; }"
done