Commit 2cbf238a authored by Hoang Nguyen's avatar Hoang Nguyen 🐢 Committed by alice
Browse files

testing/py3-sphinxcontrib-autoprogram: new aport

parent 3f473c58
# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
pkgname=py3-sphinxcontrib-autoprogram
pkgver=0.1.7
pkgrel=0
pkgdesc="Sphinx extension to document CLI programs"
url="https://github.com/sphinx-contrib/autoprogram"
arch="noarch"
license="BSD-2-Clause"
depends="python3 py3-sphinx"
makedepends="py3-setuptools"
source="
$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"
build() {
python3 setup.py build
}
check() {
python3 setup.py test
}
package() {
python3 setup.py install --prefix=/usr --root="$pkgdir"
}
sha512sums="
81679a8bed93274193efb5ac784d72280db32f37156aca5a422af6c8e8abd6d4e4a22e070ee73e9b3194eacf22a8228be0df3329f6fd6a0ff2408a3c7973c8a7 py3-sphinxcontrib-autoprogram-0.1.7.tar.gz
2405814d8cf546b6078e8d3c854943e1b5603cbc52558dad67fcaf7a729e1f6a29ae049e1172fe4612ccb20f0209ddebedf7c2a214602f1d6b7720b2fbcf0caa fix-argparse-output-py310.patch
"
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(
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment