annotate setup.py @ 426:6f8e1c180c83

added "~/.config/sat" as search patch for config
author Goffi <goffi@goffi.org>
date Sun, 13 Sep 2020 15:52:17 +0200
parents ee722faa3e93
children 36c9fb677f1d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
405
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
1 #!/usr/bin/env python3
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
2 # -*- coding: utf-8 -*-
233
564ae55219e1 sublicensed under AGPL V3
Goffi <goffi@goffi.org>
parents: 225
diff changeset
3
405
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
4 # SAT: an XMPP client
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
5 # Copyright (C) 2009-2016 Jérôme Poisson (goffi@goffi.org)
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
6 # Copyright (C) 2013-2016 Adrien Cossa (souliane@mailoo.org)
233
564ae55219e1 sublicensed under AGPL V3
Goffi <goffi@goffi.org>
parents: 225
diff changeset
7
264
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
8 # This program is free software: you can redistribute it and/or modify
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
9 # it under the terms of the GNU Affero General Public License as published by
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
10 # the Free Software Foundation, either version 3 of the License, or
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
11 # (at your option) any later version.
233
564ae55219e1 sublicensed under AGPL V3
Goffi <goffi@goffi.org>
parents: 225
diff changeset
12
264
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
13 # This program is distributed in the hope that it will be useful,
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
16 # GNU Affero General Public License for more details.
233
564ae55219e1 sublicensed under AGPL V3
Goffi <goffi@goffi.org>
parents: 225
diff changeset
17
264
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
18 # You should have received a copy of the GNU Affero General Public License
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
233
564ae55219e1 sublicensed under AGPL V3
Goffi <goffi@goffi.org>
parents: 225
diff changeset
20
405
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
21 from setuptools import setup, find_packages
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
22 import os
233
564ae55219e1 sublicensed under AGPL V3
Goffi <goffi@goffi.org>
parents: 225
diff changeset
23
405
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
24 NAME = 'sat_pubsub'
264
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
25
193
8ab16e319bb8 Release Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents: 190
diff changeset
26 install_requires = [
254
d29e2360b05c minimum required wokkel version is now 0.7.1
Goffi <goffi@goffi.org>
parents: 239
diff changeset
27 'wokkel >= 0.7.1',
405
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
28 'psycopg2',
406
a58610ab2983 removed old code:
Goffi <goffi@goffi.org>
parents: 405
diff changeset
29 'sat_tmp',
405
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
30 'uuid',
193
8ab16e319bb8 Release Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents: 190
diff changeset
31 ]
190
6e6c89eca9db Make sure optional PostgreSQL connect parameters are passed as None, require
Ralph Meijer <ralphm@ik.nu>
parents: 189
diff changeset
32
405
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
33
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
34 with open(os.path.join(NAME, 'VERSION')) as f:
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
35 VERSION = f.read().strip()
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
36 is_dev_version = VERSION.endswith('D')
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
37
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
38
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
39 def sat_dev_version():
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
40 """Use mercurial data to compute version"""
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
41 def version_scheme(version):
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
42 return VERSION.replace('D', '.dev0')
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
43
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
44 def local_scheme(version):
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
45 return "+{rev}.{distance}".format(
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
46 rev=version.node[1:],
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
47 distance=version.distance)
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
48
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
49 return {'version_scheme': version_scheme,
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
50 'local_scheme': local_scheme}
c56a728412f1 file organisation + setup refactoring:
Goffi <goffi@goffi.org>
parents: 373
diff changeset
51
190
6e6c89eca9db Make sure optional PostgreSQL connect parameters are passed as None, require
Ralph Meijer <ralphm@ik.nu>
parents: 189
diff changeset
52
416
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
53 setup(
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
54 name=NAME,
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
55 version=VERSION,
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
56 description="XMPP Publish-Subscribe Service Component, build for the need of "
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
57 "the « Salut à Toi » project",
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
58 author="Association « Salut à Toi »",
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
59 author_email="goffi@goffi.org",
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
60 url="https://salut-a-toi.org",
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
61 classifiers=[
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
62 "Programming Language :: Python :: 3 :: Only",
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
63 "Programming Language :: Python :: 3.6",
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
64 "Programming Language :: Python :: 3.7",
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
65 "Development Status :: 5 - Production/Stable",
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
66 "Framework :: Twisted",
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
67 "License :: OSI Approved :: GNU Affero General Public License v3 "
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
68 "or later (AGPLv3+)",
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
69 "Operating System :: POSIX :: Linux",
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
70 "Topic :: Communications :: Chat"
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
71 ],
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
72 packages=find_packages() + ["twisted.plugins"],
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
73 data_files=[(os.path.join("share/doc", NAME),
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
74 ["CHANGELOG", "COPYING", "README"]),
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
75 ],
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
76 zip_safe=True,
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
77 setup_requires=["setuptools_scm"] if is_dev_version else [],
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
78 use_scm_version=sat_dev_version if is_dev_version else False,
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
79 install_requires=install_requires,
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
80 package_data={"sat_pubsub": ["VERSION"]},
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
81 python_requires=">=3.6",
ee722faa3e93 install (setup.py): updated setup.py for Python 3
Goffi <goffi@goffi.org>
parents: 414
diff changeset
82 )