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: 8044a683bc025c0e2b2594b7d8de1083
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 %{?with_tests:BuildRequires: python-scandir}
27 BuildRequires: python-setuptools
30 BuildRequires: python3-modules >= 1:3.3
31 %{?with_tests:BuildRequires: python3-pytest >= 2.8.6}
32 BuildRequires: python3-setuptools
34 Requires: python-modules >= 1:2.7
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 pyfakefs implements a fake file system that mocks the Python file
40 system modules. Using pyfakefs, your tests operate on a fake file
41 system in memory without touching the real disk. The software under
42 test requires no modification to work with pyfakefs.
44 %description -l pl.UTF-8
45 pyfakefs implementuje fałszywy system plików, będący atrapą dla
46 modułów systemowych Pythona dla plików. Przy użyciu pyfakefs testy
47 operują na fałszywym systemie plików w pamięci, bez dotykania
48 prawdziwego dysku. Testowane oprogramowanie nie wymaga modyfikacji,
49 aby działało z pyfakefs.
51 %package -n python3-pyfakefs
52 Summary: Fake file system that mocks the Python 3 file system modules
53 Summary(pl.UTF-8): Fałszywy system plików będący atrapą modułów systemowych Pythona 3 dla plików
54 Group: Libraries/Python
55 Requires: python3-modules >= 1:3.3
57 %description -n python3-pyfakefs
58 pyfakefs implements a fake file system that mocks the Python file
59 system modules. Using pyfakefs, your tests operate on a fake file
60 system in memory without touching the real disk. The software under
61 test requires no modification to work with pyfakefs.
63 %description -n python3-pyfakefs -l pl.UTF-8
64 pyfakefs implementuje fałszywy system plików, będący atrapą dla
65 modułów systemowych Pythona dla plików. Przy użyciu pyfakefs testy
66 operują na fałszywym systemie plików w pamięci, bez dotykania
67 prawdziwego dysku. Testowane oprogramowanie nie wymaga modyfikacji,
68 aby działało z pyfakefs.
71 Summary: API documentation for Python pyfakefs module
72 Summary(pl.UTF-8): Dokumentacja API modułu Pythona pyfakefs
76 API documentation for Pythona pyfakefs module.
78 %description apidocs -l pl.UTF-8
79 Dokumentacja API modułu Pythona pyfakefs.
82 %setup -q -n pyfakefs-%{version}
91 %{__python} -m pyfakefs.tests.all_tests
92 PYTHONPATH=$(pwd)/build-2/lib PYTEST_PLUGINS=pyfakefs.pytest_plugin \
93 py.test-2 build-2/lib/pyfakefs/tests/pytest_plugin_test.py
101 %{__python3} -m pyfakefs.tests.all_tests
102 PYTHONPATH=$(pwd)/build-3/lib PYTEST_PLUGINS=pyfakefs.pytest_plugin \
103 py.test-3 build-3/lib/pyfakefs/tests/pytest_plugin_test.py
108 %{__make} -C docs html
112 rm -rf $RPM_BUILD_ROOT
125 rm -rf $RPM_BUILD_ROOT
129 %defattr(644,root,root,755)
130 %doc CHANGES.md README.md
131 %{py_sitescriptdir}/pyfakefs
132 %{py_sitescriptdir}/pyfakefs-%{version}-py*.egg-info
136 %files -n python3-pyfakefs
137 %defattr(644,root,root,755)
138 %doc CHANGES.md README.md
139 %{py3_sitescriptdir}/pyfakefs
140 %{py3_sitescriptdir}/pyfakefs-%{version}-py*.egg-info
145 %defattr(644,root,root,755)
146 %doc gh-pages/{_static,*.html,*.js}