doc/conf.py: read version number from meson.build

This commit is contained in:
Max Kellermann 2022-10-20 19:08:26 +02:00
parent 5781f223f6
commit 44ef34db88
1 changed files with 3 additions and 1 deletions

View File

@ -38,7 +38,9 @@ author = 'Max Kellermann'
# built documents.
#
# The short X.Y version.
version = '0.23.10'
with open('../meson.build') as f:
import re
version = re.match(r".*version:\s*'([^']+)'", f.readline()).group(1)
# The full version, including alpha/beta/rc tags.
#release = version + '~git'