[arch-commits] Commit in python-chardet/repos (testing-any testing-any/PKGBUILD)

Felix Yan felixonmars at archlinux.org
Fri Mar 19 20:08:57 UTC 2021


    Date: Friday, March 19, 2021 @ 20:08:57
  Author: felixonmars
Revision: 410336

archrelease: copy trunk to testing-any

Added:
  python-chardet/repos/testing-any/
  python-chardet/repos/testing-any/PKGBUILD
    (from rev 410335, python-chardet/trunk/PKGBUILD)

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

Copied: python-chardet/repos/testing-any/PKGBUILD (from rev 410335, python-chardet/trunk/PKGBUILD)
===================================================================
--- testing-any/PKGBUILD	                        (rev 0)
+++ testing-any/PKGBUILD	2021-03-19 20:08:57 UTC (rev 410336)
@@ -0,0 +1,54 @@
+# Maintainer : Felix Yan <felixonmars at archlinux.org>
+# Contributor: Ionut Biru <ibiru at archlinux.org>
+# Contributor: William Rea <sillywilly at gmail.com>
+
+pkgbase=python-chardet
+pkgname=('python-chardet' 'python2-chardet')
+pkgver=4.0.0
+pkgrel=1
+arch=('any')
+url="https://github.com/chardet/chardet"
+license=('LGPL')
+makedepends=('python-setuptools' 'python2-setuptools')
+checkdepends=('python-pytest' 'python2-pytest')
+source=("https://pypi.io/packages/source/c/chardet/chardet-${pkgver}.tar.gz")
+sha512sums=('ebd7f420e1094445270db993f6373ffe7370419e002b0bb13299dc6c9b0f7c4e77b0f44f871fba6371e6869e7c86728514367db377e3137487a3acf50cb81e96')
+
+prepare() {
+   cp -a chardet-$pkgver{,-py2}
+}
+
+build() {
+   cd "$srcdir"/chardet-$pkgver
+   python setup.py build
+
+   cd "$srcdir"/chardet-$pkgver-py2
+   python2 setup.py build
+}
+
+check() {
+   cd "$srcdir"/chardet-$pkgver
+   python -m pytest
+
+   cd "$srcdir"/chardet-$pkgver-py2
+   python2 -m pytest
+}
+
+package_python-chardet() {
+   depends=('python-setuptools')
+   pkgdesc="Python3 module for character encoding auto-detection"
+
+   cd chardet-$pkgver
+   python setup.py install --root="$pkgdir" --optimize=1
+}
+
+package_python2-chardet() {
+   depends=('python2-setuptools')
+   pkgdesc="Python2 module for character encoding auto-detection"
+
+   cd chardet-$pkgver-py2
+   python2 setup.py install --root="$pkgdir" --optimize=1
+
+   # To avoid file conflict with the python3 version
+   mv "$pkgdir"/usr/bin/chardetect{,-py2}
+}



More information about the arch-commits mailing list