]> git.pld-linux.org Git - packages/python-sphinx_argparse.git/blob - python-sphinx_argparse.spec
b4d7697bf71383ec1ea3948e7b44a366b61cd151
[packages/python-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 Version:        0.2.5
11 Release:        2
12 License:        MIT
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/
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.7
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  python-Sphinx >= 1.2.0
24 BuildRequires:  python-pytest
25 %endif
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-modules >= 1:3.5
29 BuildRequires:  python3-setuptools
30 %if %{with tests}
31 BuildRequires:  python3-Sphinx >= 1.2.0
32 BuildRequires:  python3-pytest
33 %endif
34 %endif
35 BuildRequires:  rpm-pythonprov
36 BuildRequires:  rpmbuild(macros) >= 1.714
37 Requires:       python-modules >= 1:2.7
38 Conflicts:      python-commonmark < 0.5.6
39 BuildArch:      noarch
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
43 Sphinx extension that automatically documents argparse commands and
44 options.
45
46 %description -l pl.UTF-8
47 Rozszerzenie Sphinksa automatycznie dokumentujące polecenia i opcje
48 argparse.
49
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
56
57 %description -n python3-sphinx_argparse
58 Sphinx extension that automatically documents argparse commands and
59 options.
60
61 %description -n python3-sphinx_argparse -l pl.UTF-8
62 Rozszerzenie Sphinksa automatycznie dokumentujące polecenia i opcje
63 argparse.
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
87 rm -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
100 rm -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.071527 seconds and 2 git commands to generate.