summaryrefslogtreecommitdiff
path: root/community/python-tornado/PKGBUILD
blob: 42c463e588f0da1e9c8491c00db7a470854290bc (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# $Id: PKGBUILD 104290 2014-01-17 07:31:27Z fyan $
# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: Thomas Dziedzic < gostrc at gmail >

pkgname=('python-tornado' 'python2-tornado')
pkgver=3.2.0
pkgrel=1
pkgdesc='open source version of the scalable, non-blocking web server and tools'
arch=('i686' 'x86_64')
url='http://www.tornadoweb.org/'
license=('Apache')
makedepends=('python-setuptools' 'python2-setuptools' 'python2-backports.ssl_match_hostname')
source=("https://github.com/facebook/tornado/archive/v${pkgver}.tar.gz")

build() {
  cd "$srcdir"
  cp -r tornado-${pkgver} python2-tornado-${pkgver}

  cd tornado-${pkgver}

  python setup.py build

  cd ../python2-tornado-${pkgver}

  # python -> python2 rename
  find -name '*py' -exec sed -e 's_#!/usr/bin/env python_&2_' -i {} \;

  python2 setup.py build
}

package_python-tornado() {
  depends=('python')

  cd "$srcdir/tornado-${pkgver}"

  python setup.py install --root="${pkgdir}" --optimize=1
}

package_python2-tornado() {
  depends=('python2' 'python2-backports.ssl_match_hostname')

  cd "$srcdir/python2-tornado-${pkgver}"

  python2 setup.py install --root="${pkgdir}" --optimize=1
}

sha512sums=('1703178be34060a6c36e9e0aa742b87ad905dfb0f565e43a1158edfe5c7800fe35aff9168b60aabd3b831b339af6ef95aaa144a9fb167c5d93f548eb59fc2557')