summaryrefslogtreecommitdiffstats
path: root/abs/core/python_modules/python-distribute/PKGBUILD
blob: 5627eb7d87beccd504584fc86a2bbe51e5d6c3c3 (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
48
49
50
51
52
53
54
# $Id: PKGBUILD 159385 2012-05-22 22:16:56Z stephane $
# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: Sebastien Binet <binet@farnsworth>
pkgbase=python-distribute
pkgname=('python2-distribute')
pkgver=0.6.27
pkgrel=1
pkgdesc="Easily build and distribute Python packages"
arch=('any')
license=('PSF')
url="http://pypi.python.org/pypi/distribute"
makedepends=('python2')
source=(http://pypi.python.org/packages/source/d/distribute/distribute-${pkgver}.tar.gz
        distribute-python2_and_3.patch)
sha1sums=('cebaaf91938581cb8c4a2f708f2b3e770232d3a5'
          '9c19c12edac507b0f76696d282b9831c4b653a7e')
build() {
   cd "${srcdir}"

   pushd distribute-${pkgver}
   patch -Np1 -i ../distribute-python2_and_3.patch
   popd

   cp -a distribute-${pkgver}{,-python2}

   ## Build python 3 module
   cd distribute-${pkgver}
 #  python setup.py build
#   python setup.py test

   # Build python 2 module
   cd ../distribute-${pkgver}-python2

   sed -i -e "s|^#\!.*/usr/bin/python|#!/usr/bin/python2|" setuptools/tests/test_resources.py

   python2 setup.py build
#   python2 setup.py test
}

package_python-distribute() {
 #  depends=('python>=3.2')

   cd "${srcdir}/distribute-${pkgver}"
   python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
}

package_python2-distribute() {
   depends=('python2>=2.7')
   provides=('setuptools')
   conflicts=('setuptools')

   cd "${srcdir}/distribute-${pkgver}-python2"
   python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
}