blob: 44701e9e85994061b2905739ef8b742097934fd7 (
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
# $Id$
# Maintainer: Angel Velasquez <angvp@archlinux.org>
# Maintainer: Felix Yan <felixonmars@gmail.com>
pkgbase=python-setuptools
pkgname=('python2-setuptools')
pkgver=3.4.4
pkgrel=1
pkgdesc="Easily download, build, install, upgrade, and uninstall Python packages"
arch=('any')
license=('PSF')
url="http://pypi.python.org/pypi/setuptools"
makedepends=('python2')
checkdepends=('python-pytest' 'python2-pytest')
source=("http://pypi.python.org/packages/source/s/setuptools/setuptools-${pkgver}.tar.gz")
md5sums=('6ca9e8377b65233c2ff3a1752406a22d')
check() {
# Disabled python 3.x tests for setuptools 3.4.1:
# https://bitbucket.org/pypa/setuptools/issue/180/34-release-fails-tests
# Check python3 module
cd "${srcdir}"/setuptools-${pkgver}
#python3 setup.py test
# Check python2 module
cd "${srcdir}"/setuptools-${pkgver}-python2
python2 setup.py test
}
prepare() {
cp -a setuptools-${pkgver}{,-python2}
cd "${srcdir}"/setuptools-${pkgver}
sed -i -e "s|^#\!.*/usr/bin/python|#!/usr/bin/python3|" setuptools/tests/test_resources.py
sed -i -e "s|^#\!.*/usr/bin/env python|#!/usr/bin/env python3|" setuptools/command/easy_install.py
cd "${srcdir}"/setuptools-${pkgver}-python2
sed -i -e "s|^#\!.*/usr/bin/python|#!/usr/bin/python2|" setuptools/tests/test_resources.py
sed -i -e "s|^#\!.*/usr/bin/env python|#!/usr/bin/env python2|" setuptools/command/easy_install.py
}
build() {
# Build python 3 module
#cd "${srcdir}"/setuptools-${pkgver}
#python3 setup.py build
# Build python 2 module
cd "${srcdir}"/setuptools-${pkgver}-python2
python2 setup.py build
}
#package_python-setuptools() {
#depends=('python>=3.4')
#provides=('python-distribute')
#replaces=('python-distribute')
#cd "${srcdir}/setuptools-${pkgver}"
#python3 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
#}
package_python2-setuptools() {
depends=('python2>=2.7')
provides=('python2-distribute' 'setuptools')
replaces=('python2-distribute' 'setuptools')
cd "${srcdir}/setuptools-${pkgver}-python2"
python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
rm "${pkgdir}/usr/bin/easy_install"
}
|