aboutsummaryrefslogtreecommitdiffstats
path: root/main/py3-setuptools/APKBUILD
blob: c9866eb68737dd969c00c8bfa8ac2a0e1fdecb2e (plain) (blame)
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
# Contributor: Andrew Manison <amanison@anselsystems.com>
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=py3-setuptools
_pkgname=${pkgname#py3-}
pkgver=45.2.0
pkgrel=0
pkgdesc="Collection of enhancements to the Python3 distutils"
options="!check" # Tests require packages out of main/
url="https://pypi.python.org/pypi/setuptools"
arch="noarch"
license="MIT"
depends="python3"
source="$_pkgname-$pkgver.tar.gz::https://github.com/pypa/$_pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

provides="py-setuptools=$pkgver-r$pkgrel" # Backwards compatibility
replaces="py-setuptools" # Backwards compatiblity

export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=0

prepare() {
	default_prepare

	# Fix post-release tag
	sed -e '/tag_build = .post/d' \
		-e '/tag_date = 1/d' \
		-i setup.cfg

	# Fix shebang
	sed -i -e "s|^#\!.*/usr/bin/env python|#!/usr/bin/env python3|" setuptools/command/easy_install.py

	python3 bootstrap.py
}

build() {
	python3 setup.py build
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
	# we don't provide a non-suffixed easy_install
	rm -f "$pkgdir"/usr/bin/easy_install
}
sha512sums="68a2b600e67dfd1ba25efadd852ed99fff3073ee73959b183ffd8b5c44935628a9eff2f56ac921f4d8d903a389f167ddc2295f031b9b0f7fa9f91970516e4658  setuptools-45.2.0.tar.gz"