[arch-commits] Commit in python-cchardet/repos (2 files)

Felix Yan felixonmars at archlinux.org
Sat Jun 30 16:54:35 UTC 2018


    Date: Saturday, June 30, 2018 @ 16:54:35
  Author: felixonmars
Revision: 348588

archrelease: copy trunk to community-staging-x86_64

Added:
  python-cchardet/repos/community-staging-x86_64/
  python-cchardet/repos/community-staging-x86_64/PKGBUILD
    (from rev 348587, python-cchardet/trunk/PKGBUILD)

----------+
 PKGBUILD |   42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

Copied: python-cchardet/repos/community-staging-x86_64/PKGBUILD (from rev 348587, python-cchardet/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2018-06-30 16:54:35 UTC (rev 348588)
@@ -0,0 +1,42 @@
+# $Id$
+# Maintainer: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
+
+pkgname=python-cchardet
+pkgname=(python-cchardet python2-cchardet)
+pkgver=2.1.1
+pkgrel=2
+pkgdesc="Universal encoding detector faster than chardet."
+url="http://pypi.python.org/pypi/cchardet/"
+makedepends=('cython' 'cython2' 'python-setuptools' 'python2-setuptools')
+license=('MIT')
+arch=('x86_64')
+source=(https://files.pythonhosted.org/packages/source/c/cchardet/cchardet-$pkgver.tar.gz)
+sha256sums=('9c9269208b9f8d7446dbd970f6544ce48104096efab0f769ee5918066ba1ee7e')
+
+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_python-cchardet() {
+    depends=(python)
+
+    cd "$srcdir/cchardet-$pkgver"
+    rm -rf build; ln -s ../buildpy3 build
+    python setup.py install --skip-build -O1 --root="$pkgdir"
+}
+
+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"
+    mv "$pkgdir"/usr/bin/cchardetect{,2}
+}



More information about the arch-commits mailing list