summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD45
1 files changed, 26 insertions, 19 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 3420d8338e80..e3f0c6ed72ea 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,25 +1,32 @@
-# Maintainer: Dimitris Kiziridis <ragouel at outlook dot com>
-
+_name=charset-normalizer
pkgname=python-charset-normalizer
-pkgver=1.3.4
+pkgver=2.0.4
pkgrel=1
-pkgdesc='Like Chardet. Package for encoding & language detection. Charset detection'
-arch=('any')
-url="https://github.com/Ousret/charset_normalizer"
+pkgdesc="The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet."
+arch=(any)
+url="https://github.com/ousret/charset_normalizer"
license=('MIT')
-provides=('python-charset_normalizer')
-depends=('python'
- 'python-cached-property'
- 'python-prettytable'
- 'python-loguru'
- 'python-dragonmapper'
- 'python-zhon')
+depends=('python')
makedepends=('python-setuptools')
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Ousret/charset_normalizer/archive/${pkgver}.tar.gz")
-sha256sums=('e4c6f8bc03a2cc901de40f922c0fb7c36ef9238e06209febfffb1d54acf59d2c')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/charset-normalizer-2.0.4.tar.gz")
+sha256sums=('f23667ebe1084be45f6ae0538e4a5a865206544097e4e8bbcacf42cd02a348f3')
+
+build() {
+ cd "$srcdir/charset-normalizer-2.0.4"
+ python3 setup.py build
+}
package() {
- cd "charset_normalizer-${pkgver}"
- python setup.py install --root="$pkgdir/" --optimize=1
- install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
-} \ No newline at end of file
+ cd "$srcdir/charset-normalizer-2.0.4"
+ python3 setup.py install --root=$pkgdir --optimize=1 --skip-build
+
+ # make sure we don't install any world-writable or root-readable-only files
+ # we shouldn't need to fix ownership as we extract tarballs as a non-root user
+ # https://github.com/pypa/setuptools/issues/1328
+ # https://github.com/LonamiWebs/Telethon/issues/1605
+ chmod u=rwX,go=rX -R "$pkgdir"
+ # make sure we don't install annoying files
+ local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+ rm -rf "$pkgdir/$_site_packages/tests/"
+}
+