summaryrefslogtreecommitdiff
path: root/community/python-cchardet
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-07-19 01:10:32 -0700
committerroot <root@rshg054.dnsready.net>2013-07-19 01:10:32 -0700
commit8fbc0076a4827ddc6af92e0b9daa4c4c31450808 (patch)
tree03fd0e2921ebd53228d9a93e32ed3976b636cbea /community/python-cchardet
parente445a313723389ba9ee1fded025c567dae5b21ea (diff)
Fri Jul 19 01:09:18 PDT 2013
Diffstat (limited to 'community/python-cchardet')
-rw-r--r--community/python-cchardet/PKGBUILD51
1 files changed, 51 insertions, 0 deletions
diff --git a/community/python-cchardet/PKGBUILD b/community/python-cchardet/PKGBUILD
new file mode 100644
index 000000000..839d69e74
--- /dev/null
+++ b/community/python-cchardet/PKGBUILD
@@ -0,0 +1,51 @@
+# $Id: PKGBUILD 90632 2013-05-13 12:37:47Z mtorromeo $
+# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
+
+pkgname=python-cchardet
+pkgname=(python-cchardet python2-cchardet)
+pkgver=0.3.3
+pkgrel=1
+pkgdesc="Universal encoding detector faster than chardet."
+url="http://pypi.python.org/pypi/cchardet/"
+makedepends=('cython' 'cython2' 'python-distribute' 'python2-distribute')
+license=('MIT')
+arch=('i686' 'x86_64')
+source=(http://pypi.python.org/packages/source/c/cchardet/cchardet-$pkgver.tar.gz)
+
+build() {
+ cd "$srcdir/cchardet-$pkgver"
+
+ rm -rf ../buildpy3; mkdir ../buildpy3
+ python setup.py build -b ../buildpy3
+
+ rm -rf ../buildpy2; mkdir ../buildpy2
+ python2 setup.py build -b ../buildpy2
+ find ../buildpy2 -name \*.py -exec sed -r 's|^#!(.*)python$|#!\1python2|' -i {} +
+}
+
+package() {
+ cd "$srcdir/cchardet-$pkgver"
+ python setup.py install --root="$pkgdir"
+ install -m0644 -D "README.rst" "$pkgdir/usr/share/licenses/$pkgname/README.rst"
+}
+
+package_python-cchardet() {
+ depends=(python)
+
+
+ cd "$srcdir/cchardet-$pkgver"
+ rm -rf build; ln -s ../buildpy3 build
+ python setup.py install --skip-build -O1 --root="$pkgdir"
+ install -m0644 -D "README.rst" "$pkgdir/usr/share/licenses/$pkgname/README.rst"
+}
+
+package_python2-cchardet() {
+ depends=(python2)
+
+ cd "$srcdir/cchardet-$pkgver"
+ rm -rf build; ln -s ../buildpy2 build
+ python2 setup.py install --skip-build -O1 --root="$pkgdir"
+ install -m0644 -D "README.rst" "$pkgdir/usr/share/licenses/$pkgname/README.rst"
+}
+
+sha256sums=('f326245fa9dc1541a3251cbae66ce2fa8d94969a6f6dfb2800e3beb3636cd2b8')