annotate setup.py @ 3410:55f9a38864af

jp (file/receive): display or answer to C.META_TYPE_NOT_IN_ROSTER_LEAK dialog: when a file is proposed by an entity not in roster, the dialog asking for confirmation is displayed. If the bare jid of the sender is explicitely waited (i.e. it's in arguments), then the dialog is automatically confirmed.
author Goffi <goffi@goffi.org>
date Thu, 12 Nov 2020 14:53:16 +0100
parents 5d926c7b0d99
children 3ac28e51a24f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3028
ab2696e34d29 Python 3 port:
Goffi <goffi@goffi.org>
parents: 2963
diff changeset
1 #!/usr/bin/env python3
225
fd9b7834d98a distutils installation script, draft
Goffi <goffi@goffi.org>
parents:
diff changeset
2
2574
fbcdb761981c setup: use NAME to get version
Goffi <goffi@goffi.org>
parents: 2572
diff changeset
3 # SAT: an XMPP client
3136
9d0df638c8b4 dates update
Goffi <goffi@goffi.org>
parents: 3111
diff changeset
4 # Copyright (C) 2009-2020 Jérôme Poisson (goffi@goffi.org)
1766
d17772b0fe22 copyright update
Goffi <goffi@goffi.org>
parents: 1720
diff changeset
5 # Copyright (C) 2013-2016 Adrien Cossa (souliane@mailoo.org)
238
83d2bc0abf2a version, README, CHANGELOG and INSTALL updates
Goffi <goffi@goffi.org>
parents: 237
diff changeset
6
609
84a6e83157c2 fixed licences in docstrings (they are now in comments)
Goffi <goffi@goffi.org>
parents: 607
diff changeset
7 # This program is free software: you can redistribute it and/or modify
84a6e83157c2 fixed licences in docstrings (they are now in comments)
Goffi <goffi@goffi.org>
parents: 607
diff changeset
8 # it under the terms of the GNU Affero General Public License as published by
84a6e83157c2 fixed licences in docstrings (they are now in comments)
Goffi <goffi@goffi.org>
parents: 607
diff changeset
9 # the Free Software Foundation, either version 3 of the License, or
84a6e83157c2 fixed licences in docstrings (they are now in comments)
Goffi <goffi@goffi.org>
parents: 607
diff changeset
10 # (at your option) any later version.
238
83d2bc0abf2a version, README, CHANGELOG and INSTALL updates
Goffi <goffi@goffi.org>
parents: 237
diff changeset
11
609
84a6e83157c2 fixed licences in docstrings (they are now in comments)
Goffi <goffi@goffi.org>
parents: 607
diff changeset
12 # This program is distributed in the hope that it will be useful,
84a6e83157c2 fixed licences in docstrings (they are now in comments)
Goffi <goffi@goffi.org>
parents: 607
diff changeset
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
84a6e83157c2 fixed licences in docstrings (they are now in comments)
Goffi <goffi@goffi.org>
parents: 607
diff changeset
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
84a6e83157c2 fixed licences in docstrings (they are now in comments)
Goffi <goffi@goffi.org>
parents: 607
diff changeset
15 # GNU Affero General Public License for more details.
238
83d2bc0abf2a version, README, CHANGELOG and INSTALL updates
Goffi <goffi@goffi.org>
parents: 237
diff changeset
16
609
84a6e83157c2 fixed licences in docstrings (they are now in comments)
Goffi <goffi@goffi.org>
parents: 607
diff changeset
17 # You should have received a copy of the GNU Affero General Public License
84a6e83157c2 fixed licences in docstrings (they are now in comments)
Goffi <goffi@goffi.org>
parents: 607
diff changeset
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
238
83d2bc0abf2a version, README, CHANGELOG and INSTALL updates
Goffi <goffi@goffi.org>
parents: 237
diff changeset
19
2562
26edcf3a30eb core, setup: huge cleaning:
Goffi <goffi@goffi.org>
parents: 2454
diff changeset
20 from setuptools import setup, find_packages
586
6a718ede8be1 Fix coding style in setup.py.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 581
diff changeset
21 import os
2562
26edcf3a30eb core, setup: huge cleaning:
Goffi <goffi@goffi.org>
parents: 2454
diff changeset
22
26edcf3a30eb core, setup: huge cleaning:
Goffi <goffi@goffi.org>
parents: 2454
diff changeset
23 NAME = 'sat'
1100
2be46f391cfa setup: SAT_INSTALL environment variable handles "clean" and "purge" options
souliane <souliane@mailoo.org>
parents: 1054
diff changeset
24
2562
26edcf3a30eb core, setup: huge cleaning:
Goffi <goffi@goffi.org>
parents: 2454
diff changeset
25 install_requires = [
26edcf3a30eb core, setup: huge cleaning:
Goffi <goffi@goffi.org>
parents: 2454
diff changeset
26 'babel',
26edcf3a30eb core, setup: huge cleaning:
Goffi <goffi@goffi.org>
parents: 2454
diff changeset
27 'dbus-python',
26edcf3a30eb core, setup: huge cleaning:
Goffi <goffi@goffi.org>
parents: 2454
diff changeset
28 'html2text',
3061
948833e3b542 tools (common/template): removed warning catches, jinja2>=2.10.3 now handles them correctly
Goffi <goffi@goffi.org>
parents: 3053
diff changeset
29 'jinja2>=2.10.3',
2562
26edcf3a30eb core, setup: huge cleaning:
Goffi <goffi@goffi.org>
parents: 2454
diff changeset
30 'langid',
26edcf3a30eb core, setup: huge cleaning:
Goffi <goffi@goffi.org>
parents: 2454
diff changeset
31 'lxml >= 3.1.0',
2874
da0193ae1c24 misc (setup): minimum markdown version is not 3.0
Goffi <goffi@goffi.org>
parents: 2857
diff changeset
32 'markdown >= 3.0',
2562
26edcf3a30eb core, setup: huge cleaning:
Goffi <goffi@goffi.org>
parents: 2454
diff changeset
33 'miniupnpc',
26edcf3a30eb core, setup: huge cleaning:
Goffi <goffi@goffi.org>
parents: 2454
diff changeset
34 'mutagen',
26edcf3a30eb core, setup: huge cleaning:
Goffi <goffi@goffi.org>
parents: 2454
diff changeset
35 'netifaces',
3330
7b47f48d31f3 plugin XEP-0264: fix orientation of thumbnails:
Goffi <goffi@goffi.org>
parents: 3281
diff changeset
36 'pillow >= 6.0.0',
3111
5d3b6efac044 install (setup.py): use progressbar2 instead of progressbar
Goffi <goffi@goffi.org>
parents: 3090
diff changeset
37 'progressbar2',
3090
4f8bdf50593f plugin sec aesgcm: new plugin handling `aesgcm:` scheme for e2e encrypted media sharing:
Goffi <goffi@goffi.org>
parents: 3089
diff changeset
38 'cryptography',
2562
26edcf3a30eb core, setup: huge cleaning:
Goffi <goffi@goffi.org>
parents: 2454
diff changeset
39 'pygments',
26edcf3a30eb core, setup: huge cleaning:
Goffi <goffi@goffi.org>
parents: 2454
diff changeset
40 'pygobject',
3372
5d926c7b0d99 plugin app manager: first draft:
Goffi <goffi@goffi.org>
parents: 3352
diff changeset
41 'pyopenssl',
2611
c180ca699e72 install (setup): added python-dateutil as dependency (was already a dependency of Wokkel)
Goffi <goffi@goffi.org>
parents: 2576
diff changeset
42 'python-dateutil',
2562
26edcf3a30eb core, setup: huge cleaning:
Goffi <goffi@goffi.org>
parents: 2454
diff changeset
43 'python-potr',
26edcf3a30eb core, setup: huge cleaning:
Goffi <goffi@goffi.org>
parents: 2454
diff changeset
44 'pyxdg',
2962
b2c9b85372de install: updated minimal version for sat_tmp and urwid-satext
Goffi <goffi@goffi.org>
parents: 2906
diff changeset
45 'sat_tmp >= 0.7.0a4',
2562
26edcf3a30eb core, setup: huge cleaning:
Goffi <goffi@goffi.org>
parents: 2454
diff changeset
46 'shortuuid',
3044
691283719bb2 core (patches): updated TLS patches:
Goffi <goffi@goffi.org>
parents: 3040
diff changeset
47 'twisted[tls] >= 19.7.0',
3089
e75024e41f81 plugin upload, XEP-0363: code modernisation + preparation for extension:
Goffi <goffi@goffi.org>
parents: 3085
diff changeset
48 'treq',
2562
26edcf3a30eb core, setup: huge cleaning:
Goffi <goffi@goffi.org>
parents: 2454
diff changeset
49 'urwid >= 1.2.0',
2962
b2c9b85372de install: updated minimal version for sat_tmp and urwid-satext
Goffi <goffi@goffi.org>
parents: 2906
diff changeset
50 'urwid-satext >= 0.7.0a2',
2562
26edcf3a30eb core, setup: huge cleaning:
Goffi <goffi@goffi.org>
parents: 2454
diff changeset
51 'wokkel >= 0.7.1',
3085
c048fc192739 plugin XEP-0384: update to latest python-omemo + better trust management:
Goffi <goffi@goffi.org>
parents: 3084
diff changeset
52 'omemo >= 0.11.0',
3084
ffcdd93b61fa plugin XEP-0384: specific warning on missing omemo-backend-signal + fixed encoding following Python 3 port
Goffi <goffi@goffi.org>
parents: 3073
diff changeset
53 'omemo-backend-signal',
3372
5d926c7b0d99 plugin app manager: first draft:
Goffi <goffi@goffi.org>
parents: 3352
diff changeset
54 'pyyaml',
2562
26edcf3a30eb core, setup: huge cleaning:
Goffi <goffi@goffi.org>
parents: 2454
diff changeset
55 ]
1123
e89bd3a26c86 installation: setup.py update:
Goffi <goffi@goffi.org>
parents: 1115
diff changeset
56
3259
f300d78f08f3 core: image convertion + SVG support:
Goffi <goffi@goffi.org>
parents: 3160
diff changeset
57 extras_require = {
f300d78f08f3 core: image convertion + SVG support:
Goffi <goffi@goffi.org>
parents: 3160
diff changeset
58 "SVG": ["CairoSVG"],
f300d78f08f3 core: image convertion + SVG support:
Goffi <goffi@goffi.org>
parents: 3160
diff changeset
59 }
f300d78f08f3 core: image convertion + SVG support:
Goffi <goffi@goffi.org>
parents: 3160
diff changeset
60
1150
beaf8d4475e4 misc (D-Bus, installation): added a .service file for D-Bus auto-launch feature + installation from setup.py (path adaptation now use regex).
Goffi <goffi@goffi.org>
parents: 1138
diff changeset
61 DBUS_DIR = 'dbus-1/services'
2637
534b264d63df install: fixed DBUS_FILE path
Goffi <goffi@goffi.org>
parents: 2620
diff changeset
62 DBUS_FILE = 'misc/org.salutatoi.SAT.service'
2574
fbcdb761981c setup: use NAME to get version
Goffi <goffi@goffi.org>
parents: 2572
diff changeset
63 with open(os.path.join(NAME, 'VERSION')) as f:
2571
4aca060075b7 setup: version is now set in SAT/VERSION, sat is not imported anymore in setup
Goffi <goffi@goffi.org>
parents: 2567
diff changeset
64 VERSION = f.read().strip()
2572
7e7f4e344a96 setup: use scm version
Goffi <goffi@goffi.org>
parents: 2571
diff changeset
65 is_dev_version = VERSION.endswith('D')
7e7f4e344a96 setup: use scm version
Goffi <goffi@goffi.org>
parents: 2571
diff changeset
66
7e7f4e344a96 setup: use scm version
Goffi <goffi@goffi.org>
parents: 2571
diff changeset
67
7e7f4e344a96 setup: use scm version
Goffi <goffi@goffi.org>
parents: 2571
diff changeset
68 def sat_dev_version():
7e7f4e344a96 setup: use scm version
Goffi <goffi@goffi.org>
parents: 2571
diff changeset
69 """Use mercurial data to compute version"""
7e7f4e344a96 setup: use scm version
Goffi <goffi@goffi.org>
parents: 2571
diff changeset
70 def version_scheme(version):
2576
cb7bf936d8e8 setup, tools(utils): fixed versioning in setup and getRepositoryData
Goffi <goffi@goffi.org>
parents: 2574
diff changeset
71 return VERSION.replace('D', '.dev0')
2572
7e7f4e344a96 setup: use scm version
Goffi <goffi@goffi.org>
parents: 2571
diff changeset
72
7e7f4e344a96 setup: use scm version
Goffi <goffi@goffi.org>
parents: 2571
diff changeset
73 def local_scheme(version):
2576
cb7bf936d8e8 setup, tools(utils): fixed versioning in setup and getRepositoryData
Goffi <goffi@goffi.org>
parents: 2574
diff changeset
74 return "+{rev}.{distance}".format(
2572
7e7f4e344a96 setup: use scm version
Goffi <goffi@goffi.org>
parents: 2571
diff changeset
75 rev=version.node[1:],
7e7f4e344a96 setup: use scm version
Goffi <goffi@goffi.org>
parents: 2571
diff changeset
76 distance=version.distance)
7e7f4e344a96 setup: use scm version
Goffi <goffi@goffi.org>
parents: 2571
diff changeset
77
3053
8b36e5c3f28f misc: don't import memory in launch script:
Goffi <goffi@goffi.org>
parents: 3044
diff changeset
78 return {
8b36e5c3f28f misc: don't import memory in launch script:
Goffi <goffi@goffi.org>
parents: 3044
diff changeset
79 'version_scheme': version_scheme,
8b36e5c3f28f misc: don't import memory in launch script:
Goffi <goffi@goffi.org>
parents: 3044
diff changeset
80 'local_scheme': local_scheme
8b36e5c3f28f misc: don't import memory in launch script:
Goffi <goffi@goffi.org>
parents: 3044
diff changeset
81 }
1150
beaf8d4475e4 misc (D-Bus, installation): added a .service file for D-Bus auto-launch feature + installation from setup.py (path adaptation now use regex).
Goffi <goffi@goffi.org>
parents: 1138
diff changeset
82
2565
ea106dfa2145 setup, constant: use https address in APP_URL, and keep pypi NAME separated from constants
Goffi <goffi@goffi.org>
parents: 2564
diff changeset
83
3036
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
84 setup(
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
85 name=NAME,
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
86 version=VERSION,
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
87 description="Salut à Toi multipurpose and multi frontend XMPP client",
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
88 long_description="Salut à Toi (SàT) is a XMPP client based on a daemon/frontend "
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
89 "architecture. Its multi frontend (desktop, web, console "
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
90 "interface, CLI, etc) and multipurpose (instant messaging, "
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
91 "microblogging, games, file sharing, etc).",
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
92 author="Association « Salut à Toi »",
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
93 author_email="contact@goffi.org",
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
94 url="https://salut-a-toi.org",
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
95 classifiers=[
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
96 "Programming Language :: Python :: 3 :: Only",
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
97 "Programming Language :: Python :: 3.7",
3073
daed12db819d install (setup): added Python 3.8 classifier
Goffi <goffi@goffi.org>
parents: 3061
diff changeset
98 "Programming Language :: Python :: 3.8",
3036
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
99 "Development Status :: 5 - Production/Stable",
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
100 "Environment :: Console",
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
101 "Framework :: Twisted",
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
102 "License :: OSI Approved :: GNU Affero General Public License v3 "
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
103 "or later (AGPLv3+)",
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
104 "Operating System :: POSIX :: Linux",
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
105 "Topic :: Communications :: Chat"
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
106 ],
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
107 packages=find_packages() + ["twisted.plugins"],
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
108 data_files=[("share/locale/fr/LC_MESSAGES",
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
109 ["i18n/fr/LC_MESSAGES/sat.mo"]),
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
110 (os.path.join("share/doc", NAME),
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
111 ["CHANGELOG", "COPYING", "INSTALL", "README", "README4TRANSLATORS"]),
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
112 (os.path.join("share", DBUS_DIR), [DBUS_FILE]),
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
113 ],
3281
a3639d6d9643 core: replaced `sat` shell script by a python script:
Goffi <goffi@goffi.org>
parents: 3259
diff changeset
114 entry_points={
a3639d6d9643 core: replaced `sat` shell script by a python script:
Goffi <goffi@goffi.org>
parents: 3259
diff changeset
115 "console_scripts": [
a3639d6d9643 core: replaced `sat` shell script by a python script:
Goffi <goffi@goffi.org>
parents: 3259
diff changeset
116 "sat = sat.core.launcher:Launcher.run",
a3639d6d9643 core: replaced `sat` shell script by a python script:
Goffi <goffi@goffi.org>
parents: 3259
diff changeset
117 ],
a3639d6d9643 core: replaced `sat` shell script by a python script:
Goffi <goffi@goffi.org>
parents: 3259
diff changeset
118 },
a3639d6d9643 core: replaced `sat` shell script by a python script:
Goffi <goffi@goffi.org>
parents: 3259
diff changeset
119 scripts=["sat_frontends/jp/jp", "sat_frontends/primitivus/primitivus"],
3036
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
120 zip_safe=False,
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
121 setup_requires=["setuptools_scm"] if is_dev_version else [],
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
122 use_scm_version=sat_dev_version if is_dev_version else False,
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
123 install_requires=install_requires,
3352
a3f940e3d72e install (setup.py): added missing `extra_requires`
Goffi <goffi@goffi.org>
parents: 3330
diff changeset
124 extras_require=extras_require,
3036
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
125 package_data={"sat": ["VERSION"]},
3040
fee60f17ebac jp: jp asyncio port:
Goffi <goffi@goffi.org>
parents: 3036
diff changeset
126 python_requires=">=3.7",
3036
3338c6a634f5 install (setup.py): updated classifiers
Goffi <goffi@goffi.org>
parents: 3035
diff changeset
127 )