Date: Friday, December 3, 2021 @ 23:16:26 Author: dvzrv Revision: 1064933
Upgrade to 0.3.1 for python 3.10 rebuild. Switch to new upstream: https://github.com/ashb/sphinx-argparse Simplify quoting in file. Disable broken tests relying on hardcoding. https://github.com/ashb/sphinx-argparse/issues/5 Remove top-level test dir: https://github.com/ashb/sphinx-argparse/issues/6 Simplify installation in package to adhere to python package guidelines. Modified: python-sphinx-argparse/trunk/PKGBUILD ----------+ PKGBUILD | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2021-12-03 23:01:13 UTC (rev 1064932) +++ PKGBUILD 2021-12-03 23:16:26 UTC (rev 1064933) @@ -2,27 +2,23 @@ _name=sphinx-argparse pkgname=python-sphinx-argparse -pkgver=0.2.5 -pkgrel=5 +pkgver=0.3.1 +pkgrel=1 pkgdesc="Sphinx extension that automatically documents argparse commands and options" -arch=('any') -url="https://github.com/ribozz/sphinx-argparse" -license=('MIT') -depends=('python-sphinx') -makedepends=('python-setuptools') -checkdepends=('python-pytest') +arch=(any) +url="https://github.com/ashb/sphinx-argparse" +license=(MIT) +depends=(python-sphinx) +makedepends=(python-setuptools) +checkdepends=(python-pytest) optdepends=('python-commonmark: markdown support') -# license file missing in source tarball: https://github.com/ribozz/sphinx-argparse/issues/116 source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz" - "${pkgname}-${pkgver}.LICENSE::https://raw.githubusercontent.com/ribozz/${_name}/${pkgver}/LICENSE") -sha512sums=('785e2b1ea04b39721d28aee712b87f7fccb56a25a2d5ccf7825b27673a7e53069265c89b32f7b63d4f788127fe815595913af699dba3cd60db37a7efdef6ea55' - '35a00cf0287c871f0eaee9288f5cd14470440b006d6be6abcbe75a34040324777fbb6de94ee9d9f5d2f6aca85a8d73c09ecbf12cf9b4c5c52ed7545cbe30871d') +) +sha512sums=('de6948a24abc4012b1b2431176d0547f04e1076804b2a186b027fcb76a458b6ae670aca91400cc3e2fa789b5cd3754cf6b24116258e04fc81f91890bb0f08a46') +b2sums=('47343114843e0af7c296302d167a70d021e6c9f75f6ef9d01fcaca52a120f606cb6732f2e90876fa29303c23ce1f066540116d6ba2d67caa267a1a421c23d253') prepare() { mv -v "${_name}-${pkgver}" "${pkgname}-${pkgver}" - # fix problematic file permissions: https://github.com/ribozz/sphinx-argparse/issues/117 - cd "${pkgname}-${pkgver}" - chmod 644 sphinx_argparse.egg-info/* } build() { @@ -33,17 +29,16 @@ check() { cd "${pkgname}-${pkgver}" export PYTHONPATH="build:${PYTHONPATH}" - py.test + # 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" } package() { cd "${pkgname}-${pkgver}" - python setup.py install --skip-build \ - --optimize=1 \ - --prefix=/usr \ - --root="${pkgdir}" - install -vDm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}" - install -vDm 644 "../${pkgname}-${pkgver}.LICENSE" \ - -t "${pkgdir}/usr/share/licenses/${pkgname}" + 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" } # vim:set ts=2 sw=2 et:
