Date: Thursday, October 6, 2022 @ 22:01:52
  Author: dvzrv
Revision: 1323399

upgpkg: python-sphinx-argparse 0.3.2-1: Upgrade to 0.3.2.

Remove ignoring of tests (fixed upstream).
Remove removal of top-level test dir (fixed upstream).
Remove unneeded prepare().
Remove unnecessary quotes and curly braces.
Switch to PEP517.

Modified:
  python-sphinx-argparse/trunk/PKGBUILD

----------+
 PKGBUILD |   36 +++++++++++++-----------------------
 1 file changed, 13 insertions(+), 23 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2022-10-06 22:01:48 UTC (rev 1323398)
+++ PKGBUILD    2022-10-06 22:01:52 UTC (rev 1323399)
@@ -2,43 +2,33 @@
 
 _name=sphinx-argparse
 pkgname=python-sphinx-argparse
-pkgver=0.3.1
-pkgrel=2
+pkgver=0.3.2
+pkgrel=1
 pkgdesc="Sphinx extension that automatically documents argparse commands and 
options"
 arch=(any)
 url="https://github.com/ashb/sphinx-argparse";
 license=(MIT)
 depends=(python-sphinx)
-makedepends=(python-setuptools)
+makedepends=(python-build python-installer python-poetry-core python-wheel)
 checkdepends=(python-pytest)
 optdepends=('python-commonmark: markdown support')
-source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz";
-)
-sha512sums=('de6948a24abc4012b1b2431176d0547f04e1076804b2a186b027fcb76a458b6ae670aca91400cc3e2fa789b5cd3754cf6b24116258e04fc81f91890bb0f08a46')
-b2sums=('47343114843e0af7c296302d167a70d021e6c9f75f6ef9d01fcaca52a120f606cb6732f2e90876fa29303c23ce1f066540116d6ba2d67caa267a1a421c23d253')
+source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
+sha512sums=('5029b5ce0f79f37e134b36a800713bbbc1fd24c2013447ed0e0656b41527a2f709ce6b4201138dae678ceb9d03e288a42353bfec1bf5868e9f7881e563906c05')
+b2sums=('dbd96475ebb2857a536eb075cee6cd54f08897beb8dd37e6e6a2f098c9758a8e13e0a54d96ff7f9e84dadc6b6ff1af38766cae0c7951cc4b27e3f6f753a81971')
 
-prepare() {
-  mv -v "${_name}-${pkgver}" "${pkgname}-${pkgver}"
-}
-
 build() {
-  cd "${pkgname}-${pkgver}"
-  python setup.py build
+  cd $_name-$pkgver
+  python -m build --wheel --no-isolation
 }
 
 check() {
-  cd "${pkgname}-${pkgver}"
-  export PYTHONPATH="build:${PYTHONPATH}"
-  # disable tests that rely on hardcoding argparse output: 
https://github.com/ashb/sphinx-argparse/issues/5
-  pytest -vv -k "not test_parse_nested and not test_parse_nested_with_alias 
and not test_parse_groups and not test_action_groups_with_subcommands"
+  cd $_name-$pkgver
+  pytest -vv
 }
 
 package() {
-  cd "${pkgname}-${pkgver}"
-  python setup.py install --optimize=1 --root="${pkgdir}"
-  install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
-  # remove conflicting top-level test dir 
https://github.com/ashb/sphinx-argparse/issues/6
-  local site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
-  rm -frv "${pkgdir}/${site_packages}/test"
+  cd $_name-$pkgver
+  python -m installer --destdir="$pkgdir" dist/*.whl
+  install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
 }
 # vim:set ts=2 sw=2 et:

Reply via email to