]> git.pld-linux.org Git - packages/python3-pyfakefs.git/blob - python3-pyfakefs.spec
- updated to 4.5.6
[packages/python3-pyfakefs.git] / python3-pyfakefs.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5
6 Summary:        Fake file system that mocks the Python 3 file system modules
7 Summary(pl.UTF-8):      Fałszywy system plików będący atrapą modułów systemowych Pythona 3 dla plików
8 Name:           python3-pyfakefs
9 Version:        4.5.6
10 Release:        1
11 License:        Apache v2.0
12 Group:          Libraries/Python
13 #Source0Download: https://github.com/jmcgeheeiv/pyfakefs/releases
14 Source0:        https://github.com/jmcgeheeiv/pyfakefs/archive/v%{version}/pyfakefs-%{version}.tar.gz
15 # Source0-md5:  1bba55441b8108284c04f5833ccea1d6
16 URL:            http://pyfakefs.org/
17 BuildRequires:  python3-modules >= 1:3.6
18 BuildRequires:  python3-setuptools
19 %if %{with tests}
20 BuildRequires:  python3-pytest >= 2.8.6
21 %if "%{py3_ver}" < "3.6"
22 BuildRequires:  python3-pathlib2 >= 2.3.2
23 BuildRequires:  python3-scandir >= 1.8
24 %endif
25 %endif
26 BuildRequires:  rpm-pythonprov
27 BuildRequires:  rpmbuild(macros) >= 1.714
28 %{?with_doc:BuildRequires:      sphinx-pdg-3 >= 1.0}
29 Requires:       python3-modules >= 1:3.6
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 pyfakefs implements a fake file system that mocks the Python file
35 system modules. Using pyfakefs, your tests operate on a fake file
36 system in memory without touching the real disk. The software under
37 test requires no modification to work with pyfakefs.
38
39 %description -l pl.UTF-8
40 pyfakefs implementuje fałszywy system plików, będący atrapą dla
41 modułów systemowych Pythona dla plików. Przy użyciu pyfakefs testy
42 operują na fałszywym systemie plików w pamięci, bez dotykania
43 prawdziwego dysku. Testowane oprogramowanie nie wymaga modyfikacji,
44 aby działało z pyfakefs.
45
46 %package apidocs
47 Summary:        API documentation for Python pyfakefs module
48 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona pyfakefs
49 Group:          Documentation
50
51 %description apidocs
52 API documentation for Pythona pyfakefs module.
53
54 %description apidocs -l pl.UTF-8
55 Dokumentacja API modułu Pythona pyfakefs.
56
57 %prep
58 %setup -q -n pyfakefs-%{version}
59
60 %build
61 %py3_build
62
63 %if %{with tests}
64 %{__python3} -m pyfakefs.tests.all_tests
65 %{__python3} -m pyfakefs.tests.all_tests_without_extra_packages
66
67 PYTHONPATH=$(pwd) \
68 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
69 PYTEST_PLUGINS=pyfakefs.pytest_plugin \
70 %{__python3} -m pytest \
71         pyfakefs/pytest_tests/pytest_plugin_test.py
72 %endif
73
74 %if %{with doc}
75 %{__make} -C docs html \
76         SPHINXBUILD=sphinx-build-3
77 %endif
78
79 %install
80 rm -rf $RPM_BUILD_ROOT
81
82 %py3_install
83
84 %clean
85 rm -rf $RPM_BUILD_ROOT
86
87 %files
88 %defattr(644,root,root,755)
89 %doc CHANGES.md README.md
90 %{py3_sitescriptdir}/pyfakefs
91 %{py3_sitescriptdir}/pyfakefs-%{version}-py*.egg-info
92
93 %if %{with doc}
94 %files apidocs
95 %defattr(644,root,root,755)
96 %doc gh-pages/{_static,*.html,*.js}
97 %endif
This page took 0.05067 seconds and 3 git commands to generate.