diff --git a/cps/about.py b/cps/about.py index fb031343..4a170447 100644 --- a/cps/about.py +++ b/cps/about.py @@ -52,9 +52,9 @@ sorted_modules = OrderedDict((sorted(modules.items(), key=lambda x: x[0].casefol def collect_stats(): if constants.NIGHTLY_VERSION[0] == "$Format:%H$": - calibre_web_version = constants.STABLE_VERSION['version'].replace("b", " Beta") + calibre_web_version = constants.STABLE_VERSION.replace("b", " Beta") else: - calibre_web_version = (constants.STABLE_VERSION['version'].replace("b", " Beta") + ' - ' + calibre_web_version = (constants.STABLE_VERSION.replace("b", " Beta") + ' - ' + constants.NIGHTLY_VERSION[0].replace('%', '%%') + ' - ' + constants.NIGHTLY_VERSION[1].replace('%', '%%')) diff --git a/cps/admin.py b/cps/admin.py index ff34e8b8..a8eaafa1 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -219,7 +219,7 @@ def admin(): form_date += timedelta(hours=int(commit[20:22]), minutes=int(commit[23:])) commit = format_datetime(form_date - tz, format='short') else: - commit = version['version'].replace("b", " Beta") + commit = version.replace("b", " Beta") all_user = ub.session.query(ub.User).all() # email_settings = mail_config.get_mail_settings() diff --git a/cps/cli.py b/cps/cli.py index 5bf289b8..3f21a17e 100644 --- a/cps/cli.py +++ b/cps/cli.py @@ -29,8 +29,8 @@ from .constants import DEFAULT_SETTINGS_FILE, DEFAULT_GDRIVE_FILE def version_info(): if _NIGHTLY_VERSION[1].startswith('$Format'): - return "Calibre-Web version: %s - unknown git-clone" % _STABLE_VERSION['version'].replace("b", " Beta") - return "Calibre-Web version: %s -%s" % (_STABLE_VERSION['version'].replace("b", " Beta"), _NIGHTLY_VERSION[1]) + return "Calibre-Web version: %s - unknown git-clone" % _STABLE_VERSION.replace("b", " Beta") + return "Calibre-Web version: %s -%s" % (_STABLE_VERSION.replace("b", " Beta"), _NIGHTLY_VERSION[1]) class CliParameter(object): diff --git a/cps/constants.py b/cps/constants.py index 36bbe749..0f03364a 100644 --- a/cps/constants.py +++ b/cps/constants.py @@ -172,8 +172,8 @@ BookMeta = namedtuple('BookMeta', 'file_path, extension, title, author, cover, d 'series_id, languages, publisher, pubdate, identifiers') # python build process likes to have x.y.zbw -> b for beta and w a counting number -STABLE_VERSION = {'version': '0.6.24b'} -_version = STABLE_VERSION['version'] +STABLE_VERSION = '0.6.24b' +# _version = STABLE_VERSION['version'] NIGHTLY_VERSION = dict() NIGHTLY_VERSION[0] = '$Format:%H$' diff --git a/pyproject.toml b/pyproject.toml index 54d07cab..30255911 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -119,5 +119,5 @@ include-package-data = true license-files = ["LICENSE"] [tool.setuptools.dynamic] -version = {attr = "calibreweb.cps.constants._version"} +version = {attr = "calibreweb.cps.constants.STABLE_VERSION"}