testing/py3-sphinx-argparse: upgrade to 0.3.2

This commit is contained in:
ptrcnull 2022-11-02 23:53:05 +01:00 committed by alice
parent 01a06beaca
commit 0ee05b4036
2 changed files with 5 additions and 22 deletions

View File

@ -1,7 +1,7 @@
# Maintainer: Keith Toh <ktprograms@gmail.com>
pkgname=py3-sphinx-argparse
pkgver=0.3.1
pkgrel=1
pkgver=0.3.2
pkgrel=0
pkgdesc="Sphinx extension that automatically documents argparse commands and options"
url="https://sphinx-argparse.readthedocs.io/en/latest/"
arch="noarch"
@ -9,8 +9,7 @@ license="MIT"
depends="python3 py3-sphinx"
makedepends="py3-build py3-installer py3-poetry-core py3-wheel"
checkdepends="py3-pytest"
source="sphinx-argparse-$pkgver.tar.gz::https://github.com/ashb/sphinx-argparse/archive/refs/tags/$pkgver.tar.gz
fix-python3.10-tests.patch"
source="sphinx-argparse-$pkgver.tar.gz::https://github.com/ashb/sphinx-argparse/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/sphinx-argparse-$pkgver"
build() {
@ -24,11 +23,10 @@ check() {
package() {
python3 -m installer -d "$pkgdir" \
dist/sphinx_argparse-$pkgver-py2.py3-none-any.whl
dist/sphinx_argparse-$pkgver-py3-none-any.whl
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
sha512sums="
3d289c90165eb6a3d7a94dff8e6a429a49eb404ce373e80e007a0cd9abaae1e1236f5393df2fbf11701c349dade9d199640dc398064da4fd50a58a90eb3f8f12 sphinx-argparse-0.3.1.tar.gz
790aef1651fcb5160058e8359b13368fbbbb01dafe8d792187e942a542f5cce9b84d1c44b85f75782f373b9ce3dca976ed703fb496f6f8fe52dd6708038edc29 fix-python3.10-tests.patch
fcc179d85ac9d30e327f75b02086c8f831856b099d9a26bc10adc4f20b57781a117a5dac2d6882e1f7c07604157dda2c2344c29ae3c475022ce252cde96646bb sphinx-argparse-0.3.2.tar.gz
"

View File

@ -3,18 +3,3 @@ Fix tests failing because of a change in Python 3.10 argparse
Modified from https://github.com/ashb/sphinx-argparse/commit/a7b186aa60cf256dd91268ca3c18e78ef6644223
Removed the changes to CI matrix since it doesn't exist in the PyPI tarball
diff --git a/sphinxarg/parser.py b/sphinxarg/parser.py
index 9a6f76a..89583c6 100644
--- a/sphinxarg/parser.py
+++ b/sphinxarg/parser.py
@@ -154,7 +154,9 @@ def parse_parser(parser, data=None, **kwargs):
continue
# Upper case "Positional Arguments" and "Optional Arguments" titles
- if action_group.title == 'optional arguments':
+ # Since python-3.10 'optional arguments' changed to 'options'
+ # more info: https://github.com/python/cpython/pull/23858
+ if action_group.title == 'optional arguments' or action_group.title == 'options':
action_group.title = 'Named Arguments'
if action_group.title == 'positional arguments':
action_group.title = 'Positional Arguments'