aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-setuptools/APKBUILD
blob: 53a9fcb356415f0bd857c127fca29cf0a18aa565 (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
# Contributor: Andrew Manison <amanison@anselsystems.com>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-setuptools
_pkgname=${pkgname#py-}
pkgver=39.1.0
pkgrel=0
pkgdesc="A collection of enhancements to the Python distutils"
url="https://pypi.python.org/pypi/setuptools"
arch="noarch"
license="PSF"
depends="python2"
makedepends="python2-dev python3-dev"
provides="py2-setuptools=$pkgver-r$pkgrel"
options="!check" #no testsuite
subpackages="py3-$_pkgname:_py3"
source="$_pkgname-$pkgver.tar.gz::https://github.com/pypa/$_pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

prepare() {
	cd "$builddir"
	python2 bootstrap.py
	python3 bootstrap.py
}

build() {
	cd "$builddir"
	python2 setup.py build
	python3 setup.py build
}

package() {
	cd "$builddir"
	python2 setup.py install --prefix=/usr --root="$pkgdir"
	# we don't provide a non-suffixed easy_install
	rm -f "$pkgdir"/usr/bin/easy_install
}

_py() {
	local python="$1"
	pkgdesc="$pkgdesc (for $python)"
	depends="$python"
	install_if="$pkgname=$pkgver-r$pkgrel $python"

	cd "$builddir"
	$python setup.py install --prefix=/usr --root="$subpkgdir"
	# we don't provide a non-suffixed easy_install
	rm -f "$subpkgdir"/usr/bin/easy_install
}

_py3() {
	replaces="python3"
	_py python3
}


sha512sums="9fa00930a1923782c2f6356bf992410d42b3dd81b5a673e2957eaf8941787fbea324851c5df48e37601641d004ee900c88a1cfa97ef9df374879586a36efa5c6  setuptools-39.1.0.tar.gz"