Mercurial > libervia-desktop-kivy
annotate setup.py @ 353:19422bbd9c8e
core (widgets handler): refactoring:
- CagouWidget now has class properties (to be overridden when needed) which indicate how
if the widget handle must add a wrapping ScreenManager (global_screen_manager) or show
all instances of the class in a Carousel (collection_carousel). If none of those
options is used, a ScrollView will be wrapping the widget, to be sure that the widget
will be resized correctly when necessary (without it, the widget could still be
drawn in the backround when the size is too small and overflow on the WidgetWrapper,
this would be the case with WidgetSelector)
- some helper methods/properties have been added to CagouWidget. Check docstrings for
details
- better handling of (in)visible widget in WidgetsHandler
- thanks to the new wrapping ScrollView, WidgetSelect will show scroll bars if the
available space is too small.
- bugs fixes
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 17 Jan 2020 18:44:35 +0100 |
parents | 544c437f5094 |
children | 5d994be1161b |
rev | line source |
---|---|
337
544c437f5094
install (setup): fixed shebang for python3
Goffi <goffi@goffi.org>
parents:
327
diff
changeset
|
1 #!/usr/bin/env python3 |
127 | 2 |
3 # Cagou: a SàT frontend | |
282 | 4 # Copyright (C) 2009-2019 Jérôme Poisson (goffi@goffi.org) |
127 | 5 # Copyright (C) 2013-2016 Adrien Cossa (souliane@mailoo.org) |
6 | |
7 # This program is free software: you can redistribute it and/or modify | |
8 # it under the terms of the GNU Affero General Public License as published by | |
9 # the Free Software Foundation, either version 3 of the License, or | |
10 # (at your option) any later version. | |
11 | |
12 # This program is distributed in the hope that it will be useful, | |
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 # GNU Affero General Public License for more details. | |
16 | |
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/>. | |
19 | |
20 from setuptools import setup, find_packages | |
21 import os | |
22 import textwrap | |
23 | |
24 NAME = 'cagou' | |
25 | |
26 install_requires = [ | |
299
86b1cd8121dd
core (simple_xhtml): activated underline and line-through which are now available
Goffi <goffi@goffi.org>
parents:
297
diff
changeset
|
27 'kivy>=1.10.0', |
327
b77792cc6d12
use Kivy garden's new infrastructure for modernmenu and contextmenu:
Goffi <goffi@goffi.org>
parents:
315
diff
changeset
|
28 'kivy_garden.modernmenu', |
b77792cc6d12
use Kivy garden's new infrastructure for modernmenu and contextmenu:
Goffi <goffi@goffi.org>
parents:
315
diff
changeset
|
29 'kivy_garden.contextmenu>=0.1.0.dev1', |
127 | 30 'pillow', |
184
c63922860f80
chat: show desktop notification and/or note when suitable
Goffi <goffi@goffi.org>
parents:
161
diff
changeset
|
31 'plyer', |
304
00e2bcf0d9df
install: set minimal version of sat to dev one:
Goffi <goffi@goffi.org>
parents:
299
diff
changeset
|
32 'sat>=0.7.0dev0', |
127 | 33 ] |
34 | |
35 with open(os.path.join(NAME, 'VERSION')) as f: | |
36 VERSION = f.read().strip() | |
37 is_dev_version = VERSION.endswith('D') | |
38 | |
39 | |
40 def cagou_dev_version(): | |
41 """Use mercurial data to compute version""" | |
42 def version_scheme(version): | |
161
98a485512289
installation: fixed version in setup.py
Goffi <goffi@goffi.org>
parents:
127
diff
changeset
|
43 return VERSION.replace('D', '.dev0') |
127 | 44 |
45 def local_scheme(version): | |
161
98a485512289
installation: fixed version in setup.py
Goffi <goffi@goffi.org>
parents:
127
diff
changeset
|
46 return "+{rev}.{distance}".format( |
127 | 47 rev=version.node[1:], |
48 distance=version.distance) | |
49 | |
50 return {'version_scheme': version_scheme, | |
51 'local_scheme': local_scheme} | |
52 | |
53 | |
314
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
54 setup( |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
55 name=NAME, |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
56 version=VERSION, |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
57 description="Desktop/Android frontend for Salut à Toi XMPP client", |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
58 long_description=textwrap.dedent("""\ |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
59 Cagou is a desktop/Android frontend for Salut à Toi. |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
60 It provides native graphical interface with a modern user interface, |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
61 using touch screen abilitiy when available, and with split ability inspired from Blender |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
62 """), |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
63 author="Association « Salut à Toi »", |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
64 author_email="contact@goffi.org", |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
65 url="https://salut-a-toi.org", |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
66 classifiers=[ |
315
4c1df075378c
install (setup.py): keep order consistent with sat's setup.py in classifiers
Goffi <goffi@goffi.org>
parents:
314
diff
changeset
|
67 "Programming Language :: Python :: 3 :: Only", |
314
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
68 "Programming Language :: Python :: 3.6", |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
69 "Programming Language :: Python :: 3.7", |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
70 "Development Status :: 5 - Production/Stable", |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
71 "Environment :: X11 Applications", |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
72 "Framework :: Twisted", |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
73 "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
74 "Operating System :: POSIX :: Linux", |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
75 "Operating System :: Android", |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
76 "Topic :: Internet :: XMPP", |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
77 "Topic :: Communications :: Chat", |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
78 "Intended Audience :: End Users/Desktop", |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
79 ], |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
80 packages=find_packages(), |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
81 scripts=["bin/cagou"], |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
82 zip_safe=False, |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
83 setup_requires=["setuptools_scm"] if is_dev_version else [], |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
84 use_scm_version=cagou_dev_version if is_dev_version else False, |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
85 install_requires=install_requires, |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
86 package_data={"": ["*.kv"], "cagou": ["VERSION"]}, |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
87 python_requires=">=3.6", |
7ea4b7915c6b
install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents:
313
diff
changeset
|
88 ) |