Date: Sunday, July 31, 2022 @ 10:56:11
  Author: dvzrv
Revision: 1259283

upgpkg: python-django-sekizai 4.0.0-1: Upgrade to 4.0.0.

Run tests directly in check().
Switch to PEP517.

Modified:
  python-django-sekizai/trunk/PKGBUILD

----------+
 PKGBUILD |   35 ++++++++++++++++++++---------------
 1 file changed, 20 insertions(+), 15 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2022-07-31 10:48:01 UTC (rev 1259282)
+++ PKGBUILD    2022-07-31 10:56:11 UTC (rev 1259283)
@@ -2,7 +2,7 @@
 
 _name=django-sekizai
 pkgname=python-django-sekizai
-pkgver=3.0.1
+pkgver=4.0.0
 pkgrel=1
 pkgdesc="Django Template Blocks with extra functionality"
 arch=(any)
@@ -9,26 +9,31 @@
 url="https://github.com/django-cms/django-sekizai";
 license=(BSD)
 depends=(python-django python-django-classy-tags)
-makedepends=(python-setuptools)
-source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz";)
-sha512sums=('1435cdaf5d871c502066e5db203464f9ca9bbcdb17d5630c2d132389d1e390f5deea7729b899a834639965c48b47c13765ea2d8f0d86e3a176b9a94fd04704d5')
-b2sums=('2b3941000c54f708906031f1335dae4e74474f3aa3ec76d21909bf3a56ce0cbcec77b4063f32ec214d60354e4b02687311ac58ced4e74623b0b37dcdf31e7479')
+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=('076895930de24bdba69e7720ca2f8dd78b07ec96bb7a66c78a21d89945711dd318644216ab7c1d75d753ee7161027fb5b3940d4f64994975b65b2960d837b7d7')
+b2sums=('844461088e450b5be1ab5300ee7953bcc6f3692e3e5791be89cf25617d2b42f389cedc9face93df818a9fc6da8ad97e9b47258e95c44259d857a7e91c2b44618')
 
 build() {
-  cd "${_name}-${pkgver}"
-  python setup.py build
+  cd $_name-$pkgver
+  python -m build --wheel --no-isolation
 }
 
 check() {
-  cd "${_name}-${pkgver}"
-  export PYTHONPATH="build:${PYTHONPATH}"
-  # project uses deprecated way of running tests: 
https://github.com/django-cms/django-sekizai/issues/116
-  python setup.py test
+  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"
+  python tests/settings.py
 }
 
 package() {
-  cd "${_name}-${pkgver}"
-  python setup.py install --optimize=1 --root="${pkgdir}"
-  install -vDm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
-  install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+  cd $_name-$pkgver
+  python -m installer --destdir="$pkgdir" dist/*.whl
+  install -vDm 644 README.rst -t "$pkgdir/usr/share/doc/$pkgname/"
+  install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
 }

Reply via email to