Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Contributor: Marcell Meszaros < marcell.meszaros AT runbox.eu >
- # Contributor: Felix Yan <[email protected]>
- # Contributor: Ionut Biru <[email protected]>
- # Contributor: William Rea <[email protected]>
- # Contributor: Drommer <[email protected]>
- _pkgname=chardet
- pkgname=python2-chardet
- pkgver=4.0.0
- pkgrel=1
- pkgdesc='Python 2 module for character encoding auto-detection'
- arch=('any')
- url="https://pypi.org/project/chardet"
- license=('LGPL')
- depends=('python2')
- makedepends=('python2-setuptools')
- source=("https://github.com/${_pkgname}/${_pkgname}/archive/refs/tags/${pkgver}.tar.gz")
- sha256sums=('67bbe3eb02691d38831ddf2719c40fe09381bc17f15321946f6cd71dc274e530')
- prepare() {
- cd ${_pkgname}-${pkgver}
- 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 ${_pkgname}-${pkgver}
- python2 setup.py build
- }
- package() {
- cd ${_pkgname}-${pkgver}
- python2 setup.py install --root="${pkgdir}" --optimize=1
- # To avoid file conflict with the python3 version
- mv "${pkgdir}/usr/bin/chardetect"{,-py2}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement