]> git.pld-linux.org Git - packages/python3-testpath.git/blame - python3-testpath.spec
rebuild with tests and docs
[packages/python3-testpath.git] / python3-testpath.spec
CommitLineData
23b43377
JB
1#
2# Conditional build:
3%bcond_without doc # Sphinx documentation
4%bcond_without tests # unit tests
23b43377
JB
5
6Summary: Test utilities for code working with files and commands
7Summary(pl.UTF-8): Narzędzia testowe dla kodu działającego na plikach i poleceniach
5a4603a2
JB
8Name: python3-testpath
9Version: 0.6.0
6075815b 10Release: 3
23b43377
JB
11License: BSD
12Group: Libraries/Python
13#Source0Download: https://pypi.org/simple/testpath/
14Source0: https://files.pythonhosted.org/packages/source/t/testpath/testpath-%{version}.tar.gz
5a4603a2 15# Source0-md5: 9fd4339f76da12d15bc718e4aa2566e9
23b43377 16URL: https://pypi.org/project/testpath/
23b43377 17BuildRequires: python3-modules >= 1:3.5
5a4603a2 18BuildRequires: python3-setuptools
23b43377
JB
19%if %{with tests}
20BuildRequires: python3-pytest
21%endif
23b43377
JB
22BuildRequires: rpm-pythonprov
23BuildRequires: rpmbuild(macros) >= 1.714
24%if %{with doc}
5a4603a2 25BuildRequires: sphinx-pdg-3
23b43377 26%endif
5a4603a2 27Requires: python3-modules >= 1:3.5
23b43377
JB
28BuildArch: noarch
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%description
32Testpath is a collection of utilities for Python code working with
33files and commands.
34
35It contains functions to check things on the filesystem, and tools for
36mocking system commands and recording calls to those.
37
38%description -l pl.UTF-8
39Testpath to zbiór narzędzi dla kodu w Pythonie działającego na plikach
40i poleceniach.
41
42Zawiera funkcje do sprawdzania elementów w systemie plików oraz
43narzędzia do tworzenia atrap poleceń systemowych i zapisywania ich
44wywołań.
45
23b43377
JB
46%package apidocs
47Summary: API documentation for Python testpath module
48Summary(pl.UTF-8): Dokumentacja API modułu Pythona testpath
49Group: Documentation
50
51%description apidocs
52API documentation for Python testpath module.
53
54%description apidocs -l pl.UTF-8
55Dokumentacja API modułu Pythona testpath.
56
57%prep
58%setup -q -n testpath-%{version}
59
5a4603a2
JB
60# setuptools stub
61cat >setup.py <<EOF
62from setuptools import setup
63setup()
64EOF
65
66# until we have flit...
67# (extracted from pyproject.toml - keep in sync!)
68cat >setup.cfg <<'EOF'
69[metadata]
70name = testpath
71version = %{version}
72description = Test utilities for code working with files and commands
73author = Jupyter Development Team
74author_email = jupyter@googlegroups.com
75license = BSD
76license_file = LICENSE
77classifiers =
78 Intended Audience :: Developers
79 License :: OSI Approved :: BSD License
80 Programming Language :: Python
81 Programming Language :: Python :: 3
82 Topic :: Software Development :: Testing
83[options]
84packages = testpath
85python_requires = >=3.5
86EOF
23b43377 87
5a4603a2 88%build
23b43377
JB
89%py3_build
90
91%if %{with tests}
5a4603a2 92PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
23b43377
JB
93%{__python3} -m pytest tests
94%endif
23b43377
JB
95
96%if %{with doc}
5a4603a2
JB
97%{__make} -C doc html \
98 SPHINXBUILD=sphinx-build-3
23b43377
JB
99%endif
100
101%install
102rm -rf $RPM_BUILD_ROOT
103
23b43377 104%py3_install
23b43377
JB
105
106%clean
107rm -rf $RPM_BUILD_ROOT
108
23b43377
JB
109%files
110%defattr(644,root,root,755)
111%doc LICENSE README.rst
23b43377
JB
112%{py3_sitescriptdir}/testpath
113%{py3_sitescriptdir}/testpath-%{version}-py*.egg-info
23b43377
JB
114
115%if %{with doc}
116%files apidocs
117%defattr(644,root,root,755)
118%doc doc/_build/html/{_static,*.html,*.js}
119%endif
This page took 0.086897 seconds and 4 git commands to generate.