]> git.pld-linux.org Git - packages/python-fixtures.git/blame - python-fixtures.spec
- release 5 (by relup.sh)
[packages/python-fixtures.git] / python-fixtures.spec
CommitLineData
32b21be0
JB
1#
2# Conditional build:
4e4901ee 3%bcond_without tests # unit tests
32b21be0
JB
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7Summary: Fixtures, reusable state for writing clean tests and more
75507522 8Summary(pl.UTF-8): Wyposażenie testów - stan wielokrotnego użytku pozwalający na pisanie czystych testów
32b21be0 9Name: python-fixtures
72f966aa 10Version: 3.0.0
98949074 11Release: 5
32b21be0
JB
12License: Apache v2.0 or BSD
13Group: Libraries/Python
f0eb6a82 14#Source0Download: https://pypi.org/simple/fixtures/
72f966aa
JB
15Source0: https://files.pythonhosted.org/packages/source/f/fixtures/fixtures-%{version}.tar.gz
16# Source0-md5: cd6345b497a62fad739efee66346c2e0
641b3e7c 17Patch0: %{name}-mock.patch
f0eb6a82 18URL: https://pypi.org/project/fixtures/
32b21be0
JB
19BuildRequires: rpm-pythonprov
20BuildRequires: rpmbuild(macros) >= 1.714
21%if %{with python2}
22BuildRequires: python-modules >= 1:2.6
23BuildRequires: python-pbr >= 0.11
24BuildRequires: python-setuptools
25%if %{with tests}
26BuildRequires: python-mock
27BuildRequires: python-six
641b3e7c 28BuildRequires: python-testrepository
32b21be0
JB
29BuildRequires: python-testtools >= 0.9.22
30%endif
31%endif
32%if %{with python3}
641b3e7c 33BuildRequires: python3-modules >= 1:3.3
32b21be0
JB
34BuildRequires: python3-pbr >= 0.11
35BuildRequires: python3-setuptools
36%if %{with tests}
32b21be0 37BuildRequires: python3-six
641b3e7c 38BuildRequires: python3-testrepository
32b21be0
JB
39BuildRequires: python3-testtools >= 0.9.22
40%endif
41%endif
32b21be0
JB
42%if "%{py_ver}" >= "2.7"
43Requires: python-modules >= 1:2.7
44%else
45Requires: python-modules >= 1:2.6
46Requires: python-unittest2
47%endif
48BuildArch: noarch
49BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51%description
52Fixtures defines a Python contract for reusable state/support logic,
53primarily for unit testing. Helper and adaption logic is included to
54make it easy to write your own fixtures using the fixtures contract.
55Glue code is provided that makes using fixtures that meet the Fixtures
56contract in unittest compatible test cases easy and straight forward.
57
58%description -l pl.UTF-8
75507522 59Moduł fixtures (wyposażenie) definiuje pythonowy kontrakt dla stanu
32b21be0
JB
60wielokrotnego użytku i logiki wspierającej, służące głównie do testów
61jednostkowych. Dołączona jest logika pomocnicza i adaptująca, mająca
75507522 62na celu ułatwienie pisania własnego wyposażenia przy użyciu kontraktu
32b21be0 63fixtures. Zapewniony jest kod sklejający, pozwalający na łatwe i
75507522 64proste tworzenie wyposażenia spełniającego kontrakt fixtures w
32b21be0
JB
65przypadkach testowych zgodnych z modułem unittest.
66
67%package -n python3-fixtures
68Summary: Fixtures, reusable state for writing clean tests and more
75507522 69Summary(pl.UTF-8): Wyposażenie testów - stan wielokrotnego użytku pozwalający na pisanie czystych testów
32b21be0 70Group: Libraries/Python
641b3e7c 71Requires: python3-modules >= 1:3.3
32b21be0
JB
72
73%description -n python3-fixtures
74Fixtures defines a Python contract for reusable state/support logic,
75primarily for unit testing. Helper and adaption logic is included to
76make it easy to write your own fixtures using the fixtures contract.
77Glue code is provided that makes using fixtures that meet the Fixtures
78contract in unittest compatible test cases easy and straight forward.
79
80%description -n python3-fixtures -l pl.UTF-8
75507522 81Moduł fixtures (wyposażenie) definiuje pythonowy kontrakt dla stanu
32b21be0
JB
82wielokrotnego użytku i logiki wspierającej, służące głównie do testów
83jednostkowych. Dołączona jest logika pomocnicza i adaptująca, mająca
75507522 84na celu ułatwienie pisania własnego wyposażenia przy użyciu kontraktu
32b21be0 85fixtures. Zapewniony jest kod sklejający, pozwalający na łatwe i
75507522 86proste tworzenie wyposażenia spełniającego kontrakt fixtures w
32b21be0
JB
87przypadkach testowych zgodnych z modułem unittest.
88
89%prep
90%setup -q -n fixtures-%{version}
641b3e7c 91%patch0 -p1
32b21be0
JB
92
93%build
94%if %{with python2}
4e4901ee 95%py_build
641b3e7c 96
4e4901ee
JB
97%if %{with tests}
98%{__python} -m testtools.run fixtures.test_suite
99%endif
32b21be0
JB
100%endif
101
102%if %{with python3}
4e4901ee 103%py3_build
641b3e7c 104
4e4901ee
JB
105%if %{with tests}
106%{__python3} -m testtools.run fixtures.test_suite
107%endif
32b21be0
JB
108%endif
109
110%install
111rm -rf $RPM_BUILD_ROOT
112
113%if %{with python2}
114%py_install
115
4e4901ee 116%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/fixtures/tests
32b21be0
JB
117%py_postclean
118%endif
119
120%if %{with python3}
121%py3_install
4e4901ee
JB
122
123%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/fixtures/tests
32b21be0
JB
124%endif
125
126%clean
127rm -rf $RPM_BUILD_ROOT
128
129%if %{with python2}
130%files
131%defattr(644,root,root,755)
132%doc AUTHORS BSD COPYING ChangeLog GOALS NEWS README
133%{py_sitescriptdir}/fixtures
134%{py_sitescriptdir}/fixtures-%{version}-py*.egg-info
135%endif
136
137%if %{with python3}
138%files -n python3-fixtures
139%defattr(644,root,root,755)
140%doc AUTHORS BSD COPYING ChangeLog GOALS NEWS README
141%{py3_sitescriptdir}/fixtures
142%{py3_sitescriptdir}/fixtures-%{version}-py*.egg-info
143%endif
This page took 0.166593 seconds and 4 git commands to generate.