comparison setup.py @ 264:86e767dc6abb

packaging for release
author souliane <souliane@mailoo.org>
date Sat, 22 Feb 2014 06:10:24 +0100
parents d55620ceafed
children 9df844d9d5ac
comparison
equal deleted inserted replaced
263:9dfd3890e646 264:86e767dc6abb
1 #!/usr/bin/python 1 #!/usr/bin/python
2 #-*- coding: utf-8 -*- 2 #-*- coding: utf-8 -*-
3 3
4 """ 4 # Copyright (c) 2003-2011 Ralph Meijer
5 Copyright (c) 2003-2011 Ralph Meijer 5 # Copyright (C) 2011-2014 Jérôme Poisson <goffi@goffi.org>
6 Copyright (c) 2012, 2013 Jérôme Poisson
7 6
7 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU Affero General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
8 11
9 This program is free software: you can redistribute it and/or modify 12 # This program is distributed in the hope that it will be useful,
10 it under the terms of the GNU Affero General Public License as published by 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 the Free Software Foundation, either version 3 of the License, or 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 (at your option) any later version. 15 # GNU Affero General Public License for more details.
13 16
14 This program is distributed in the hope that it will be useful, 17 # You should have received a copy of the GNU Affero General Public License
15 but WITHOUT ANY WARRANTY; without even the implied warranty of 18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU Affero General Public License for more details.
18 19
19 You should have received a copy of the GNU Affero General Public License 20 # This program is based on Idavoll (http://idavoll.ik.nu/),
20 along with this program. If not, see <http://www.gnu.org/licenses/>. 21 # originaly written by Ralph Meijer (http://ralphm.net/blog/)
21 -- 22 # It is sublicensed under AGPL v3 (or any later version) as allowed
23 # by the original license.
22 24
23 This program is based on Idavoll (http://idavoll.ik.nu/), 25 # Here is a copy of the original license:
24 originaly written by Ralph Meijer (http://ralphm.net/blog/)
25 It is sublicensed under AGPL v3 (or any later version) as allowed by the original
26 license.
27 26
28 -- 27 # Copyright (c) 2003-2011 Ralph Meijer
29 28
30 Here is a copy of the original license: 29 # Permission is hereby granted, free of charge, to any person obtaining
30 # a copy of this software and associated documentation files (the
31 # "Software"), to deal in the Software without restriction, including
32 # without limitation the rights to use, copy, modify, merge, publish,
33 # distribute, sublicense, and/or sell copies of the Software, and to
34 # permit persons to whom the Software is furnished to do so, subject to
35 # the following conditions:
31 36
32 Copyright (c) 2003-2011 Ralph Meijer 37 # The above copyright notice and this permission notice shall be
38 # included in all copies or substantial portions of the Software.
33 39
34 Permission is hereby granted, free of charge, to any person obtaining 40 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
35 a copy of this software and associated documentation files (the 41 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
36 "Software"), to deal in the Software without restriction, including 42 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
37 without limitation the rights to use, copy, modify, merge, publish, 43 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
38 distribute, sublicense, and/or sell copies of the Software, and to 44 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
39 permit persons to whom the Software is furnished to do so, subject to 45 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
40 the following conditions: 46 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
41
42 The above copyright notice and this permission notice shall be
43 included in all copies or substantial portions of the Software.
44
45 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
46 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
47 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
48 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
49 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
50 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
51 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
52
53 """
54 47
55 import sys 48 import sys
56 from setuptools import setup 49 from setuptools import setup
57 from sat_pubsub import __version__ 50 from sat_pubsub import __version__
51
52
53 # seen here: http://stackoverflow.com/questions/7275295
54 try:
55 from setuptools.command import egg_info
56 egg_info.write_toplevel_names
57 except (ImportError, AttributeError):
58 pass
59 else:
60 def _top_level_package(name):
61 return name.split('.', 1)[0]
62
63 def _hacked_write_toplevel_names(cmd, basename, filename):
64 pkgs = dict.fromkeys(
65 [_top_level_package(k)
66 for k in cmd.distribution.iter_distribution_names()
67 if _top_level_package(k) != "twisted"
68 ]
69 )
70 cmd.write_file("top-level names", filename, '\n'.join(pkgs) + '\n')
71
72 egg_info.write_toplevel_names = _hacked_write_toplevel_names
73
58 74
59 install_requires = [ 75 install_requires = [
60 'wokkel >= 0.7.1', 76 'wokkel >= 0.7.1',
61 'simplejson', 77 'simplejson',
62 ] 78 ]
72 url='http://repos.goffi.org/sat_pubsub', 88 url='http://repos.goffi.org/sat_pubsub',
73 license='AGPLv3+', 89 license='AGPLv3+',
74 packages=[ 90 packages=[
75 'sat_pubsub', 91 'sat_pubsub',
76 'sat_pubsub.test', 92 'sat_pubsub.test',
93 'twisted.plugins',
77 ], 94 ],
78 package_data={'twisted.plugins': ['twisted/plugins/sat_pubsub.py', 95 package_data={'twisted.plugins': ['twisted/plugins/sat_pubsub.py']},
79 'twisted/plugins/sat_pubsub_http.py']}, 96 data_files=[('share/sat_pubsub', ['db/pubsub.sql', 'doc/examples/sat_pubsub.tac'])],
80 data_files=[('share/sat_pubsub', ['db/pubsub.sql',
81 'db/gateway.sql',
82 'db/to_idavoll_0.8.sql',
83 'doc/examples/sat_pubsub.tac',
84 ])],
85 zip_safe=False, 97 zip_safe=False,
86 install_requires=install_requires, 98 install_requires=install_requires,
87 ) 99 )