diff options
author | Marcell Meszaros | 2022-06-12 21:35:25 +0200 |
---|---|---|
committer | Marcell Meszaros | 2022-06-12 22:02:18 +0200 |
commit | 885fd04e696e76866f6c86514ca5b07103370f29 (patch) | |
tree | e04b3856091c2aec51e4a83cce209c4b3cf18f87 | |
download | aur-885fd04e696e76866f6c86514ca5b07103370f29.tar.gz |
import python2-chardet 4.0.0-2 from [extra]
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | PKGBUILD | 45 |
3 files changed, 67 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b4170fc2dc7a --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,14 @@ +pkgbase = python2-chardet + pkgdesc = Python 2 module for character encoding auto-detection + pkgver = 4.0.0 + pkgrel = 2 + url = https://pypi.org/project/chardet/ + arch = any + license = LGPL + checkdepends = python2-pytest + makedepends = python2-setuptools + depends = python2 + source = https://pypi.python.org/packages/source/c/chardet/chardet-4.0.0.tar.gz + b2sums = 6a4c49441a9f21215a752fad970820f623f406695ad30518ac2acd423ed1e467cedbcf743fe63e54ce384d426f62aa2f6b0013b086c3efaba28d8d8f976befc9 + +pkgname = python2-chardet diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..33f4e24f5b6e --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +* +!.gitignore +!.SRCINFO +!PKGBUILD +!*.diff +!*.hook +!*.install +!*.patch diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..872b9b8e09b9 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,45 @@ +# Contributor: Marcell Meszaros < marcell.meszaros AT runbox.eu > +# Contributor: Felix Yan <felixonmars@archlinux.org> +# Contributor: Ionut Biru <ibiru@archlinux.org> +# Contributor: William Rea <sillywilly@gmail.com> + +pkgname='python2-chardet' +_name="${pkgname#python2-}" +pkgver=4.0.0 +pkgrel=2 +pkgdesc='Python 2 module for character encoding auto-detection' +arch=('any') +url="https://pypi.org/project/${_name}/" +license=('LGPL') +depends=('python2') +makedepends=('python2-setuptools') +checkdepends=('python2-pytest') +_tarname="${_name}-${pkgver}" +source=("https://pypi.python.org/packages/source/${_name::1}/${_name}/${_tarname}.tar.gz") +b2sums=('6a4c49441a9f21215a752fad970820f623f406695ad30518ac2acd423ed1e467cedbcf743fe63e54ce384d426f62aa2f6b0013b086c3efaba28d8d8f976befc9') + +prepare() { + cd "${_tarname}" + sed -e 's|#![ ]*/usr/bin/python$|#!/usr/bin/python2|' \ + -e 's|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|' \ + -e 's|#![ ]*/bin/env python$|#!/usr/bin/env python2|' \ + -i $(find . -name '*.py') +} + +build() { + cd "${_tarname}" + python2 setup.py build +} + +check() { + cd "${_tarname}" + python2 -m pytest +} + +package() { + cd "${_tarname}" + python2 setup.py install --root="${pkgdir}" --optimize=1 + + # To avoid file conflict with the python3 version + mv "${pkgdir}/usr/bin/chardetect"{,-py2} +} |