3 %bcond_without doc # Sphinx documentation
4 %bcond_without tests # unit tests
6 Summary: Test utilities for code working with files and commands
7 Summary(pl.UTF-8): Narzędzia testowe dla kodu działającego na plikach i poleceniach
12 Group: Libraries/Python
13 #Source0Download: https://pypi.org/simple/testpath/
14 Source0: https://files.pythonhosted.org/packages/source/t/testpath/testpath-%{version}.tar.gz
15 # Source0-md5: 9fd4339f76da12d15bc718e4aa2566e9
16 URL: https://pypi.org/project/testpath/
17 BuildRequires: python3-modules >= 1:3.5
18 BuildRequires: python3-setuptools
20 BuildRequires: python3-pytest
22 BuildRequires: rpm-pythonprov
23 BuildRequires: rpmbuild(macros) >= 1.714
25 BuildRequires: sphinx-pdg-3
27 Requires: python3-modules >= 1:3.5
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 Testpath is a collection of utilities for Python code working with
35 It contains functions to check things on the filesystem, and tools for
36 mocking system commands and recording calls to those.
38 %description -l pl.UTF-8
39 Testpath to zbiór narzędzi dla kodu w Pythonie działającego na plikach
42 Zawiera funkcje do sprawdzania elementów w systemie plików oraz
43 narzędzia do tworzenia atrap poleceń systemowych i zapisywania ich
47 Summary: API documentation for Python testpath module
48 Summary(pl.UTF-8): Dokumentacja API modułu Pythona testpath
52 API documentation for Python testpath module.
54 %description apidocs -l pl.UTF-8
55 Dokumentacja API modułu Pythona testpath.
58 %setup -q -n testpath-%{version}
62 from setuptools import setup
66 # until we have flit...
67 # (extracted from pyproject.toml - keep in sync!)
68 cat >setup.cfg <<'EOF'
72 description = Test utilities for code working with files and commands
73 author = Jupyter Development Team
74 author_email = jupyter@googlegroups.com
76 license_file = LICENSE
78 Intended Audience :: Developers
79 License :: OSI Approved :: BSD License
80 Programming Language :: Python
81 Programming Language :: Python :: 3
82 Topic :: Software Development :: Testing
85 python_requires = >=3.5
92 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
93 %{__python3} -m pytest tests
97 %{__make} -C doc html \
98 SPHINXBUILD=sphinx-build-3
102 rm -rf $RPM_BUILD_ROOT
107 rm -rf $RPM_BUILD_ROOT
110 %defattr(644,root,root,755)
111 %doc LICENSE README.rst
112 %{py3_sitescriptdir}/testpath
113 %{py3_sitescriptdir}/testpath-%{version}-py*.egg-info
117 %defattr(644,root,root,755)
118 %doc doc/_build/html/{_static,*.html,*.js}