annotate setup.py @ 327:b77792cc6d12

use Kivy garden's new infrastructure for modernmenu and contextmenu: dependencies are updated, the legacy kivy-garden tool is not needed anymore, thus installation is simplified.
author Goffi <goffi@goffi.org>
date Wed, 11 Dec 2019 18:26:42 +0100
parents 4c1df075378c
children 544c437f5094
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
127
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
1 #!/usr/bin/env python2
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
2 # -*- coding: utf-8 -*-
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
3
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
4 # Cagou: a SàT frontend
282
1b835bcfa663 date update
Goffi <goffi@goffi.org>
parents: 210
diff changeset
5 # Copyright (C) 2009-2019 Jérôme Poisson (goffi@goffi.org)
127
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
6 # Copyright (C) 2013-2016 Adrien Cossa (souliane@mailoo.org)
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
7
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
8 # This program is free software: you can redistribute it and/or modify
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
9 # it under the terms of the GNU Affero General Public License as published by
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
10 # the Free Software Foundation, either version 3 of the License, or
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
11 # (at your option) any later version.
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
12
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
13 # This program is distributed in the hope that it will be useful,
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
16 # GNU Affero General Public License for more details.
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
17
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
18 # You should have received a copy of the GNU Affero General Public License
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
20
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
21 from setuptools import setup, find_packages
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
22 import os
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
23 import textwrap
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
24
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
25 NAME = 'cagou'
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
26
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
27 install_requires = [
299
86b1cd8121dd core (simple_xhtml): activated underline and line-through which are now available
Goffi <goffi@goffi.org>
parents: 297
diff changeset
28 'kivy>=1.10.0',
327
b77792cc6d12 use Kivy garden's new infrastructure for modernmenu and contextmenu:
Goffi <goffi@goffi.org>
parents: 315
diff changeset
29 'kivy_garden.modernmenu',
b77792cc6d12 use Kivy garden's new infrastructure for modernmenu and contextmenu:
Goffi <goffi@goffi.org>
parents: 315
diff changeset
30 'kivy_garden.contextmenu>=0.1.0.dev1',
127
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
31 'pillow',
184
c63922860f80 chat: show desktop notification and/or note when suitable
Goffi <goffi@goffi.org>
parents: 161
diff changeset
32 'plyer',
304
00e2bcf0d9df install: set minimal version of sat to dev one:
Goffi <goffi@goffi.org>
parents: 299
diff changeset
33 'sat>=0.7.0dev0',
127
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
34 ]
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
35
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
36 with open(os.path.join(NAME, 'VERSION')) as f:
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
37 VERSION = f.read().strip()
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
38 is_dev_version = VERSION.endswith('D')
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
39
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
40
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
41 def cagou_dev_version():
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
42 """Use mercurial data to compute version"""
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
43 def version_scheme(version):
161
98a485512289 installation: fixed version in setup.py
Goffi <goffi@goffi.org>
parents: 127
diff changeset
44 return VERSION.replace('D', '.dev0')
127
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
45
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
46 def local_scheme(version):
161
98a485512289 installation: fixed version in setup.py
Goffi <goffi@goffi.org>
parents: 127
diff changeset
47 return "+{rev}.{distance}".format(
127
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
48 rev=version.node[1:],
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
49 distance=version.distance)
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
50
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
51 return {'version_scheme': version_scheme,
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
52 'local_scheme': local_scheme}
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
53
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
54
314
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
55 setup(
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
56 name=NAME,
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
57 version=VERSION,
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
58 description="Desktop/Android frontend for Salut à Toi XMPP client",
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
59 long_description=textwrap.dedent("""\
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
60 Cagou is a desktop/Android frontend for Salut à Toi.
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
61 It provides native graphical interface with a modern user interface,
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
62 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
63 """),
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
64 author="Association « Salut à Toi »",
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
65 author_email="contact@goffi.org",
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
66 url="https://salut-a-toi.org",
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
67 classifiers=[
315
4c1df075378c install (setup.py): keep order consistent with sat's setup.py in classifiers
Goffi <goffi@goffi.org>
parents: 314
diff changeset
68 "Programming Language :: Python :: 3 :: Only",
314
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
69 "Programming Language :: Python :: 3.6",
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
70 "Programming Language :: Python :: 3.7",
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
71 "Development Status :: 5 - Production/Stable",
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
72 "Environment :: X11 Applications",
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
73 "Framework :: Twisted",
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
74 "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
75 "Operating System :: POSIX :: Linux",
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
76 "Operating System :: Android",
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
77 "Topic :: Internet :: XMPP",
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
78 "Topic :: Communications :: Chat",
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
79 "Intended Audience :: End Users/Desktop",
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
80 ],
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
81 packages=find_packages(),
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
82 scripts=["bin/cagou"],
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
83 zip_safe=False,
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
84 setup_requires=["setuptools_scm"] if is_dev_version else [],
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
85 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
86 install_requires=install_requires,
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
87 package_data={"": ["*.kv"], "cagou": ["VERSION"]},
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
88 python_requires=">=3.6",
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
89 )