Skip to content

Commit

Permalink
[python] Fix version in distribution
Browse files Browse the repository at this point in the history
RPM build tools now check if the python distribution has valid version.

Signed-off-by: Wojtek Porczyk <[email protected]>
  • Loading branch information
woju authored and mkow committed Feb 10, 2025
1 parent 6547f12 commit 4198575
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion python/graminelibos.dist-info/meson.build
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
install_dir = python3_platlib / 'graminelibos.dist-info'
conf = configuration_data()
conf.set('NAME', meson.project_name())
conf.set('VERSION', meson.project_version())
conf.set('LICENSE', ', '.join(meson.project_license()))

# VERSION needs to comply with the official specification, which is restrictive:
# https://packaging.python.org/en/latest/specifications/version-specifiers/
# In Gramine, we use X.Y, X.Y.Z, X.Y~rcN and X.Ypost~UNRELEASED, which is
# exactly what we want for distro packages (~ sorts negative), but can't be used
# for python distributions.
conf.set('VERSION',
meson.project_version().replace('~UNRELEASED', '').replace('~', ''))

# https://packaging.python.org/en/latest/specifications/core-metadata/
configure_file(
input: 'METADATA.in',
Expand Down

0 comments on commit 4198575

Please sign in to comment.