forked from psss/python-nitrate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
python-nitrate.spec
344 lines (305 loc) · 13.1 KB
/
python-nitrate.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
Name: python-nitrate
Version: 1.5
Release: 4%{?dist}
Summary: Python API for the Nitrate test case management system
License: LGPLv2+
URL: https://github.com/psss/python-nitrate
Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.bz2
# Depending on the distro, we set some defaults.
# Note that the bcond macros are named for the CLI option they create.
# "%%bcond_without" means "ENABLE by default and create a --without option"
# Fedora or RHEL 8+
%if 0%{?fedora} || 0%{?rhel} > 7
%bcond_with oldreqs
%bcond_with englocale
%else
# The automatic runtime dependency generator doesn't exist yet
%bcond_without oldreqs
# The C.UTF-8 locale doesn't exist, Python defaults to C (ASCII)
%bcond_without englocale
%endif
# For older Fedora and RHEL build python2-nitrate as well
%if 0%{?fedora} > 31 || 0%{?rhel} > 7
%bcond_with python2
%else
%bcond_without python2
%endif
BuildArch: noarch
BuildRequires: git-core
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-six
%if %{with python2}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-six
%endif
%{?python_enable_dependency_generator}
%global _description %{expand:
A Python interface to the Nitrate test case management system.
The package consists of a high-level Python module (provides
natural object interface), a low-level driver (allows to directly
access Nitrate XMLRPC API) and a command line interpreter (useful
for fast debugging and experimenting).}
%description %_description
# Python 2
%if %{with python2}
%package -n python2-nitrate
Summary: %{summary}
%{?python_provide:%python_provide python2-nitrate}
%if %{with oldreqs}
%if 0%{?rhel} > 7
Requires: python2-gssapi
Requires: python2-psycopg2
%else
Requires: python-gssapi
Requires: python-psycopg2
%endif
Requires: python2-six
%endif
%description -n python2-nitrate %_description
%endif
# Python 3
%package -n python%{python3_pkgversion}-nitrate
Summary: %{summary}
%{?python_provide:%python_provide python3-nitrate}
%if %{with oldreqs}
Requires: python%{python3_pkgversion}-gssapi
Requires: python%{python3_pkgversion}-psycopg2
Requires: python%{python3_pkgversion}-six
%endif
Conflicts: python2-nitrate < 1.5-3
%description -n python%{python3_pkgversion}-nitrate %_description
%prep
%autosetup -S git
%build
%if %{with englocale}
export LANG=en_US.utf-8
%endif
%if %{with python2}
%py2_build
%endif
%py3_build
%install
%if %{with englocale}
export LANG=en_US.utf-8
%endif
%if %{with python2}
%py2_install
%endif
%py3_install
mkdir -p %{buildroot}%{_mandir}/man1
install -pm 644 docs/*.1.gz %{buildroot}%{_mandir}/man1
# Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1335203
pathfix.py -pni "%{__python3} %{py3_shbang_opts}i" %{buildroot}%{_bindir}/nitrate
%if %{with python2}
%files -n python2-nitrate
%{python2_sitelib}/nitrate/
%{python2_sitelib}/nitrate-*.egg-info/
%license LICENSE
%endif
%files -n python%{python3_pkgversion}-nitrate
%{python3_sitelib}/nitrate/
%{python3_sitelib}/nitrate-*.egg-info/
%{_mandir}/man1/*
%{_bindir}/nitrate
%doc README examples
%license LICENSE
%changelog
* Thu Nov 21 2019 Petr Šplíchal <[email protected]> - 1.5-4
- Fix requires (no python2-gssapi and python2-psycopg2 in RHEL7).
- Enable automated python dependecies generator
* Wed Nov 20 2019 Petr Šplíchal <[email protected]> - 1.5-3
- For older releases build both python2 and python3 packages
- Include conflicting files only in the python3 package
* Mon Nov 11 2019 Petr Šplíchal <[email protected]> - 1.5-2
- Use py3_build and py3_install to simplify spec
- Rename and explicitly list the license file
- Remove group, fix license, add missing requires
* Mon Nov 04 2019 Martin Zeleny <[email protected]> 1.5-0
- Ported to Python 3
* Mon Nov 05 2018 Petr Šplíchal <[email protected]> 1.4-1
- Update specfile to new python packaging standards
- Performance improvement for TestPlan.sortkey
- Port to python-gssapi from pykerberos
- Make TestRun errata_id default to None
* Tue May 10 2016 Martin Frodl <[email protected]> 1.3-2
- Removed obsolete project page links
* Tue Feb 09 2016 Petr Šplíchal <[email protected]> 1.3-1
- Package nitrate for PyPI, several adjustments, docs update
- Better handle non-existent objects [BZ#1204028]
- Correctly handle no caseplan found [BZ#1171671]
- Typo fix in the TestPlan's _attributes [BZ#1304295]
- Make sure that PlanStatus id type is int
* Fri Aug 08 2014 Petr Šplíchal <[email protected]> 1.2-0
- Include example config in documentation [BZ#1098818]
- Handle duplicate entry errors gracefully [BZ#1112521]
- Added Aleš Zelinka to the list of contributors
* Sat May 17 2014 Petr Šplíchal <[email protected]> 1.1-0
- TestCase.{setup,action,effect,breakdown} attributes [BZ#1089039]
- Map automated/manual when searching test cases [BZ#1092464]
- Iterate over PlanRuns sorted by id/creation
- Indexing support for containers
- Separate methods for locking, handle corrupted cache
- Limit cache writing window (chance of corruption) [BZ#1091404]
- Ignore malformed and stale cache locks [BZ#1091404]
- Workaround Teiid problem with converting time [BZ#1093054]
* Fri Apr 11 2014 Petr Šplíchal <[email protected]> 1.0-0
- New stable version, see release notes for the list of changes
- http://psss.fedorapeople.org/python-nitrate/notes.html
* Wed Apr 09 2014 Petr Šplíchal <[email protected]> 0.15-0
- Single LOG_DATA level for data-related logs, docs cleanup
- Initialize all plan-case tags in CACHE_OBJECTS level
- Do not use log.error during object creation/init
- Raise exception when invalid Build name given
- Added link to the Copr repository
- Use object name for identifier if id is unknown
- Containers with uncached items should expire as well
- No all-items fetching for modified containers [BZ#1084563]
* Fri Apr 04 2014 Petr Šplíchal <[email protected]> 0.14-0
- Allow wiping cache of subclasses of given class
- Update TestRun's CaseRuns in MultiCall batches
- Import all containers into the main nitrate module
- Remove version from test-bed-prepare Product init
- Display warn message about locked persistent cache
- Document batch updates using Cache().update()
- Summary of new features added to release notes
- Add reference to release notes and individual module docs
- Custom formatter should return unicode messages
- Updated the create.py simple example code
- Test suite documentation update
- Use tag name for hashing to allow creating new tags
- Initial version of the release notes
* Thu Apr 03 2014 Petr Šplíchal <[email protected]> 0.13-0
- Give a summary of expired items for easier debugging
- Wake up only containers with already cached items
- New log.all() method for super-detailed logging
- Use singletons for Coloring and Caching configuration
- Use a single Cache instance for persistent cache handling
- Include minimal config example in the synopsis
- Use custom concise test results for python 2.7+ only
- New log level for Teiid, global constants for all levels
- Explicitly mention cache levels for environment variable
- Use Config class directly rather than through Nitrate
- Teiid requires python-psycopg2 for db connection
- Refactored the huge api module into several modules
- Explicitly mention the update() method in examples
- Ignore enter() and exit() when persistent caching off
* Wed Mar 26 2014 Petr Šplíchal <[email protected]> 0.12-0
- Disable PlanComponents test until BZ#866974 is fixed.
- Support for fetching data from a Teiid instance
- Simple locking for persistent cache implemented
- Support for string tags (backward-compatible)
- Use multicall for unlinking testcases from testplans
- Containers should iterate over sorted test cases
- Support for test case sortkey in test plans [BZ#869594]
- Improved logging for Container add/remove methods
- Internal utility function for idifying
- Cache.update() support for multicall slicing
- Status can be specified upon test case creation
- New utility function sliced() for cutting loafs
- Store the initial object dict for future use
- Setting arguments/requirement upon test case creation [BZ#1032259]
- Product property removed from the TestCase class [BZ#1076058]
- Special handling for comparison with None
- TestRun.caseruns and TestRun.testcases containers
- Cache setup only when needed, improved cleanup logging
- Make sure we always compare objects of the same type
- Improved container initialization when inject given
- TestPlan.testruns reimplemented using PlanRuns container
- More debugging output when expiring objects from cache
- Containers should always be read-only properties
- PlanComponents container implemented
* Fri Mar 7 2014 Petr Šplíchal <[email protected]> 0.11-0
- One year is good enough for never-expire limit
- Bugs reimplemented with containers and caching
- Wake up containers as sets of objects, not lists
- Use empty cache for objects not found in the cache file
- Identifier should show UNKNOWN when id not defined
- Set the default command line editing mode to vi
- Do not use root logger for nitrate logging [BZ#1060206]
- Use NitrateError class for raising exceptions instead of plain str
- Fix regression after version removal from product
- Container implementation status documented
- TestRun.started and TestRun.finished [BZ#957741]
- Better document the update() method [BZ#1004434]
- New attribute TestPlan.owner [BZ#954913]
- Move the default version from Product into TestPlan
- Version fetch cleanup & test improvements
- Use custom result format for unit tests
- Added TestCase.created attribute (creation date) [BZ#1008489]
* Wed Sep 25 2013 Petr Šplíchal <[email protected]> 0.10-0
- Add Filip Holec to the list of contributors
- Convert timedelta into a human readable format
- The Big Cleanup of Ininitialization and Caching
- New custom log levels for cache and xmlrpc
- Component should be among exported classes
- Added support for plain authentication
- Initialize color mode before caching
- Colored logging [BZ#965665]
- Handle attribute init and fetch timestamp reset at one place
- Test summary should report errors as well
- No need to load cache when testing
- Allow to clear cache for selected classes only
- Give an overall test summary at the end of testing
- Support cache expiration configuration for parent classes
- Improved auto-plural in listed() for words ending with 's'
- New utility function header() for printing simple headers
- Object fetching cleanup and improved _is_cached()
- Move server communication debugging to lower level
- New method Cache.update() for group updates
- Use temporary cache file for running the test suite
- Correctly handle modified objects with caching
- Fix problem with restoring containers from the cache
- Document logging with custom level, some cleanup
- Common identifier width handling
- Move constants to the top, expiration adjustments
- Persistent caching for all Container classes
- Container initialization
- Persistent cache implementation
- Common caching support in the Nitrate class
- Skip performance tests when in regular mode
- MultiCall support
- Tag class implementation
- Performance test cases
- Test bed prepare script
- Make the newline in info() optional
- Added support for performance tests (--performance)
- Allow short PlanType initialization by string
- Allow to set the reference link upon test case creation [BZ#843382]
* Mon Dec 10 2012 Petr Šplíchal <[email protected]> 0.9-0
- New function unlisted() for conversion from human readable list
- Clean up the cache before testing caching
- Fix test plan initialization by type name
- Rename test case components container to CaseComponents
- Implemented TestPlan.children property [BZ#863226]
- Allow to select cases when creating a new run [BZ#863480]
- Invalid category should raise Nitrate exception [BZ#862523]
- Implement PlanType using XMLRPC instead of hard coded values [BZ#841299]
- Cleanup of log, cache and color funtions
- Use unicode for logging where necessary [BZ#865033]
- Use unicode for logging in _setter() [BZ#865033]
- Sane unicode representation for user with no name [BZ#821629]
- Support for system-wide config in /etc/nitrate.conf [BZ#844363]
- Remove *.pyc files as well when cleaning
- Move global variables out of the functions
- Move utils tests into a separate class
- Document how to get a short Nitrate summary [BZ#883798]
- Push files to the production web only when in the master branch
- New TestCase reference link field [BZ#843382]
- Forgotten 'notes' in the list of test case attributes
- Don't forget to include errata id when creating a new test run
- Fix test run errata update, improve the self test
- Added errata field in class TestRun
- Suggest https in the minimal config example
- Test case automation flags cleanup
- Empty script or arguments to be handled same as None
- Smarter implementation of the listed() function
* Wed Feb 29 2012 Petr Šplíchal <[email protected]> - 0.8-0
- New method clear() for cleaning containers
- Component and Components class implementation
- Improved object initialization and id check
* Wed Feb 22 2012 Petr Šplíchal <[email protected]> - 0.7-2
- Fix url, directory ownership and preserve timestamps.
* Wed Feb 22 2012 Petr Šplíchal <[email protected]> 0.7-1
- Initial packaging.