Revision edbed9ce
Added by koszko over 1 year ago
src/hydrilla/builder/build.py | ||
---|---|---|
35 | 35 |
import click |
36 | 36 |
|
37 | 37 |
from .. import util |
38 |
from . import _version |
|
38 | 39 |
|
39 | 40 |
here = Path(__file__).resolve().parent |
40 | 41 |
|
... | ... | |
42 | 43 |
|
43 | 44 |
index_validator = util.validator_for('package_source-1.schema.json') |
44 | 45 |
|
46 |
generated_by = { |
|
47 |
'name': 'hydrilla.builder', |
|
48 |
'version': _version.version |
|
49 |
} |
|
50 |
|
|
45 | 51 |
class FileReferenceError(Exception): |
46 | 52 |
""" |
47 | 53 |
Exception used to report various problems concerning files referenced from |
... | ... | |
278 | 284 |
new_item_obj.update([(p, item_def[p]) for p in copy_props]) |
279 | 285 |
|
280 | 286 |
new_item_obj['version'] = util.normalize_version(item_def['version']) |
281 |
new_item_obj['api_schema_version'] = [1, 0, 1]
|
|
287 |
new_item_obj['api_schema_version'] = [1] |
|
282 | 288 |
new_item_obj['source_copyright'] = self.copyright_file_refs |
283 | 289 |
new_item_obj['source_name'] = self.source_name |
290 |
new_item_obj['generated_by'] = generated_by |
|
284 | 291 |
|
285 | 292 |
item_list.append(new_item_obj) |
286 | 293 |
|
... | ... | |
327 | 334 |
} |
328 | 335 |
|
329 | 336 |
self.source_description = { |
330 |
'api_schema_version': [1, 0, 1],
|
|
337 |
'api_schema_version': [1], |
|
331 | 338 |
'source_name': self.source_name, |
332 | 339 |
'source_copyright': self.copyright_file_refs, |
333 | 340 |
'upstream_url': index_obj['upstream_url'], |
334 | 341 |
'definitions': item_refs, |
335 |
'source_archives': source_archives_obj |
|
342 |
'source_archives': source_archives_obj, |
|
343 |
'generated_by': generated_by |
|
336 | 344 |
} |
337 | 345 |
|
338 | 346 |
if 'comment' in index_obj: |
Also available in: Unified diff
when generating JSON documents, put generating software info in 'generated_by' property