3 %bcond_without doc # Sphinx documentation
4 %bcond_without tests # unit tests
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 Summary: Fake file system that mocks the Python 2 file system modules
9 Summary(pl.UTF-8): Fałszywy system plików będący atrapą modułów systemowych Pythona 2 dla plików
14 Group: Libraries/Python
15 #Source0Download: https://github.com/jmcgeheeiv/pyfakefs/releases
16 Source0: https://github.com/jmcgeheeiv/pyfakefs/archive/v%{version}/pyfakefs-%{version}.tar.gz
17 # Source0-md5: bfd4362f7942333ce2666f9f0110e584
18 Patch0: %{name}-tests.patch
19 URL: http://pyfakefs.org/
20 BuildRequires: rpm-pythonprov
21 BuildRequires: rpmbuild(macros) >= 1.714
22 %{?with_doc:BuildRequires: sphinx-pdg >= 1.0}
24 BuildRequires: python-modules >= 1:2.7
25 %{?with_tests:BuildRequires: python-pytest >= 2.8.6}
26 BuildRequires: python-setuptools
29 BuildRequires: python3-modules >= 1:3.3
30 %{?with_tests:BuildRequires: python3-pytest >= 2.8.6}
31 BuildRequires: python3-setuptools
33 Requires: python-modules >= 1:2.7
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 pyfakefs implements a fake file system that mocks the Python file
39 system modules. Using pyfakefs, your tests operate on a fake file
40 system in memory without touching the real disk. The software under
41 test requires no modification to work with pyfakefs.
43 %description -l pl.UTF-8
44 pyfakefs implementuje fałszywy system plików, będący atrapą dla
45 modułów systemowych Pythona dla plików. Przy użyciu pyfakefs testy
46 operują na fałszywym systemie plików w pamięci, bez dotykania
47 prawdziwego dysku. Testowane oprogramowanie nie wymaga modyfikacji,
48 aby działało z pyfakefs.
50 %package -n python3-pyfakefs
51 Summary: Fake file system that mocks the Python 3 file system modules
52 Summary(pl.UTF-8): Fałszywy system plików będący atrapą modułów systemowych Pythona 3 dla plików
53 Group: Libraries/Python
54 Requires: python3-modules >= 1:3.3
56 %description -n python3-pyfakefs
57 pyfakefs implements a fake file system that mocks the Python file
58 system modules. Using pyfakefs, your tests operate on a fake file
59 system in memory without touching the real disk. The software under
60 test requires no modification to work with pyfakefs.
62 %description -n python3-pyfakefs -l pl.UTF-8
63 pyfakefs implementuje fałszywy system plików, będący atrapą dla
64 modułów systemowych Pythona dla plików. Przy użyciu pyfakefs testy
65 operują na fałszywym systemie plików w pamięci, bez dotykania
66 prawdziwego dysku. Testowane oprogramowanie nie wymaga modyfikacji,
67 aby działało z pyfakefs.
70 Summary: API documentation for Python pyfakefs module
71 Summary(pl.UTF-8): Dokumentacja API modułu Pythona pyfakefs
75 API documentation for Pythona pyfakefs module.
77 %description apidocs -l pl.UTF-8
78 Dokumentacja API modułu Pythona pyfakefs.
81 %setup -q -n pyfakefs-%{version}
90 %{__python} -m tests.all_tests
91 PYTHONPATH=$(pwd)/build-2/lib PYTEST_PLUGINS=pyfakefs.pytest_plugin \
92 py.test-2 tests/pytest_plugin_test.py
100 %{__python3} -m tests.all_tests
101 PYTHONPATH=$(pwd)/build-3/lib PYTEST_PLUGINS=pyfakefs.pytest_plugin \
102 py.test-3 tests/pytest_plugin_test.py
107 %{__make} -C docs html
111 rm -rf $RPM_BUILD_ROOT
124 rm -rf $RPM_BUILD_ROOT
128 %defattr(644,root,root,755)
129 %doc CHANGES.md README.md
130 %{py_sitescriptdir}/pyfakefs
131 %{py_sitescriptdir}/pyfakefs-%{version}-py*.egg-info
135 %files -n python3-pyfakefs
136 %defattr(644,root,root,755)
137 %doc CHANGES.md README.md
138 %{py3_sitescriptdir}/pyfakefs
139 %{py3_sitescriptdir}/pyfakefs-%{version}-py*.egg-info
144 %defattr(644,root,root,755)
145 %doc gh-pages/{_static,*.html,*.js}