]> git.pld-linux.org Git - packages/python-sphinx_argparse.git/blame - python-sphinx_argparse.spec
rebuild with tests and docs
[packages/python-sphinx_argparse.git] / python-sphinx_argparse.spec
CommitLineData
80ad58df
JB
1#
2# Conditional build:
3%bcond_without tests # unit tests
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7Summary: Sphinx extension that automatically documents argparse commands and options
8Summary(pl.UTF-8): Rozszerzenie Sphinksa automatycznie dokumentujące polecenia i opcje argparse
9Name: python-sphinx_argparse
10Version: 0.2.5
850b6eb9 11Release: 4
80ad58df
JB
12License: MIT
13Group: Libraries/Python
14#Source0Download: https://pypi.org/simple/sphinx-argparse/
15Source0: https://files.pythonhosted.org/packages/source/s/sphinx-argparse/sphinx-argparse-%{version}.tar.gz
16# Source0-md5: b137944fbbe26c88d54ee106bf0569ab
17Patch0: %{name}-tests.patch
18URL: https://pypi.org/project/sphinx-argparse/
19%if %{with python2}
20BuildRequires: python-modules >= 1:2.7
21BuildRequires: python-setuptools
22%if %{with tests}
23BuildRequires: python-Sphinx >= 1.2.0
24BuildRequires: python-pytest
25%endif
26%endif
27%if %{with python3}
28BuildRequires: python3-modules >= 1:3.5
29BuildRequires: python3-setuptools
30%if %{with tests}
31BuildRequires: python3-Sphinx >= 1.2.0
32BuildRequires: python3-pytest
33%endif
34%endif
35BuildRequires: rpm-pythonprov
36BuildRequires: rpmbuild(macros) >= 1.714
37Requires: python-modules >= 1:2.7
38Conflicts: python-commonmark < 0.5.6
39BuildArch: noarch
40BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42%description
43Sphinx extension that automatically documents argparse commands and
44options.
45
46%description -l pl.UTF-8
47Rozszerzenie Sphinksa automatycznie dokumentujące polecenia i opcje
48argparse.
49
50%package -n python3-sphinx_argparse
51Summary: Sphinx extension that automatically documents argparse commands and options
52Summary(pl.UTF-8): Rozszerzenie Sphinksa automatycznie dokumentujące polecenia i opcje argparse
53Group: Libraries/Python
54Requires: python3-modules >= 1:3.5
55Conflicts: python3-commonmark < 0.5.6
56
57%description -n python3-sphinx_argparse
58Sphinx extension that automatically documents argparse commands and
59options.
60
61%description -n python3-sphinx_argparse -l pl.UTF-8
62Rozszerzenie Sphinksa automatycznie dokumentujące polecenia i opcje
63argparse.
64
65%prep
66%setup -q -n sphinx-argparse-%{version}
67%patch0 -p1
68
69%build
70%if %{with python2}
71%py_build
72
73%if %{with tests}
74%{__python} -m pytest test
75%endif
76%endif
77
78%if %{with python3}
79%py3_build
80
81%if %{with tests}
82%{__python3} -m pytest test
83%endif
84%endif
85
86%install
87rm -rf $RPM_BUILD_ROOT
88
89%if %{with python2}
90%py_install
91
92%py_postclean
93%endif
94
95%if %{with python3}
96%py3_install
97%endif
98
99%clean
100rm -rf $RPM_BUILD_ROOT
101
102%if %{with python2}
103%files
104%defattr(644,root,root,755)
105%doc README.md
106%{py_sitescriptdir}/sphinxarg
107%{py_sitescriptdir}/sphinx_argparse-%{version}-py*.egg-info
108%endif
109
110%if %{with python3}
111%files -n python3-sphinx_argparse
112%defattr(644,root,root,755)
113%doc README.md
114%{py3_sitescriptdir}/sphinxarg
115%{py3_sitescriptdir}/sphinx_argparse-%{version}-py*.egg-info
116%endif
This page took 0.140029 seconds and 4 git commands to generate.