]> git.pld-linux.org Git - SPECS.git/blob - python-testpath.spec
SPECS updated Sat 31 Jul 20:26:02 CEST 2021
[SPECS.git] / python-testpath.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 Summary:        Test utilities for code working with files and commands
9 Summary(pl.UTF-8):      Narzędzia testowe dla kodu działającego na plikach i poleceniach
10 Name:           python-testpath
11 Version:        0.4.4
12 Release:        2
13 License:        BSD
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/testpath/
16 Source0:        https://files.pythonhosted.org/packages/source/t/testpath/testpath-%{version}.tar.gz
17 # Source0-md5:  297100d49a6f20859383434a182cf426
18 URL:            https://pypi.org/project/testpath/
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.7
21 %if %{with tests}
22 BuildRequires:  python-pathlib2
23 BuildRequires:  python-pytest
24 %endif
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-modules >= 1:3.5
28 %if %{with tests}
29 BuildRequires:  python3-pytest
30 %endif
31 %endif
32 BuildRequires:  rpm-pythonprov
33 BuildRequires:  rpmbuild(macros) >= 1.714
34 %if %{with doc}
35 BuildRequires:  sphinx-pdg
36 %endif
37 Requires:       python-modules >= 1:2.7
38 BuildArch:      noarch
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41 %description
42 Testpath is a collection of utilities for Python code working with
43 files and commands.
44
45 It contains functions to check things on the filesystem, and tools for
46 mocking system commands and recording calls to those.
47
48 %description -l pl.UTF-8
49 Testpath to zbiór narzędzi dla kodu w Pythonie działającego na plikach
50 i poleceniach.
51
52 Zawiera funkcje do sprawdzania elementów w systemie plików oraz
53 narzędzia do tworzenia atrap poleceń systemowych i zapisywania ich
54 wywołań.
55
56 %package -n python3-testpath
57 Summary:        Test utilities for code working with files and commands
58 Summary(pl.UTF-8):      Narzędzia testowe dla kodu działającego na plikach i poleceniach
59 Group:          Libraries/Python
60 Requires:       python3-modules >= 1:3.5
61
62 %description -n python3-testpath
63 Testpath is a collection of utilities for Python code working with
64 files and commands.
65
66 It contains functions to check things on the filesystem, and tools for
67 mocking system commands and recording calls to those.
68
69 %description -n python3-testpath -l pl.UTF-8
70 Testpath to zbiór narzędzi dla kodu w Pythonie działającego na plikach
71 i poleceniach.
72
73 Zawiera funkcje do sprawdzania elementów w systemie plików oraz
74 narzędzia do tworzenia atrap poleceń systemowych i zapisywania ich
75 wywołań.
76
77 %package apidocs
78 Summary:        API documentation for Python testpath module
79 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona testpath
80 Group:          Documentation
81
82 %description apidocs
83 API documentation for Python testpath module.
84
85 %description apidocs -l pl.UTF-8
86 Dokumentacja API modułu Pythona testpath.
87
88 %prep
89 %setup -q -n testpath-%{version}
90
91 %build
92 %if %{with python2}
93 %py_build
94
95 %if %{with tests}
96 %{__python} -m pytest tests
97 %endif
98 %endif
99
100 %if %{with python3}
101 %py3_build
102
103 %if %{with tests}
104 %{__python3} -m pytest tests
105 %endif
106 %endif
107
108 %if %{with doc}
109 %{__make} -C doc html
110 %endif
111
112 %install
113 rm -rf $RPM_BUILD_ROOT
114
115 %if %{with python2}
116 %py_install
117
118 %py_postclean
119 %endif
120
121 %if %{with python3}
122 %py3_install
123 %endif
124
125 %clean
126 rm -rf $RPM_BUILD_ROOT
127
128 %if %{with python2}
129 %files
130 %defattr(644,root,root,755)
131 %doc LICENSE README.rst
132 %{py_sitescriptdir}/testpath
133 %{py_sitescriptdir}/testpath-%{version}-py*.egg-info
134 %endif
135
136 %if %{with python3}
137 %files -n python3-testpath
138 %defattr(644,root,root,755)
139 %doc LICENSE README.rst
140 %{py3_sitescriptdir}/testpath
141 %{py3_sitescriptdir}/testpath-%{version}-py*.egg-info
142 %endif
143
144 %if %{with doc}
145 %files apidocs
146 %defattr(644,root,root,755)
147 %doc doc/_build/html/{_static,*.html,*.js}
148 %endif
This page took 0.060772 seconds and 3 git commands to generate.