[arch-commits] Commit in python-rjsmin/repos/community-x86_64 (PKGBUILD PKGBUILD)

David Runge dvzrv at gemini.archlinux.org
Sun Jul 31 16:56:19 UTC 2022


    Date: Sunday, July 31, 2022 @ 16:56:19
  Author: dvzrv
Revision: 1259348

archrelease: copy trunk to community-x86_64

Added:
  python-rjsmin/repos/community-x86_64/PKGBUILD
    (from rev 1259347, python-rjsmin/trunk/PKGBUILD)
Deleted:
  python-rjsmin/repos/community-x86_64/PKGBUILD

----------+
 PKGBUILD |   71 +++++++++++++++++++++++++++++++------------------------------
 1 file changed, 37 insertions(+), 34 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2022-07-31 16:55:48 UTC (rev 1259347)
+++ PKGBUILD	2022-07-31 16:56:19 UTC (rev 1259348)
@@ -1,34 +0,0 @@
-# Maintainer: David Runge <dvzrv at archlinux.org>
-
-_name=rjsmin
-pkgname=python-rjsmin
-pkgver=1.2.0
-pkgrel=3
-pkgdesc="Fast javascript minifier for Python"
-arch=('x86_64')
-url="https://github.com/ndparker/rjsmin"
-license=('Apache')
-depends=('python')
-makedepends=('python-setuptools')
-checkdepends=('python-pytest')
-source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
-sha512sums=('5645a35c75d215ca925f6595d6d1e1833551ec8eabd620b3874ad78bfa7edbacd692a8f6d4ca006aa4b9acee4371dfc4ad5213c9e895a32cbd67b986fe642df3')
-b2sums=('daf2e42ee4244b04f439fb0dc9301f5bb10bfbe853cc18f206858a7cf9f9d6f7382975e14bea5ac22c3cb533ca38f26e1bf7a21d04a1ebd46457f4b6cf2a3fa2')
-
-build() {
-  cd "${_name}-$pkgver"
-  python setup.py build
-}
-
-check() {
-  cd "${_name}-$pkgver"
-  local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
-  export PYTHONPATH="build/lib.linux-${CARCH}-${python_version}/:${PYTHONPATH}"
-  pytest -vv
-}
-
-package() {
-  cd "${_name}-$pkgver"
-  python setup.py install --optimize=1 --root="${pkgdir}"
-  install -vDm 644 {docs/{CHANGES,DESCRIPTION},README.md} -t "${pkgdir}/usr/share/doc/${pkgname}"
-}

Copied: python-rjsmin/repos/community-x86_64/PKGBUILD (from rev 1259347, python-rjsmin/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2022-07-31 16:56:19 UTC (rev 1259348)
@@ -0,0 +1,37 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+_name=rjsmin
+pkgname=python-rjsmin
+pkgver=1.2.1
+pkgrel=1
+pkgdesc="Fast javascript minifier for Python"
+arch=(x86_64)
+url="https://github.com/ndparker/rjsmin"
+license=(Apache)
+depends=(python)
+makedepends=(python-build python-installer python-setuptools python-wheel)
+checkdepends=(python-pytest)
+source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
+sha512sums=('14920b368c287f53b3d5b5f41c43f8cdcd4d5aff9ec824c33870a62fb0641a1850963a2c5fa0bab777ce094090c507f6dbe11ca3090cc6861c7c6f5d7e30fa96')
+b2sums=('2ed9275edd15b66a4fd5cfb13f916506ed0686a32ac15cc7763e67a8af6f4d6d93b037fb0cbf0e87858af3dcda71c51e1fdf6531e828a47ccb0ad51896c20f93')
+
+build() {
+  cd $_name-$pkgver
+  python -m build --wheel --no-isolation
+}
+
+check() {
+  local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+
+  cd $_name-$pkgver
+  # install to temporary location, as importlib is used
+  python -m installer --destdir=test_dir dist/*.whl
+  export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH"
+  pytest -vv
+}
+
+package() {
+  cd $_name-$pkgver
+  python -m installer --destdir="$pkgdir" dist/*.whl
+  install -vDm 644 {docs/{CHANGES,DESCRIPTION},README.md} -t "$pkgdir/usr/share/doc/$pkgname/"
+}



More information about the arch-commits mailing list