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