diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2016-11-07 17:14:01 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2016-12-27 09:58:07 +0200 |
commit | 707dad413ef80af171244d9c4a0b33422c27dfce (patch) | |
tree | 046d8a3f79593c6347e9209c6e879d848e82b545 /testing/py-webcolors | |
parent | 688166185c364431fe5c7e79741648197697f374 (diff) | |
download | aports-707dad413ef80af171244d9c4a0b33422c27dfce.tar.bz2 aports-707dad413ef80af171244d9c4a0b33422c27dfce.tar.xz |
testing/py-webcolors: upgrade to 1.5 and enable py3
Diffstat (limited to 'testing/py-webcolors')
-rw-r--r-- | testing/py-webcolors/APKBUILD | 46 |
1 files changed, 31 insertions, 15 deletions
diff --git a/testing/py-webcolors/APKBUILD b/testing/py-webcolors/APKBUILD index f16cfa4b0f..e1b1ad1bb8 100644 --- a/testing/py-webcolors/APKBUILD +++ b/testing/py-webcolors/APKBUILD @@ -2,23 +2,20 @@ # Maintainer: Fabian Affolter <fabian@affolter-engineering.ch> pkgname=py-webcolors _pkgname=webcolors -pkgver=1.4 +pkgver=1.5 pkgrel=0 pkgdesc="A library for working with color names and color value formats" -url="https://bitbucket.org/ubernostrum/webcolors" +url="https://github.com/ubernostrum/webcolors" arch="noarch" license="BSD" -depends="python2" -depends_dev="" -makedepends="python2-dev py-setuptools" -install="" -subpackages="" +makedepends="python2-dev python3-dev py-setuptools" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" +builddir="$srcdir"/$_pkgname-$pkgver -_builddir="$srcdir"/$_pkgname-$pkgver prepare() { local i - cd "$_builddir" + cd "$builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; @@ -27,15 +24,34 @@ prepare() { } build() { - cd "$_builddir" + cd "$builddir" python2 setup.py build || return 1 + python3 setup.py build || return 1 } package() { - cd "$_builddir" - python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1 + mkdir -p "$pkgdir" } -md5sums="35de9d785b5c04a9cc66a2eae0519254 webcolors-1.4.tar.gz" -sha256sums="304fc95dab2848c7bf64f378356766e692c2f8b4a8b15fa3509544e6412936e8 webcolors-1.4.tar.gz" -sha512sums="c31932c7fb0dba22239737d1f01a78c3942619e00d65339f0af61a3546bb6163efdfc648c9766c7c04b09e67f4e23ebb0182488fcf65474f940358cde47aa8e0 webcolors-1.4.tar.gz" +_py2() { + replaces="$pkgname" + _py python2 +} + +_py3() { + _py python3 +} + +_py() { + local python="$1" + pkgdesc="$pkgdesc (for $python)" + depends="$depends $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" +} + +md5sums="2e9da1bbb7a087c6108e05be64640afb webcolors-1.5.tar.gz" +sha256sums="b3b1c3a41e9c69d1982b76b6531239115519f91cc034a24e975749832dc51b8e webcolors-1.5.tar.gz" +sha512sums="84ce8cbbbdb4523bb146cf379845b549570623411a56651a7f9b9687152b7adc9dc42a3a0f684b55b61fb7a3d51d49d3871100b56725c86a727e3374b53c84b6 webcolors-1.5.tar.gz" |