annotate setup.py @ 474:98be52d5ac25

install: set upper limit for dependencies versions
author Goffi <goffi@goffi.org>
date Fri, 18 Jun 2021 16:36:22 +0200
parents 8e42048649f7
children c35aa683fa2d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
2
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
3 # Cagou: a SàT frontend
461
3c9ba4a694ef dates update
Goffi <goffi@goffi.org>
parents: 378
diff changeset
4 # Copyright (C) 2009-2021 Jérôme Poisson (goffi@goffi.org)
127
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
5 # Copyright (C) 2013-2016 Adrien Cossa (souliane@mailoo.org)
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
6
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
7 # This program is free software: you can redistribute it and/or modify
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
8 # 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
9 # the Free Software Foundation, either version 3 of the License, or
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
10 # (at your option) any later version.
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
11
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
12 # This program is distributed in the hope that it will be useful,
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
15 # GNU Affero General Public License for more details.
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
16
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
17 # 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
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
19
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
20 from setuptools import setup, find_packages
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
21 import os
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
22 import textwrap
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
23
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
24 NAME = 'cagou'
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
25
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
26 install_requires = [
474
98be52d5ac25 install: set upper limit for dependencies versions
Goffi <goffi@goffi.org>
parents: 468
diff changeset
27 'kivy >=2.0.0, <2.1.0',
98be52d5ac25 install: set upper limit for dependencies versions
Goffi <goffi@goffi.org>
parents: 468
diff changeset
28 'kivy_garden.modernmenu <0.2.0',
98be52d5ac25 install: set upper limit for dependencies versions
Goffi <goffi@goffi.org>
parents: 468
diff changeset
29 'pillow <8.3',
98be52d5ac25 install: set upper limit for dependencies versions
Goffi <goffi@goffi.org>
parents: 468
diff changeset
30 'plyer <2.1',
98be52d5ac25 install: set upper limit for dependencies versions
Goffi <goffi@goffi.org>
parents: 468
diff changeset
31 'sat >=0.8.0b1, <0.9',
127
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
32 ]
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
33
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
34 with open(os.path.join(NAME, 'VERSION')) as f:
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
35 VERSION = f.read().strip()
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
36 is_dev_version = VERSION.endswith('D')
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
37
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
38
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
39 def cagou_dev_version():
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
40 """Use mercurial data to compute version"""
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
41 def version_scheme(version):
161
98a485512289 installation: fixed version in setup.py
Goffi <goffi@goffi.org>
parents: 127
diff changeset
42 return VERSION.replace('D', '.dev0')
127
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
43
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
44 def local_scheme(version):
161
98a485512289 installation: fixed version in setup.py
Goffi <goffi@goffi.org>
parents: 127
diff changeset
45 return "+{rev}.{distance}".format(
127
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
46 rev=version.node[1:],
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
47 distance=version.distance)
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
48
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
49 return {'version_scheme': version_scheme,
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
50 'local_scheme': local_scheme}
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
51
9d3d700a65b7 setup: proper setup.py:
Goffi <goffi@goffi.org>
parents:
diff changeset
52
314
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
53 setup(
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
54 name=NAME,
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
55 version=VERSION,
465
02787fa81b81 setup: name change + updated `description`/`classifiers` + use `entry_points` for running command
Goffi <goffi@goffi.org>
parents: 463
diff changeset
56 description="Desktop/Android frontend for Libervia XMPP client",
314
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
57 long_description=textwrap.dedent("""\
465
02787fa81b81 setup: name change + updated `description`/`classifiers` + use `entry_points` for running command
Goffi <goffi@goffi.org>
parents: 463
diff changeset
58 Libervia Desktop (Cagou) is a desktop/Android frontend for Libervia.
314
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
59 It provides native graphical interface with a modern user interface,
465
02787fa81b81 setup: name change + updated `description`/`classifiers` + use `entry_points` for running command
Goffi <goffi@goffi.org>
parents: 463
diff changeset
60 using touch screen abilitiy when available, and with split ability inspired from
02787fa81b81 setup: name change + updated `description`/`classifiers` + use `entry_points` for running command
Goffi <goffi@goffi.org>
parents: 463
diff changeset
61 Blender
314
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.7",
465
02787fa81b81 setup: name change + updated `description`/`classifiers` + use `entry_points` for running command
Goffi <goffi@goffi.org>
parents: 463
diff changeset
69 "Programming Language :: Python :: 3.8",
02787fa81b81 setup: name change + updated `description`/`classifiers` + use `entry_points` for running command
Goffi <goffi@goffi.org>
parents: 463
diff changeset
70 "Programming Language :: Python :: 3.9",
314
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(),
465
02787fa81b81 setup: name change + updated `description`/`classifiers` + use `entry_points` for running command
Goffi <goffi@goffi.org>
parents: 463
diff changeset
82 entry_points={
02787fa81b81 setup: name change + updated `description`/`classifiers` + use `entry_points` for running command
Goffi <goffi@goffi.org>
parents: 463
diff changeset
83 "console_scripts": [
02787fa81b81 setup: name change + updated `description`/`classifiers` + use `entry_points` for running command
Goffi <goffi@goffi.org>
parents: 463
diff changeset
84 "libervia-desktop = cagou:run",
02787fa81b81 setup: name change + updated `description`/`classifiers` + use `entry_points` for running command
Goffi <goffi@goffi.org>
parents: 463
diff changeset
85 "libervia-mobile = cagou:run",
02787fa81b81 setup: name change + updated `description`/`classifiers` + use `entry_points` for running command
Goffi <goffi@goffi.org>
parents: 463
diff changeset
86 "cagou = cagou:run",
02787fa81b81 setup: name change + updated `description`/`classifiers` + use `entry_points` for running command
Goffi <goffi@goffi.org>
parents: 463
diff changeset
87 ],
02787fa81b81 setup: name change + updated `description`/`classifiers` + use `entry_points` for running command
Goffi <goffi@goffi.org>
parents: 463
diff changeset
88 },
314
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
89 zip_safe=False,
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
90 setup_requires=["setuptools_scm"] if is_dev_version else [],
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
91 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
92 install_requires=install_requires,
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
93 package_data={"": ["*.kv"], "cagou": ["VERSION"]},
468
8e42048649f7 install (setup): updated classifiers to reflect minimun Python version
Goffi <goffi@goffi.org>
parents: 465
diff changeset
94 python_requires=">=3.7",
314
7ea4b7915c6b install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 313
diff changeset
95 )