]> git.pld-linux.org Git - packages/python-pyfakefs.git/blame - python-pyfakefs.spec
- up to 3.4.3
[packages/python-pyfakefs.git] / python-pyfakefs.spec
CommitLineData
792227e6
JB
1#
2# Conditional build:
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
7
8Summary: Fake file system that mocks the Python 2 file system modules
9Summary(pl.UTF-8): Fałszywy system plików będący atrapą modułów systemowych Pythona 2 dla plików
10Name: python-pyfakefs
08eb5322
AM
11Version: 3.4.3
12Release: 1
792227e6
JB
13License: Apache v2.0
14Group: Libraries/Python
15#Source0Download: https://github.com/jmcgeheeiv/pyfakefs/releases
16Source0: https://github.com/jmcgeheeiv/pyfakefs/archive/v%{version}/pyfakefs-%{version}.tar.gz
08eb5322 17# Source0-md5: 8044a683bc025c0e2b2594b7d8de1083
792227e6
JB
18Patch0: %{name}-tests.patch
19URL: http://pyfakefs.org/
20BuildRequires: rpm-pythonprov
21BuildRequires: rpmbuild(macros) >= 1.714
22%{?with_doc:BuildRequires: sphinx-pdg >= 1.0}
23%if %{with python2}
24BuildRequires: python-modules >= 1:2.7
25%{?with_tests:BuildRequires: python-pytest >= 2.8.6}
6a0c7f72 26%{?with_tests:BuildRequires: python-scandir}
792227e6
JB
27BuildRequires: python-setuptools
28%endif
29%if %{with python3}
30BuildRequires: python3-modules >= 1:3.3
31%{?with_tests:BuildRequires: python3-pytest >= 2.8.6}
32BuildRequires: python3-setuptools
33%endif
34Requires: python-modules >= 1:2.7
35BuildArch: noarch
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38%description
39pyfakefs implements a fake file system that mocks the Python file
40system modules. Using pyfakefs, your tests operate on a fake file
41system in memory without touching the real disk. The software under
42test requires no modification to work with pyfakefs.
43
44%description -l pl.UTF-8
45pyfakefs implementuje fałszywy system plików, będący atrapą dla
46modułów systemowych Pythona dla plików. Przy użyciu pyfakefs testy
47operują na fałszywym systemie plików w pamięci, bez dotykania
48prawdziwego dysku. Testowane oprogramowanie nie wymaga modyfikacji,
49aby działało z pyfakefs.
50
51%package -n python3-pyfakefs
52Summary: Fake file system that mocks the Python 3 file system modules
53Summary(pl.UTF-8): Fałszywy system plików będący atrapą modułów systemowych Pythona 3 dla plików
54Group: Libraries/Python
55Requires: python3-modules >= 1:3.3
56
57%description -n python3-pyfakefs
58pyfakefs implements a fake file system that mocks the Python file
59system modules. Using pyfakefs, your tests operate on a fake file
60system in memory without touching the real disk. The software under
61test requires no modification to work with pyfakefs.
62
63%description -n python3-pyfakefs -l pl.UTF-8
64pyfakefs implementuje fałszywy system plików, będący atrapą dla
65modułów systemowych Pythona dla plików. Przy użyciu pyfakefs testy
66operują na fałszywym systemie plików w pamięci, bez dotykania
67prawdziwego dysku. Testowane oprogramowanie nie wymaga modyfikacji,
68aby działało z pyfakefs.
69
70%package apidocs
71Summary: API documentation for Python pyfakefs module
72Summary(pl.UTF-8): Dokumentacja API modułu Pythona pyfakefs
73Group: Documentation
74
75%description apidocs
76API documentation for Pythona pyfakefs module.
77
78%description apidocs -l pl.UTF-8
79Dokumentacja API modułu Pythona pyfakefs.
80
81%prep
82%setup -q -n pyfakefs-%{version}
83%patch0 -p1
84
85%build
86export LC_ALL=C.UTF-8
87%if %{with python2}
88%py_build
89
90%if %{with tests}
08eb5322 91%{__python} -m pyfakefs.tests.all_tests
792227e6 92PYTHONPATH=$(pwd)/build-2/lib PYTEST_PLUGINS=pyfakefs.pytest_plugin \
08eb5322 93py.test-2 build-2/lib/pyfakefs/tests/pytest_plugin_test.py
792227e6
JB
94%endif
95%endif
96
97%if %{with python3}
98%py3_build
99
100%if %{with tests}
08eb5322 101%{__python3} -m pyfakefs.tests.all_tests
792227e6 102PYTHONPATH=$(pwd)/build-3/lib PYTEST_PLUGINS=pyfakefs.pytest_plugin \
08eb5322 103py.test-3 build-3/lib/pyfakefs/tests/pytest_plugin_test.py
792227e6
JB
104%endif
105%endif
106
107%if %{with doc}
108%{__make} -C docs html
109%endif
110
111%install
112rm -rf $RPM_BUILD_ROOT
113
114%if %{with python2}
115%py_install
116
117%py_postclean
118%endif
119
120%if %{with python3}
121%py3_install
122%endif
123
124%clean
125rm -rf $RPM_BUILD_ROOT
126
127%if %{with python2}
128%files
129%defattr(644,root,root,755)
130%doc CHANGES.md README.md
131%{py_sitescriptdir}/pyfakefs
132%{py_sitescriptdir}/pyfakefs-%{version}-py*.egg-info
133%endif
134
135%if %{with python3}
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
141%endif
142
143%if %{with doc}
144%files apidocs
145%defattr(644,root,root,755)
146%doc gh-pages/{_static,*.html,*.js}
147%endif
This page took 0.037581 seconds and 4 git commands to generate.