backports/py3-sphinxcontrib-autoprogram: upgrade to 0.1.8

This commit is contained in:
Antoine Martin 2023-05-05 01:21:40 -04:00
parent 7d1d62a76d
commit 56645601ce
Signed by: forge
GPG key ID: D62A472A4AA7D541
2 changed files with 18 additions and 30 deletions

View file

@ -1,34 +1,41 @@
# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com> # Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
pkgname=py3-sphinxcontrib-autoprogram pkgname=py3-sphinxcontrib-autoprogram
pkgver=0.1.7 pkgver=0.1.8
pkgrel=2 pkgrel=1
pkgdesc="Sphinx extension to document CLI programs" pkgdesc="Sphinx extension to document CLI programs"
url="https://github.com/sphinx-contrib/autoprogram" url="https://github.com/sphinx-contrib/autoprogram"
arch="noarch" arch="noarch"
license="BSD-2-Clause" license="BSD-2-Clause"
depends="python3 py3-six py3-sphinx" depends="python3 py3-six py3-sphinx"
makedepends="py3-setuptools" makedepends="
py3-gpep517
py3-setuptools
py3-wheel
"
subpackages="$pkgname-pyc"
source=" source="
$pkgname-$pkgver.tar.gz::https://github.com/sphinx-contrib/autoprogram/archive/refs/tags/$pkgver.tar.gz $pkgname-$pkgver.tar.gz::https://github.com/sphinx-contrib/autoprogram/archive/refs/tags/$pkgver.tar.gz
fix-argparse-output-py310.patch
" "
builddir="$srcdir/autoprogram-$pkgver" builddir="$srcdir/autoprogram-$pkgver"
# fail with new docutils options="!check" # no tests
options="!check"
build() { build() {
python3 setup.py build gpep517 build-wheel \
--wheel-dir dist \
--output-fd 3 3>&1 >&2
} }
check() { check() {
python3 setup.py test python3 -m venv --clear --without-pip --system-site-packages testenv
testenv/bin/python3 -m installer dist/*.whl
testenv/bin/python3 -m unittest discover
} }
package() { package() {
python3 setup.py install --skip-build --root="$pkgdir" python3 -m installer -d "$pkgdir" \
dist/*.whl
} }
sha512sums=" sha512sums="
81679a8bed93274193efb5ac784d72280db32f37156aca5a422af6c8e8abd6d4e4a22e070ee73e9b3194eacf22a8228be0df3329f6fd6a0ff2408a3c7973c8a7 py3-sphinxcontrib-autoprogram-0.1.7.tar.gz bc07f25c34884f8e3130bbe5d2d6fb645f45aca5794c6b11a772f0351d680380d3e63cfe4b60aabf05ad8c6f44bae72e592500454598d31cc3c98dcbc8dbf899 py3-sphinxcontrib-autoprogram-0.1.8.tar.gz
2405814d8cf546b6078e8d3c854943e1b5603cbc52558dad67fcaf7a729e1f6a29ae049e1172fe4612ccb20f0209ddebedf7c2a214602f1d6b7720b2fbcf0caa fix-argparse-output-py310.patch
" "

View file

@ -1,19 +0,0 @@
Patch-Source: https://github.com/sphinx-contrib/autoprogram/pull/25
diff --git a/sphinxcontrib/autoprogram.py b/sphinxcontrib/autoprogram.py
index c60cf68..0e7d9a0 100644
--- a/sphinxcontrib/autoprogram.py
+++ b/sphinxcontrib/autoprogram.py
@@ -476,7 +476,11 @@ class ScannerTestCase(unittest.TestCase):
# section: default optionals
program, options, group = sections[1]
self.assertEqual([], program)
- self.assertEqual("optional arguments", group.title)
+ # See https://github.com/sphinx-contrib/autoprogram/issues/24
+ if sys.version_info >= (3, 10):
+ self.assertEqual("options", group.title)
+ else:
+ self.assertEqual("optional arguments", group.title)
self.assertEqual(None, group.description)
self.assertEqual(2, len(options))
self.assertEqual(