aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-webcolors
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2016-11-12 12:14:32 +0000
committerTimo Teräs <timo.teras@iki.fi>2016-12-27 09:58:07 +0200
commit8d461eb3e3188e9a228f1a8d1ee6250d4cfab993 (patch)
treeb886bca4fe0310fdbe183677960b17c7c2e99d59 /community/py-webcolors
parent707dad413ef80af171244d9c4a0b33422c27dfce (diff)
downloadaports-8d461eb3e3188e9a228f1a8d1ee6250d4cfab993.tar.bz2
aports-8d461eb3e3188e9a228f1a8d1ee6250d4cfab993.tar.xz
testing/py-webcolors: move to community
Diffstat (limited to 'community/py-webcolors')
-rw-r--r--community/py-webcolors/APKBUILD57
1 files changed, 57 insertions, 0 deletions
diff --git a/community/py-webcolors/APKBUILD b/community/py-webcolors/APKBUILD
new file mode 100644
index 0000000000..e1b1ad1bb8
--- /dev/null
+++ b/community/py-webcolors/APKBUILD
@@ -0,0 +1,57 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=py-webcolors
+_pkgname=webcolors
+pkgver=1.5
+pkgrel=0
+pkgdesc="A library for working with color names and color value formats"
+url="https://github.com/ubernostrum/webcolors"
+arch="noarch"
+license="BSD"
+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
+
+prepare() {
+ local i
+ cd "$builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$builddir"
+ python2 setup.py build || return 1
+ python3 setup.py build || return 1
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_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"