Skip to content

Commit 4629f06

Browse files
committed
[python] Fix version in distribution
RPM build tools now check if the python distribution has valid version. Signed-off-by: Wojtek Porczyk <[email protected]>
1 parent 58e069f commit 4629f06

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

python/graminelibos.dist-info/meson.build

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
install_dir = python3_platlib / 'graminelibos.dist-info'
22
conf = configuration_data()
33
conf.set('NAME', meson.project_name())
4-
conf.set('VERSION', meson.project_version())
54
conf.set('LICENSE', ', '.join(meson.project_license()))
65

6+
# VERSION needs to comply with the official specification, which is restrictive:
7+
# https://packaging.python.org/en/latest/specifications/version-specifiers/
8+
# In Gramine, we use X.Y, X.Y.Z, X.Y~rcN and X.Ypost~UNRELEASED, which is
9+
# exactly what we want for distro packages (~ sorts negative), but can't be used
10+
# for python distributions.
11+
conf.set('VERSION',
12+
meson.project_version().replace('~UNRELEASED', '').replace('~', ''))
13+
714
# https://packaging.python.org/en/latest/specifications/core-metadata/
815
configure_file(
916
input: 'METADATA.in',

0 commit comments

Comments
 (0)