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
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
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/
20 BuildRequires: python-modules >= 1:2.7
22 BuildRequires: python-pathlib2
23 BuildRequires: python-pytest
27 BuildRequires: python3-modules >= 1:3.5
29 BuildRequires: python3-pytest
32 BuildRequires: rpm-pythonprov
33 BuildRequires: rpmbuild(macros) >= 1.714
35 BuildRequires: sphinx-pdg
37 Requires: python-modules >= 1:2.7
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 Testpath is a collection of utilities for Python code working with
45 It contains functions to check things on the filesystem, and tools for
46 mocking system commands and recording calls to those.
48 %description -l pl.UTF-8
49 Testpath to zbiór narzędzi dla kodu w Pythonie działającego na plikach
52 Zawiera funkcje do sprawdzania elementów w systemie plików oraz
53 narzędzia do tworzenia atrap poleceń systemowych i zapisywania ich
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
62 %description -n python3-testpath
63 Testpath is a collection of utilities for Python code working with
66 It contains functions to check things on the filesystem, and tools for
67 mocking system commands and recording calls to those.
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
73 Zawiera funkcje do sprawdzania elementów w systemie plików oraz
74 narzędzia do tworzenia atrap poleceń systemowych i zapisywania ich
78 Summary: API documentation for Python testpath module
79 Summary(pl.UTF-8): Dokumentacja API modułu Pythona testpath
83 API documentation for Python testpath module.
85 %description apidocs -l pl.UTF-8
86 Dokumentacja API modułu Pythona testpath.
89 %setup -q -n testpath-%{version}
96 %{__python} -m pytest tests
104 %{__python3} -m pytest tests
109 %{__make} -C doc html
113 rm -rf $RPM_BUILD_ROOT
126 rm -rf $RPM_BUILD_ROOT
130 %defattr(644,root,root,755)
131 %doc LICENSE README.rst
132 %{py_sitescriptdir}/testpath
133 %{py_sitescriptdir}/testpath-%{version}-py*.egg-info
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
146 %defattr(644,root,root,755)
147 %doc doc/_build/html/{_static,*.html,*.js}