comparison libervia/desktop_kivy/__init__.py @ 493:b3cedbee561d

refactoring: rename `cagou` to `libervia.desktop_kivy` + update imports and names following backend changes
author Goffi <goffi@goffi.org>
date Fri, 02 Jun 2023 18:26:16 +0200
parents cagou/__init__.py@3c9ba4a694ef
children 59bdf78bd1d9
comparison
equal deleted inserted replaced
492:5114bbb5daa3 493:b3cedbee561d
1 #!/usr/bin/env python3
2
3 # Libervia Desktop-Kivy
4 # Copyright (C) 2016-2021 Jérôme Poisson (goffi@goffi.org)
5
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU Affero General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU Affero General Public License for more details.
15
16 # You should have received a copy of the GNU Affero General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19 import os.path
20
21
22 version_file = os.path.join(os.path.dirname(__file__), 'VERSION')
23 with open(version_file) as f:
24 __version__ = f.read().strip()
25
26 class Global(object):
27 @property
28 def host(self):
29 return self._host
30 G = Global()
31
32 # this import must be done after G is created
33 from .core import cagou_main
34
35 def run():
36 host = G._host = cagou_main.LiberviaDesktopKivy()
37 G.local_platform = cagou_main.local_platform
38 host.run()