diff options
Diffstat (limited to 'baserockimport/exts/python.to_lorry')
-rwxr-xr-x | baserockimport/exts/python.to_lorry | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/baserockimport/exts/python.to_lorry b/baserockimport/exts/python.to_lorry index 06ee31d..fdbd04a 100755 --- a/baserockimport/exts/python.to_lorry +++ b/baserockimport/exts/python.to_lorry @@ -112,7 +112,10 @@ def get_compression(url): def make_tarball_lorry(lorry_prefix, package_name, url): name = '%s/%s' % (lorry_prefix, package_name.lower()) - lorry = {'type': 'tarball', 'url': url} + # TODO: shouldn't have 'x-products-python' field hardcoded here either + lorry = {'type': 'tarball', + 'url': url, + 'x-products-python': [package_name.lower()]} compression = get_compression(url) if compression: lorry['compression'] = compression @@ -182,7 +185,11 @@ def generate_tarball_lorry(lorry_prefix, client, requirement): def str_repo_lorry(lorry_prefix, package_name, repo_type, url): name = '%s/%s' % (lorry_prefix, package_name.lower()) - return json.dumps({name: {'type': repo_type, 'url': url}}, + # TODO: this products field 'x-products-python' + # probably shouldn't be hardcoded here + return json.dumps({name: {'type': repo_type, + 'url': url, + 'x-products-python': [package_name.lower()]}}, indent=4, sort_keys=True) class PythonLorryExtension(ImportExtension): |