aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-setuptools/APKBUILD
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2017-12-19 12:56:46 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2017-12-23 12:07:29 +0000
commitcb4892511d8e2b19aa36f1981b01f6981b541af2 (patch)
tree4cb00215be3867f056225858834dde7c63036d94 /main/py-setuptools/APKBUILD
parent5d7e79610d9197186196afe75bbf7bb64af72d05 (diff)
downloadaports-cb4892511d8e2b19aa36f1981b01f6981b541af2.tar.gz
aports-cb4892511d8e2b19aa36f1981b01f6981b541af2.tar.bz2
aports-cb4892511d8e2b19aa36f1981b01f6981b541af2.tar.xz
main/py-setuptools: upgrade to 38.2.4, add support for python3
Atm python3 already includes setuptools-28.x. py3-setuptools is meant only for python3 packages needing setuptools > 28.x.
Diffstat (limited to 'main/py-setuptools/APKBUILD')
-rw-r--r--main/py-setuptools/APKBUILD46
1 files changed, 35 insertions, 11 deletions
diff --git a/main/py-setuptools/APKBUILD b/main/py-setuptools/APKBUILD
index 79d7be9bd3..1bfd725352 100644
--- a/main/py-setuptools/APKBUILD
+++ b/main/py-setuptools/APKBUILD
@@ -2,15 +2,16 @@
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-setuptools
_pkgname=${pkgname#py-}
-pkgver=33.1.1
-pkgrel=1
+pkgver=38.2.4
+pkgrel=0
pkgdesc="A collection of enhancements to the Python distutils"
url="https://pypi.python.org/pypi/setuptools"
arch="noarch"
license="PSF"
-provides="py2-setuptools=$pkgver-r$pkgrel"
-depends="python2"
-makedepends="python2-dev"
+depends=""
+makedepends="python2-dev python3-dev"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+options="!check" #no testsuite
source="$_pkgname-$pkgver.tar.gz::https://github.com/pypa/$_pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
@@ -18,17 +19,40 @@ build() {
cd "$builddir"
python2 bootstrap.py
python2 setup.py build
+ python3 bootstrap.py
+ python3 setup.py build
}
package() {
cd "$builddir"
+ mkdir -p "$pkgdir"/usr/bin
+}
+
+_py2() {
+ replaces=$pkgname
+ provides="$pkgname-$pkgver-r$pkgrel"
+ _py python2
+}
- python2 setup.py install --prefix=/usr --root="$pkgdir"
+_py3() {
+ replaces="python3"
+ _py python3
+}
+
+_py() {
+ local python="$1"
+ local pyver="${1:6:1}"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$depends $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
- # we don't provide a non-suffixed easy_install
- rm -f "$pkgdir"/usr/bin/easy_install
+ cd "$builddir"
+ $python setup.py --quiet install --prefix=/usr --root="$subpkgdir"
+ #Add version suffix to executable files.
+ local path; for path in "$subpkgdir"/usr/bin/*; do
+ mv -f "$path" "${path%%}"
+ mv -f "${path%%}" "${path%%}-$pyver"
+ done
}
-md5sums="6f325e870730cd90f3ac9608cdf6a82f setuptools-33.1.1.tar.gz"
-sha256sums="a1ceebce3a0e2c6676ab03d6222a3f3cb403a392acb9e3919da5d1e1bbc447a4 setuptools-33.1.1.tar.gz"
-sha512sums="4cc73881162be28b70cd9abe01bafc676b491608e5d22dd6b688043291eb42f7b1c6cb17d1e0c65a1f88e3896688991d446048e330426bcf3247baecc2eb1d06 setuptools-33.1.1.tar.gz"
+sha512sums="f06badd27f0b797482bf42314edb7ffde7fa80556825b0ef27b125a3fc876b9d2ec26bf2b540f88b39f52fb58536e762c5bef24d9a92115b5f5decdf01f00c6c setuptools-38.2.4.tar.gz"