# HG changeset patch # User Goffi # Date 1524906303 -7200 # Node ID ddfadedf2aed1c256122400fff986774be5e9e70 # Parent 98a485512289b5b96655e12a1b3c60f2eebf0d1d core: added __version__ variable diff -r 98a485512289 -r ddfadedf2aed cagou/__init__.py --- a/cagou/__init__.py Sat Apr 28 11:04:17 2018 +0200 +++ b/cagou/__init__.py Sat Apr 28 11:05:03 2018 +0200 @@ -17,6 +17,12 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . +import os.path + + +version_file = os.path.join(os.path.dirname(__file__), 'VERSION') +with open(version_file) as f: + __version__ = f.read().strip() class Global(object): @property @@ -24,10 +30,9 @@ return self._host G = Global() - +# this import must be done after G is created from core import cagou_main - def run(): host = G._host = cagou_main.Cagou() host.run()