3 %bcond_without doc # Sphinx documentation
4 %bcond_without tests # unit tests
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
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
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
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
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.
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.
47 Summary: API documentation for Python pyfakefs module
48 Summary(pl.UTF-8): Dokumentacja API modułu Pythona pyfakefs
52 API documentation for Pythona pyfakefs module.
54 %description apidocs -l pl.UTF-8
55 Dokumentacja API modułu Pythona pyfakefs.
58 %setup -q -n pyfakefs-%{version}
64 %{__python3} -m pyfakefs.tests.all_tests
65 %{__python3} -m pyfakefs.tests.all_tests_without_extra_packages
68 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
69 PYTEST_PLUGINS=pyfakefs.pytest_plugin \
70 %{__python3} -m pytest \
71 pyfakefs/pytest_tests/pytest_plugin_test.py
75 %{__make} -C docs html \
76 SPHINXBUILD=sphinx-build-3
80 rm -rf $RPM_BUILD_ROOT
85 rm -rf $RPM_BUILD_ROOT
88 %defattr(644,root,root,755)
89 %doc CHANGES.md README.md
90 %{py3_sitescriptdir}/pyfakefs
91 %{py3_sitescriptdir}/pyfakefs-%{version}-py*.egg-info
95 %defattr(644,root,root,755)
96 %doc gh-pages/{_static,*.html,*.js}