Mercurial > libervia-desktop-kivy
comparison cagou/__init__.py @ 162:ddfadedf2aed
core: added __version__ variable
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 28 Apr 2018 11:05:03 +0200 |
parents | cd99f70ea592 |
children | 1b835bcfa663 |
comparison
equal
deleted
inserted
replaced
161:98a485512289 | 162:ddfadedf2aed |
---|---|
15 # GNU Affero General Public License for more details. | 15 # GNU Affero General Public License for more details. |
16 | 16 |
17 # You should have received a copy of the GNU Affero General Public License | 17 # You should have received a copy of the GNU Affero General Public License |
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | 19 |
20 import os.path | |
21 | |
22 | |
23 version_file = os.path.join(os.path.dirname(__file__), 'VERSION') | |
24 with open(version_file) as f: | |
25 __version__ = f.read().strip() | |
20 | 26 |
21 class Global(object): | 27 class Global(object): |
22 @property | 28 @property |
23 def host(self): | 29 def host(self): |
24 return self._host | 30 return self._host |
25 G = Global() | 31 G = Global() |
26 | 32 |
27 | 33 # this import must be done after G is created |
28 from core import cagou_main | 34 from core import cagou_main |
29 | |
30 | 35 |
31 def run(): | 36 def run(): |
32 host = G._host = cagou_main.Cagou() | 37 host = G._host = cagou_main.Cagou() |
33 host.run() | 38 host.run() |