# HG changeset patch # User Goffi # Date 1686048113 -7200 # Node ID 10b6ad569157a33c1abd470c264559febdd52f5d # Parent 15055a00162ca11424d855b36436fb34899d07c3 version: use standard Python's `dev0` instead of Libervia specific `D` for dev version diff -r 15055a00162c -r 10b6ad569157 libervia/backend/__init__.py --- a/libervia/backend/__init__.py Fri Jun 02 18:21:15 2023 +0200 +++ b/libervia/backend/__init__.py Tue Jun 06 12:41:53 2023 +0200 @@ -15,12 +15,9 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -import os.path from sat_tmp import wokkel -version_file = os.path.join(os.path.dirname(__file__), "VERSION") -with open(version_file) as f: - __version__ = f.read().strip() +__version__ = "0.9.0.dev0" if not wokkel.installed: wokkel.install() diff -r 15055a00162c -r 10b6ad569157 libervia/backend/core/constants.py --- a/libervia/backend/core/constants.py Fri Jun 02 18:21:15 2023 +0200 +++ b/libervia/backend/core/constants.py Tue Jun 06 12:41:53 2023 +0200 @@ -36,7 +36,7 @@ APP_NAME_FULL = f"{APP_NAME} ({APP_COMPONENT})" APP_VERSION = ( backend.__version__ - ) # Please add 'D' at the end of version in sat/VERSION for dev versions + ) APP_RELEASE_NAME = "La Ruche" APP_URL = "https://libervia.org" diff -r 15055a00162c -r 10b6ad569157 libervia/backend/core/main.py --- a/libervia/backend/core/main.py Fri Jun 02 18:21:15 2023 +0200 +++ b/libervia/backend/core/main.py Tue Jun 06 12:41:53 2023 +0200 @@ -113,7 +113,7 @@ In developement mode, release name and extra data are returned too """ version = self.version - if version[-1] == "D": + if version.split(".")[-1] == "dev0": # we are in debug version, we add extra data try: return self._version_cache diff -r 15055a00162c -r 10b6ad569157 libervia/backend/tools/utils.py --- a/libervia/backend/tools/utils.py Fri Jun 02 18:21:15 2023 +0200 +++ b/libervia/backend/tools/utils.py Tue Jun 06 12:41:53 2023 +0200 @@ -321,7 +321,6 @@ ) ) else: - version = version.replace(".dev0", "D") if version != C.APP_VERSION: log.warning( "Incompatible version ({version}) and pkg_version ({pkg_version})" diff -r 15055a00162c -r 10b6ad569157 libervia/tui/base.py --- a/libervia/tui/base.py Fri Jun 02 18:21:15 2023 +0200 +++ b/libervia/tui/base.py Tue Jun 06 12:41:53 2023 +0200 @@ -483,7 +483,7 @@ self.loop.widget = self.__saved_overlay self.__saved_overlay = None - elif input_ == a_key['DEBUG'] and 'D' in self.bridge.version_get(): #Debug only for dev versions + elif input_ == a_key['DEBUG'] and '.dev0' in self.bridge.version_get(): #Debug only for dev versions self.debug() elif input_ == a_key['CONTACTS_HIDE']: #user wants to (un)hide the contact lists try: diff -r 15055a00162c -r 10b6ad569157 setup.py --- a/setup.py Fri Jun 02 18:21:15 2023 +0200 +++ b/setup.py Tue Jun 06 12:41:53 2023 +0200 @@ -73,7 +73,7 @@ DBUS_FILE = 'misc/org.libervia.Libervia.service' with open(os.path.join(DIR_NAME, 'VERSION')) as f: VERSION = f.read().strip() -is_dev_version = VERSION.endswith('D') +is_dev_version = VERSION.endswith('.dev0') if is_dev_version: install_requires.append("setuptools_scm") @@ -81,7 +81,7 @@ def sat_dev_version(): """Use mercurial data to compute version""" def version_scheme(version): - return VERSION.replace('D', '.dev0') + return VERSION def local_scheme(version): return "+{rev}.{distance}".format(