Skip to content

Commit

Permalink
Merge pull request #17 from OZI-Project/patch/refactor-pyc_wheel
Browse files Browse the repository at this point in the history
refactor backend for future maintainability
  • Loading branch information
rjdbcm authored Dec 4, 2024
2 parents 11a385b + 690d658 commit 839a7bb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ozi_build/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ def get_simple_headers(config):
('dynamic', 'Dynamic'),
]:
vals = config.get(key, [])
if key == 'dynamic':
for i in vals:
if i in {'Name', 'Version', 'Metadata-Version'}:
raise ValueError('{} is not a valid value for dynamic'.format(key))
for val in vals:
res += '{}: {}\n'.format(mdata_key, val)
return res
Expand All @@ -156,8 +160,6 @@ def get_license_headers(config):
if key == 'license-expression' and 'license' in config:
raise ValueError('license and license-expression are mutually exclusive')
header = '-'.join(map(str.capitalize, key.split('-')))
if header in {'Name', 'Version', 'Metadata-Version'}:
raise ValueError('{} is not a valid value for dynamic'.format(key))
res += '{}: {}\n'.format(header, config[key])
return res

Expand Down

0 comments on commit 839a7bb

Please sign in to comment.