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