From cca7c047cdef873751674f26073da81a8c857c85 Mon Sep 17 00:00:00 2001 From: Tito Dal Canton Date: Thu, 6 Feb 2025 15:09:16 +0100 Subject: [PATCH] Fix strange usage of pycbc.version.release --- pycbc/results/versioning.py | 6 ++++-- setup.py | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pycbc/results/versioning.py b/pycbc/results/versioning.py index d4b3863666f..03db3408207 100644 --- a/pycbc/results/versioning.py +++ b/pycbc/results/versioning.py @@ -92,9 +92,11 @@ def add_info_new_version(info_dct, curr_module, extra_str): pycbcinfo = {} pycbcinfo['Name'] = 'PyCBC' - pycbcinfo['ID'] = pycbc.version.version + pycbcinfo['ID'] = pycbc.version.git_hash pycbcinfo['Status'] = pycbc.version.git_status - pycbcinfo['Version'] = pycbc.version.release or '' + pycbcinfo['Version'] = pycbc.version.version + if pycbc.version.release: + pycbcinfo['Version'] += ' (release)' pycbcinfo['Tag'] = pycbc.version.git_tag pycbcinfo['Author'] = pycbc.version.git_author pycbcinfo['Builder'] = pycbc.version.git_builder diff --git a/setup.py b/setup.py index 0f1ec578e9e..16a91afed43 100755 --- a/setup.py +++ b/setup.py @@ -96,7 +96,7 @@ def __getattr__(self, attr): except: vinfo = vdummy() vinfo.version = '2.8.dev0' - vinfo.release = 'False' + vinfo.release = False version_script = f"""# coding: utf-8 # Generated by setup.py for PyCBC on {vinfo.build_date}. @@ -104,7 +104,7 @@ def __getattr__(self, attr): # general info version = '{vinfo.version}' date = '{vinfo.date}' -release = '{vinfo.release}' +release = {vinfo.release} last_release = '{vinfo.last_release}' # git info