[arch-commits] Commit in python-tinycss/trunk (PKGBUILD)

Caleb Maclennan alerque at gemini.archlinux.org
Tue Jan 18 11:54:14 UTC 2022


    Date: Tuesday, January 18, 2022 @ 11:54:13
  Author: alerque
Revision: 1108612

upgpkg: python-tinycss 0.4-7; adopt, fix reproducability

Modified:
  python-tinycss/trunk/PKGBUILD

----------+
 PKGBUILD |   53 ++++++++++++++++++++++++++---------------------------
 1 file changed, 26 insertions(+), 27 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-01-18 11:53:57 UTC (rev 1108611)
+++ PKGBUILD	2022-01-18 11:54:13 UTC (rev 1108612)
@@ -1,46 +1,45 @@
-# Maintainer: Eli Schwartz <eschwartz at archlinux.org>
+# Maintainer: Caleb Maclennan <caleb at alerque.com>
+# Contributor: Eli Schwartz <eschwartz at archlinux.org>
 # Contributor: Felix Yan <felixonmars at archlinux.org>
 # Contributor: Simon Sapin <simon dot sapin at exyr dot org>
 # Contributor: Kyle Keen <keenerd at gmail.com>
 
 pkgname=python-tinycss
+_pyname=${pkgname#python-}
 pkgver=0.4
-pkgrel=6
-pkgdesc="A complete yet simple CSS parser for Python"
-url="https://pypi.python.org/pypi/tinycss"
-license=('BSD')
-arch=('x86_64')
-depends=('python')
-makedepends=('python-setuptools' 'cython')
-checkdepends=('python-pytest')
-source=("https://pypi.io/packages/source/t/tinycss/tinycss-$pkgver.tar.gz")
+pkgrel=7
+pkgdesc='A complete yet simple CSS parser for Python'
+url="https://pypi.python.org/pypi/${pkgname#python-}"
+license=(BSD)
+arch=(x86_64)
+depends=(python)
+makedepends=(cython
+             python-setuptools)
+checkdepends=(python-pytest)
+_archive="$_pyname-$pkgver"
+source=("https://files.pythonhosted.org/packages/source/${_pyname::1}/$_pyname/$_archive.tar.gz")
 sha256sums=('12306fb50e5e9e7eaeef84b802ed877488ba80e35c672867f548c0924a76716e')
-b2sums=('9b7691f5d5fcfb5580a9f2a0f1f50caea3dba74853917e5e46ca93cab6f35f2f8c4f5babf01d25661d05ef1b26ccc35914750917fb92b394b0ca6530a19f3514')
 
 prepare() {
-    cd "${srcdir}"/tinycss-${pkgver}
-
-    rm tinycss/speedups.c
-    # isort is not a sign of failing code
-    sed -i '/addopts/d' setup.cfg
+	cd "$_archive"
+	rm tinycss/speedups.c
+	# isort is not a sign of failing code
+	sed -i -e '/addopts/d' setup.cfg
 }
 
 build() {
-    cd "${srcdir}"/tinycss-${pkgver}
-
-    python setup.py build
+	cd "$_archive"
+	python setup.py build
 }
 
 check() {
-    cd "${srcdir}"/tinycss-${pkgver}
-
-    pytest build/
-    find build/ -type f -name \*-PYTEST.pyc -delete
+	cd "$_archive"
+	pytest build/
+	# find build/ -type f -name \*-PYTEST.pyc -delete
 }
 
 package() {
-    cd "${srcdir}"/tinycss-${pkgver}
-
-    python setup.py install --root="${pkgdir}" --optimize=1
-    install -D -m644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+	cd "$_archive"
+	python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+	install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
 }



More information about the arch-commits mailing list