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
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/sphinx-argparse/
15 Source0: https://files.pythonhosted.org/packages/source/s/sphinx-argparse/sphinx-argparse-%{version}.tar.gz
16 # Source0-md5: b137944fbbe26c88d54ee106bf0569ab
17 Patch0: %{name}-tests.patch
18 URL: https://pypi.org/project/sphinx-argparse/
20 BuildRequires: python-modules >= 1:2.7
21 BuildRequires: python-setuptools
23 BuildRequires: python-Sphinx >= 1.2.0
24 BuildRequires: python-pytest
28 BuildRequires: python3-modules >= 1:3.5
29 BuildRequires: python3-setuptools
31 BuildRequires: python3-Sphinx >= 1.2.0
32 BuildRequires: python3-pytest
35 BuildRequires: rpm-pythonprov
36 BuildRequires: rpmbuild(macros) >= 1.714
37 Requires: python-modules >= 1:2.7
38 Conflicts: python-commonmark < 0.5.6
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 Sphinx extension that automatically documents argparse commands and
46 %description -l pl.UTF-8
47 Rozszerzenie Sphinksa automatycznie dokumentujące polecenia i opcje
50 %package -n python3-sphinx_argparse
51 Summary: Sphinx extension that automatically documents argparse commands and options
52 Summary(pl.UTF-8): Rozszerzenie Sphinksa automatycznie dokumentujące polecenia i opcje argparse
53 Group: Libraries/Python
54 Requires: python3-modules >= 1:3.5
55 Conflicts: python3-commonmark < 0.5.6
57 %description -n python3-sphinx_argparse
58 Sphinx extension that automatically documents argparse commands and
61 %description -n python3-sphinx_argparse -l pl.UTF-8
62 Rozszerzenie Sphinksa automatycznie dokumentujące polecenia i opcje
66 %setup -q -n sphinx-argparse-%{version}
74 %{__python} -m pytest test
82 %{__python3} -m pytest test
87 rm -rf $RPM_BUILD_ROOT
100 rm -rf $RPM_BUILD_ROOT
104 %defattr(644,root,root,755)
106 %{py_sitescriptdir}/sphinxarg
107 %{py_sitescriptdir}/sphinx_argparse-%{version}-py*.egg-info
111 %files -n python3-sphinx_argparse
112 %defattr(644,root,root,755)
114 %{py3_sitescriptdir}/sphinxarg
115 %{py3_sitescriptdir}/sphinx_argparse-%{version}-py*.egg-info