3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Sphinx extension that automatically documents argparse commands and options
8 Summary(pl.UTF-8): Rozszerzenie Sphinksa automatycznie dokumentujące polecenia i opcje argparse
9 Name: python-sphinx_argparse
10 # keep 0.2.x here for python2 support
14 Group: Libraries/Python
15 #Source0Download: https://pypi.org/simple/sphinx-argparse/
16 Source0: https://files.pythonhosted.org/packages/source/s/sphinx-argparse/sphinx-argparse-%{version}.tar.gz
17 # Source0-md5: b137944fbbe26c88d54ee106bf0569ab
18 Patch0: %{name}-tests.patch
19 URL: https://pypi.org/project/sphinx-argparse/
21 BuildRequires: python-modules >= 1:2.7
22 BuildRequires: python-setuptools
24 BuildRequires: python-Sphinx >= 1.2.0
25 BuildRequires: python-pytest
29 BuildRequires: python3-modules >= 1:3.5
30 BuildRequires: python3-setuptools
32 BuildRequires: python3-Sphinx >= 1.2.0
33 BuildRequires: python3-pytest
36 BuildRequires: rpm-pythonprov
37 BuildRequires: rpmbuild(macros) >= 1.714
38 Requires: python-modules >= 1:2.7
39 Conflicts: python-commonmark < 0.5.6
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 Sphinx extension that automatically documents argparse commands and
47 %description -l pl.UTF-8
48 Rozszerzenie Sphinksa automatycznie dokumentujące polecenia i opcje
51 %package -n python3-sphinx_argparse
52 Summary: Sphinx extension that automatically documents argparse commands and options
53 Summary(pl.UTF-8): Rozszerzenie Sphinksa automatycznie dokumentujące polecenia i opcje argparse
54 Group: Libraries/Python
55 Requires: python3-modules >= 1:3.5
56 Conflicts: python3-commonmark < 0.5.6
58 %description -n python3-sphinx_argparse
59 Sphinx extension that automatically documents argparse commands and
62 %description -n python3-sphinx_argparse -l pl.UTF-8
63 Rozszerzenie Sphinksa automatycznie dokumentujące polecenia i opcje
67 %setup -q -n sphinx-argparse-%{version}
75 %{__python} -m pytest test
83 %{__python3} -m pytest test
88 rm -rf $RPM_BUILD_ROOT
101 rm -rf $RPM_BUILD_ROOT
105 %defattr(644,root,root,755)
107 %{py_sitescriptdir}/sphinxarg
108 %{py_sitescriptdir}/sphinx_argparse-%{version}-py*.egg-info
112 %files -n python3-sphinx_argparse
113 %defattr(644,root,root,755)
115 %{py3_sitescriptdir}/sphinxarg
116 %{py3_sitescriptdir}/sphinx_argparse-%{version}-py*.egg-info