backports/py3-sphinxcontrib-autoprogram: backported from edge/testing
This commit is contained in:
parent
14f32da4e4
commit
6a9a5e3d15
2 changed files with 53 additions and 0 deletions
34
backports/py3-sphinxcontrib-autoprogram/APKBUILD
Normal file
34
backports/py3-sphinxcontrib-autoprogram/APKBUILD
Normal file
|
@ -0,0 +1,34 @@
|
|||
# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
|
||||
pkgname=py3-sphinxcontrib-autoprogram
|
||||
pkgver=0.1.7
|
||||
pkgrel=2
|
||||
pkgdesc="Sphinx extension to document CLI programs"
|
||||
url="https://github.com/sphinx-contrib/autoprogram"
|
||||
arch="noarch"
|
||||
license="BSD-2-Clause"
|
||||
depends="python3 py3-six 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"
|
||||
# fail with new docutils
|
||||
options="!check"
|
||||
|
||||
build() {
|
||||
python3 setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
python3 setup.py test
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 setup.py install --skip-build --root="$pkgdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
81679a8bed93274193efb5ac784d72280db32f37156aca5a422af6c8e8abd6d4e4a22e070ee73e9b3194eacf22a8228be0df3329f6fd6a0ff2408a3c7973c8a7 py3-sphinxcontrib-autoprogram-0.1.7.tar.gz
|
||||
2405814d8cf546b6078e8d3c854943e1b5603cbc52558dad67fcaf7a729e1f6a29ae049e1172fe4612ccb20f0209ddebedf7c2a214602f1d6b7720b2fbcf0caa fix-argparse-output-py310.patch
|
||||
"
|
|
@ -0,0 +1,19 @@
|
|||
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(
|
Loading…
Reference in a new issue