aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2022-09-19 21:26:31 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2022-09-19 21:26:31 +0300
commitb4658d2ebfe9d929ba9cc93e84a93c0ac2d399c7 (patch)
tree47fedfba262b6a435f9e249fa729862405ba42d8
parentversion: refactor the code (diff)
downloadsnakeoil-b4658d2ebfe9d929ba9cc93e84a93c0ac2d399c7.tar.gz
snakeoil-b4658d2ebfe9d929ba9cc93e84a93c0ac2d399c7.tar.bz2
snakeoil-b4658d2ebfe9d929ba9cc93e84a93c0ac2d399c7.zip
dist.distutils_extensions: fix _verinfo.py file
Fixes: 40b46fc3cc8200727e9198b7ab179da21d28da67 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
-rw-r--r--src/snakeoil/dist/distutils_extensions.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/snakeoil/dist/distutils_extensions.py b/src/snakeoil/dist/distutils_extensions.py
index a51ec28..03888e3 100644
--- a/src/snakeoil/dist/distutils_extensions.py
+++ b/src/snakeoil/dist/distutils_extensions.py
@@ -159,7 +159,9 @@ def generate_verinfo(target_dir):
path = os.path.join(target_dir, '_verinfo.py')
log.info(f'generating version info: {path}')
with open(path, 'w') as f:
- f.write('version_info=%r' % (data._asdict(),))
+ f.write('from snakeoil.version import GitVersion\n')
+ f.write('import datetime\n')
+ f.write(f'version_info={data!r}')
return path