annotate setup.py @ 337:57a3051ee435

storage (pgsql): added getLastItems method, to get last items from a series of nodes and entities (needed for PEP compliance).
author Goffi <goffi@goffi.org>
date Sat, 12 Aug 2017 18:11:36 +0200
parents 9df844d9d5ac
children bfbc84057c0e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
233
564ae55219e1 sublicensed under AGPL V3
Goffi <goffi@goffi.org>
parents: 225
diff changeset
1 #!/usr/bin/python
564ae55219e1 sublicensed under AGPL V3
Goffi <goffi@goffi.org>
parents: 225
diff changeset
2 #-*- coding: utf-8 -*-
564ae55219e1 sublicensed under AGPL V3
Goffi <goffi@goffi.org>
parents: 225
diff changeset
3
264
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
4 # Copyright (c) 2003-2011 Ralph Meijer
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
5 # Copyright (C) 2011-2014 Jérôme Poisson <goffi@goffi.org>
233
564ae55219e1 sublicensed under AGPL V3
Goffi <goffi@goffi.org>
parents: 225
diff changeset
6
264
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
7 # This program is free software: you can redistribute it and/or modify
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
8 # 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
9 # the Free Software Foundation, either version 3 of the License, or
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
10 # (at your option) any later version.
233
564ae55219e1 sublicensed under AGPL V3
Goffi <goffi@goffi.org>
parents: 225
diff changeset
11
264
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
12 # This program is distributed in the hope that it will be useful,
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
15 # GNU Affero General Public License for more details.
233
564ae55219e1 sublicensed under AGPL V3
Goffi <goffi@goffi.org>
parents: 225
diff changeset
16
264
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
17 # 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
18 # 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
19
264
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
20 # This program is based on Idavoll (http://idavoll.ik.nu/),
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
21 # originaly written by Ralph Meijer (http://ralphm.net/blog/)
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
22 # It is sublicensed under AGPL v3 (or any later version) as allowed
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
23 # by the original license.
155
5191ba7c4df8 Work towards first release 0.5.0.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
24
264
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
25 # Here is a copy of the original license:
233
564ae55219e1 sublicensed under AGPL V3
Goffi <goffi@goffi.org>
parents: 225
diff changeset
26
264
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
27 # Copyright (c) 2003-2011 Ralph Meijer
233
564ae55219e1 sublicensed under AGPL V3
Goffi <goffi@goffi.org>
parents: 225
diff changeset
28
264
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
29 # Permission is hereby granted, free of charge, to any person obtaining
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
30 # a copy of this software and associated documentation files (the
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
31 # "Software"), to deal in the Software without restriction, including
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
32 # without limitation the rights to use, copy, modify, merge, publish,
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
33 # distribute, sublicense, and/or sell copies of the Software, and to
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
34 # permit persons to whom the Software is furnished to do so, subject to
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
35 # the following conditions:
233
564ae55219e1 sublicensed under AGPL V3
Goffi <goffi@goffi.org>
parents: 225
diff changeset
36
264
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
37 # The above copyright notice and this permission notice shall be
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
38 # included in all copies or substantial portions of the Software.
233
564ae55219e1 sublicensed under AGPL V3
Goffi <goffi@goffi.org>
parents: 225
diff changeset
39
264
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
40 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
41 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
42 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
43 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
44 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
45 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
46 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
155
5191ba7c4df8 Work towards first release 0.5.0.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
47
190
6e6c89eca9db Make sure optional PostgreSQL connect parameters are passed as None, require
Ralph Meijer <ralphm@ik.nu>
parents: 189
diff changeset
48 import sys
189
c61034369463 Released Idavoll 0.7.0.
Ralph Meijer <ralphm@ik.nu>
parents: 184
diff changeset
49 from setuptools import setup
234
51af2ed8bd50 replaced idavoll imports by sat_pubsub imports
Goffi <goffi@goffi.org>
parents: 233
diff changeset
50 from sat_pubsub import __version__
155
5191ba7c4df8 Work towards first release 0.5.0.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
51
264
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
52
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
53 # seen here: http://stackoverflow.com/questions/7275295
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
54 try:
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
55 from setuptools.command import egg_info
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
56 egg_info.write_toplevel_names
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
57 except (ImportError, AttributeError):
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
58 pass
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
59 else:
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
60 def _top_level_package(name):
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
61 return name.split('.', 1)[0]
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
62
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
63 def _hacked_write_toplevel_names(cmd, basename, filename):
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
64 pkgs = dict.fromkeys(
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
65 [_top_level_package(k)
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
66 for k in cmd.distribution.iter_distribution_names()
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
67 if _top_level_package(k) != "twisted"
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
68 ]
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
69 )
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
70 cmd.write_file("top-level names", filename, '\n'.join(pkgs) + '\n')
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
71
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
72 egg_info.write_toplevel_names = _hacked_write_toplevel_names
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
73
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
74
193
8ab16e319bb8 Release Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents: 190
diff changeset
75 install_requires = [
254
d29e2360b05c minimum required wokkel version is now 0.7.1
Goffi <goffi@goffi.org>
parents: 239
diff changeset
76 'wokkel >= 0.7.1',
193
8ab16e319bb8 Release Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents: 190
diff changeset
77 'simplejson',
8ab16e319bb8 Release Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents: 190
diff changeset
78 ]
190
6e6c89eca9db Make sure optional PostgreSQL connect parameters are passed as None, require
Ralph Meijer <ralphm@ik.nu>
parents: 189
diff changeset
79
6e6c89eca9db Make sure optional PostgreSQL connect parameters are passed as None, require
Ralph Meijer <ralphm@ik.nu>
parents: 189
diff changeset
80 if sys.version_info < (2, 5):
6e6c89eca9db Make sure optional PostgreSQL connect parameters are passed as None, require
Ralph Meijer <ralphm@ik.nu>
parents: 189
diff changeset
81 install_requires.append('uuid')
6e6c89eca9db Make sure optional PostgreSQL connect parameters are passed as None, require
Ralph Meijer <ralphm@ik.nu>
parents: 189
diff changeset
82
239
2b50e4664d74 fixed setup.py and twistd plugin file
Goffi <goffi@goffi.org>
parents: 235
diff changeset
83 setup(name='sat_pubsub',
217
f94c3eb38b75 Release Idavoll 0.9.1.
Ralph Meijer <ralphm@ik.nu>
parents: 212
diff changeset
84 version=__version__,
269
9df844d9d5ac misc: description in setup.py
Goffi <goffi@goffi.org>
parents: 264
diff changeset
85 description=u'XMPP Publish-Subscribe Service Component, build for the need of the « Salut à Toi » project',
239
2b50e4664d74 fixed setup.py and twistd plugin file
Goffi <goffi@goffi.org>
parents: 235
diff changeset
86 maintainer='Jérôme Poisson',
2b50e4664d74 fixed setup.py and twistd plugin file
Goffi <goffi@goffi.org>
parents: 235
diff changeset
87 maintainer_email='goffi@goffi.org',
2b50e4664d74 fixed setup.py and twistd plugin file
Goffi <goffi@goffi.org>
parents: 235
diff changeset
88 url='http://repos.goffi.org/sat_pubsub',
2b50e4664d74 fixed setup.py and twistd plugin file
Goffi <goffi@goffi.org>
parents: 235
diff changeset
89 license='AGPLv3+',
155
5191ba7c4df8 Work towards first release 0.5.0.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
90 packages=[
239
2b50e4664d74 fixed setup.py and twistd plugin file
Goffi <goffi@goffi.org>
parents: 235
diff changeset
91 'sat_pubsub',
2b50e4664d74 fixed setup.py and twistd plugin file
Goffi <goffi@goffi.org>
parents: 235
diff changeset
92 'sat_pubsub.test',
264
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
93 'twisted.plugins',
155
5191ba7c4df8 Work towards first release 0.5.0.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
94 ],
264
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
95 package_data={'twisted.plugins': ['twisted/plugins/sat_pubsub.py']},
86e767dc6abb packaging for release
souliane <souliane@mailoo.org>
parents: 255
diff changeset
96 data_files=[('share/sat_pubsub', ['db/pubsub.sql', 'doc/examples/sat_pubsub.tac'])],
189
c61034369463 Released Idavoll 0.7.0.
Ralph Meijer <ralphm@ik.nu>
parents: 184
diff changeset
97 zip_safe=False,
190
6e6c89eca9db Make sure optional PostgreSQL connect parameters are passed as None, require
Ralph Meijer <ralphm@ik.nu>
parents: 189
diff changeset
98 install_requires=install_requires,
155
5191ba7c4df8 Work towards first release 0.5.0.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
99 )