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: 82a7decddd919da996b34d4a8de4ca72
16 URL: http://pyfakefs.org/
17 BuildRequires: python3-modules >= 1:3.5
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 >= 1.0}
29 Requires: python3-modules >= 1:3.5
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}
61 #export LC_ALL=C.UTF-8
65 %{__python3} -m pyfakefs.tests.all_tests
66 %{__python3} -m pyfakefs.tests.all_tests_without_extra_packages
69 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
70 PYTEST_PLUGINS=pyfakefs.pytest_plugin \
71 %{__python3} -m pytest \
72 pyfakefs/pytest_tests/pytest_fixture_test.py \
73 pyfakefs/pytest_tests/pytest_plugin_test.py
76 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
77 PYTEST_PLUGINS=pyfakefs.pytest_plugin \
78 %{__python3} -m pytest \
79 pyfakefs/pytest_tests/pytest_plugin_failing_test.py > testresult.txt || :
80 %{__python3} -m pytest \
81 pyfakefs/pytest_tests/pytest_check_failed_plugin_test.py
85 %{__make} -C docs html
89 rm -rf $RPM_BUILD_ROOT
94 rm -rf $RPM_BUILD_ROOT
97 %defattr(644,root,root,755)
98 %doc CHANGES.md README.md
99 %{py3_sitescriptdir}/pyfakefs
100 %{py3_sitescriptdir}/pyfakefs-%{version}-py*.egg-info
104 %defattr(644,root,root,755)
105 %doc gh-pages/{_static,*.html,*.js}