aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-magic
diff options
context:
space:
mode:
authorStuart Cardall <developer@it-offshore.co.uk>2016-09-08 19:45:53 +0000
committerJakub Jirutka <jakub@jirutka.cz>2016-09-21 12:14:32 +0200
commitfebfba2695645c8b0c49f23e9ea59aac5bf405e9 (patch)
tree439bfc0973528e33f733a8ca5559659bea8e2030 /community/py-magic
parentcc30e48f2395b7893ffd566af92c1354494a1060 (diff)
downloadaports-febfba2695645c8b0c49f23e9ea59aac5bf405e9.tar.bz2
aports-febfba2695645c8b0c49f23e9ea59aac5bf405e9.tar.xz
community/py-magic: new aport
https://pypi.python.org/pypi/python-magic/ A python wrapper for libmagic
Diffstat (limited to 'community/py-magic')
-rw-r--r--community/py-magic/APKBUILD48
1 files changed, 48 insertions, 0 deletions
diff --git a/community/py-magic/APKBUILD b/community/py-magic/APKBUILD
new file mode 100644
index 0000000000..4120a61755
--- /dev/null
+++ b/community/py-magic/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
+# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
+pkgname=py-magic
+_pkgname=${pkgname/py/python}
+pkgver=0.4.12
+pkgrel=0
+pkgdesc="A python wrapper for libmagic"
+url="https://pypi.python.org/pypi/python-magic/"
+arch="noarch"
+license="MIT"
+depends=""
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
+source="$pkgname-$pkgver.tar.gz::https://github.com/ahupp/$_pkgname/archive/$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+ python2 setup.py build || return 1
+ python3 setup.py build || return 1
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_py() {
+ local python=$1
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$python libmagic"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+_py2() {
+ replaces="$pkgname"
+ _py python2
+}
+
+_py3() {
+ _py python3
+}
+
+md5sums="b0c173bd9904db97c5b3ebd9396b9cf4 py-magic-0.4.12.tar.gz"
+sha256sums="cbfd4d1a8145e2b67663127f961df1c642e7dc7e15251d3b864811f68d7bb23d py-magic-0.4.12.tar.gz"
+sha512sums="bd87f90cbabb8124892fb3ed4e9c992d067cc88dc45c9e069af7aa42f3d531c4bf051232242f69ad15e24de10e6c34e8d2b8de48ceb1d8c54de49086072afc9a py-magic-0.4.12.tar.gz"