]> git.pld-linux.org Git - packages/python3-sphinx_argparse.git/blob - python-sphinx_argparse.spec
1dfa68b5b6c668da613373c6105444ddaa9f19f2
[packages/python3-sphinx_argparse.git] / python-sphinx_argparse.spec
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
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
11 Version:        0.2.5
12 Release:        4
13 License:        MIT
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/
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.7
22 BuildRequires:  python-setuptools
23 %if %{with tests}
24 BuildRequires:  python-Sphinx >= 1.2.0
25 BuildRequires:  python-pytest
26 %endif
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-modules >= 1:3.5
30 BuildRequires:  python3-setuptools
31 %if %{with tests}
32 BuildRequires:  python3-Sphinx >= 1.2.0
33 BuildRequires:  python3-pytest
34 %endif
35 %endif
36 BuildRequires:  rpm-pythonprov
37 BuildRequires:  rpmbuild(macros) >= 1.714
38 Requires:       python-modules >= 1:2.7
39 Conflicts:      python-commonmark < 0.5.6
40 BuildArch:      noarch
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %description
44 Sphinx extension that automatically documents argparse commands and
45 options.
46
47 %description -l pl.UTF-8
48 Rozszerzenie Sphinksa automatycznie dokumentujące polecenia i opcje
49 argparse.
50
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
57
58 %description -n python3-sphinx_argparse
59 Sphinx extension that automatically documents argparse commands and
60 options.
61
62 %description -n python3-sphinx_argparse -l pl.UTF-8
63 Rozszerzenie Sphinksa automatycznie dokumentujące polecenia i opcje
64 argparse.
65
66 %prep
67 %setup -q -n sphinx-argparse-%{version}
68 %patch0 -p1
69
70 %build
71 %if %{with python2}
72 %py_build
73
74 %if %{with tests}
75 %{__python} -m pytest test
76 %endif
77 %endif
78
79 %if %{with python3}
80 %py3_build
81
82 %if %{with tests}
83 %{__python3} -m pytest test
84 %endif
85 %endif
86
87 %install
88 rm -rf $RPM_BUILD_ROOT
89
90 %if %{with python2}
91 %py_install
92
93 %py_postclean
94 %endif
95
96 %if %{with python3}
97 %py3_install
98 %endif
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %if %{with python2}
104 %files
105 %defattr(644,root,root,755)
106 %doc README.md
107 %{py_sitescriptdir}/sphinxarg
108 %{py_sitescriptdir}/sphinx_argparse-%{version}-py*.egg-info
109 %endif
110
111 %if %{with python3}
112 %files -n python3-sphinx_argparse
113 %defattr(644,root,root,755)
114 %doc README.md
115 %{py3_sitescriptdir}/sphinxarg
116 %{py3_sitescriptdir}/sphinx_argparse-%{version}-py*.egg-info
117 %endif
This page took 0.046926 seconds and 2 git commands to generate.