Skip to content

Commit

Permalink
OZI.build 1.5.0 expect a valid license file path to copy to dist-info
Browse files Browse the repository at this point in the history
Signed-off-by: rjdbcm <[email protected]>
  • Loading branch information
rjdbcm committed Sep 2, 2024
1 parent 3cc5e81 commit caf6c95
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
project('OZI.build', version : '1.4.3', license : 'apache-2.0')
project('OZI.build', version : '1.5.0', license : 'apache-2.0')
fs = import('fs')
fs.copyfile('COPYING')
python = import('python').find_installation()
subdir('ozi_build')
# subdir('doc')
7 changes: 7 additions & 0 deletions ozi_build/buildapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ def __init__(self, builddir=None):
else:
self.__extras = config.get('project', {}).get('optional-dependencies', {})
self.__requires = config.get('project', {}).get('dependencies', None)
self.license_file = config.get('project', {}).get('license', {}).get('file', '')
if self.license_file == '':
log.warning('pyproject.toml:project.license.file key-value pair was not found')
self.__min_python = '3.10'
self.__max_python = '3.13'
self.installed = []
Expand Down Expand Up @@ -433,6 +436,10 @@ def prepare_metadata_for_build_wheel(
with (dist_info / 'METADATA').open('w') as f:
f.write(config.get_metadata())

with (dist_info / config.license_file).open('w') as fw:
with (builddir / config.license_file).open('r') as fr:
fw.write_text(fr.read_text())

entrypoints = config.get_entry_points()
if entrypoints:
with (dist_info / 'entry_points.txt').open('w') as f:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ backend-path = [".", "ozi_build"]
build-backend = "ozi_build.buildapi"

[project]
license={file='COPYING'}
dynamic = ["version"]
dependencies = [
"wheel>0.33",
Expand Down

0 comments on commit caf6c95

Please sign in to comment.