3 %bcond_without doc # Sphinx documentation
4 %bcond_without tests # unit tests
5 %bcond_without python2 # CPython 2.x module
6 %bcond_with python3 # CPython 3.x module (built from python3-testpath.spec)
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
11 # keep 0.4.x here for python2 support
15 Group: Libraries/Python
16 #Source0Download: https://pypi.org/simple/testpath/
17 Source0: https://files.pythonhosted.org/packages/source/t/testpath/testpath-%{version}.tar.gz
18 # Source0-md5: 297100d49a6f20859383434a182cf426
19 URL: https://pypi.org/project/testpath/
21 BuildRequires: python-modules >= 1:2.7
23 BuildRequires: python-pathlib2
24 BuildRequires: python-pytest
28 BuildRequires: python3-modules >= 1:3.5
30 BuildRequires: python3-pytest
33 BuildRequires: rpm-pythonprov
34 BuildRequires: rpmbuild(macros) >= 1.714
36 BuildRequires: sphinx-pdg-2
38 Requires: python-modules >= 1:2.7
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 Testpath is a collection of utilities for Python code working with
46 It contains functions to check things on the filesystem, and tools for
47 mocking system commands and recording calls to those.
49 %description -l pl.UTF-8
50 Testpath to zbiór narzędzi dla kodu w Pythonie działającego na plikach
53 Zawiera funkcje do sprawdzania elementów w systemie plików oraz
54 narzędzia do tworzenia atrap poleceń systemowych i zapisywania ich
57 %package -n python3-testpath
58 Summary: Test utilities for code working with files and commands
59 Summary(pl.UTF-8): Narzędzia testowe dla kodu działającego na plikach i poleceniach
60 Group: Libraries/Python
61 Requires: python3-modules >= 1:3.5
63 %description -n python3-testpath
64 Testpath is a collection of utilities for Python code working with
67 It contains functions to check things on the filesystem, and tools for
68 mocking system commands and recording calls to those.
70 %description -n python3-testpath -l pl.UTF-8
71 Testpath to zbiór narzędzi dla kodu w Pythonie działającego na plikach
74 Zawiera funkcje do sprawdzania elementów w systemie plików oraz
75 narzędzia do tworzenia atrap poleceń systemowych i zapisywania ich
79 Summary: API documentation for Python testpath module
80 Summary(pl.UTF-8): Dokumentacja API modułu Pythona testpath
84 API documentation for Python testpath module.
86 %description apidocs -l pl.UTF-8
87 Dokumentacja API modułu Pythona testpath.
90 %setup -q -n testpath-%{version}
97 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
98 %{__python} -m pytest tests
106 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
107 %{__python3} -m pytest tests
112 %{__make} -C doc html \
113 SPHINXBUILD=sphinx-build-2
117 rm -rf $RPM_BUILD_ROOT
130 rm -rf $RPM_BUILD_ROOT
134 %defattr(644,root,root,755)
135 %doc LICENSE README.rst
136 %{py_sitescriptdir}/testpath
137 %{py_sitescriptdir}/testpath-%{version}-py*.egg-info
141 %files -n python3-testpath
142 %defattr(644,root,root,755)
143 %doc LICENSE README.rst
144 %{py3_sitescriptdir}/testpath
145 %{py3_sitescriptdir}/testpath-%{version}-py*.egg-info
150 %defattr(644,root,root,755)
151 %doc doc/_build/html/{_static,*.html,*.js}