]> git.pld-linux.org Git - SPECS.git/blob - python-fixtures.spec
SPECS updated Sat 31 Jul 21:27:02 CEST 2021
[SPECS.git] / python-fixtures.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
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:        3.0.0
11 Release:        5
12 License:        Apache v2.0 or BSD
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/fixtures/
15 Source0:        https://files.pythonhosted.org/packages/source/f/fixtures/fixtures-%{version}.tar.gz
16 # Source0-md5:  cd6345b497a62fad739efee66346c2e0
17 Patch0:         %{name}-mock.patch
18 URL:            https://pypi.org/project/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 %if "%{py_ver}" >= "2.7"
43 Requires:       python-modules >= 1:2.7
44 %else
45 Requires:       python-modules >= 1:2.6
46 Requires:       python-unittest2
47 %endif
48 BuildArch:      noarch
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %description
52 Fixtures defines a Python contract for reusable state/support logic,
53 primarily for unit testing. Helper and adaption logic is included to
54 make it easy to write your own fixtures using the fixtures contract.
55 Glue code is provided that makes using fixtures that meet the Fixtures
56 contract in unittest compatible test cases easy and straight forward.
57
58 %description -l pl.UTF-8
59 Moduł fixtures (wyposażenie) definiuje pythonowy kontrakt dla stanu
60 wielokrotnego użytku i logiki wspierającej, służące głównie do testów
61 jednostkowych. Dołączona jest logika pomocnicza i adaptująca, mająca
62 na celu ułatwienie pisania własnego wyposażenia przy użyciu kontraktu
63 fixtures. Zapewniony jest kod sklejający, pozwalający na łatwe i
64 proste tworzenie wyposażenia spełniającego kontrakt fixtures w
65 przypadkach testowych zgodnych z modułem unittest.
66
67 %package -n python3-fixtures
68 Summary:        Fixtures, reusable state for writing clean tests and more
69 Summary(pl.UTF-8):      Wyposażenie testów - stan wielokrotnego użytku pozwalający na pisanie czystych testów
70 Group:          Libraries/Python
71 Requires:       python3-modules >= 1:3.3
72
73 %description -n python3-fixtures
74 Fixtures defines a Python contract for reusable state/support logic,
75 primarily for unit testing. Helper and adaption logic is included to
76 make it easy to write your own fixtures using the fixtures contract.
77 Glue code is provided that makes using fixtures that meet the Fixtures
78 contract in unittest compatible test cases easy and straight forward.
79
80 %description -n python3-fixtures -l pl.UTF-8
81 Moduł fixtures (wyposażenie) definiuje pythonowy kontrakt dla stanu
82 wielokrotnego użytku i logiki wspierającej, służące głównie do testów
83 jednostkowych. Dołączona jest logika pomocnicza i adaptująca, mająca
84 na celu ułatwienie pisania własnego wyposażenia przy użyciu kontraktu
85 fixtures. Zapewniony jest kod sklejający, pozwalający na łatwe i
86 proste tworzenie wyposażenia spełniającego kontrakt fixtures w
87 przypadkach testowych zgodnych z modułem unittest.
88
89 %prep
90 %setup -q -n fixtures-%{version}
91 %patch0 -p1
92
93 %build
94 %if %{with python2}
95 %py_build
96
97 %if %{with tests}
98 %{__python} -m testtools.run fixtures.test_suite
99 %endif
100 %endif
101
102 %if %{with python3}
103 %py3_build
104
105 %if %{with tests}
106 %{__python3} -m testtools.run fixtures.test_suite
107 %endif
108 %endif
109
110 %install
111 rm -rf $RPM_BUILD_ROOT
112
113 %if %{with python2}
114 %py_install
115
116 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/fixtures/tests
117 %py_postclean
118 %endif
119
120 %if %{with python3}
121 %py3_install
122
123 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/fixtures/tests
124 %endif
125
126 %clean
127 rm -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.090819 seconds and 3 git commands to generate.