comparison setup.py @ 1123:e89bd3a26c86

installation: setup.py update: - twisted plugin installation - author is now « association Salut à Toi » - author_email is now association's main contact address - changed url from http://www.salut-a-toi.org to http://salut-a-toi.org
author Goffi <goffi@goffi.org>
date Sun, 24 Aug 2014 18:44:18 +0200
parents b56374a1f6d6
children c7fe4fe66fbc
comparison
equal deleted inserted replaced
1122:9ae01ccf89c1 1123:e89bd3a26c86
27 import sys 27 import sys
28 import subprocess 28 import subprocess
29 from stat import ST_MODE 29 from stat import ST_MODE
30 import shutil 30 import shutil
31 31
32 # seen here: http://stackoverflow.com/questions/7275295
33 try:
34 from setuptools.command import egg_info
35 egg_info.write_toplevel_names
36 except (ImportError, AttributeError):
37 pass
38 else:
39 def _top_level_package(name):
40 return name.split('.', 1)[0]
41
42 def _hacked_write_toplevel_names(cmd, basename, filename):
43 pkgs = dict.fromkeys(
44 [_top_level_package(k)
45 for k in cmd.distribution.iter_distribution_names()
46 if _top_level_package(k) != "twisted"
47 ]
48 )
49 cmd.write_file("top-level names", filename, '\n'.join(pkgs) + '\n')
50
51 egg_info.write_toplevel_names = _hacked_write_toplevel_names
52
32 53
33 NAME = 'sat' 54 NAME = 'sat'
34 LAUNCH_DAEMON_COMMAND = 'sat' 55 LAUNCH_DAEMON_COMMAND = 'sat'
35 56
36 ENV_SAT_INSTALL = "SAT_INSTALL" # environment variable to customise installation 57 ENV_SAT_INSTALL = "SAT_INSTALL" # environment variable to customise installation
60 81
61 def custom_auto_options(self): 82 def custom_auto_options(self):
62 """Change options for twistd in the shell script 83 """Change options for twistd in the shell script
63 Mainly change the paths""" 84 Mainly change the paths"""
64 sh_buffer = "" 85 sh_buffer = ""
65 run_dir = os.path.dirname(self.sh_script_path)
66 with open(self.sh_script_path, 'r') as sh_file: 86 with open(self.sh_script_path, 'r') as sh_file:
67 for ori_line in sh_file: 87 for ori_line in sh_file:
68 if ori_line.startswith('TAP_PATH='): 88 if ori_line.startswith('PYTHON='):
69 dest_line = 'TAP_PATH="%s/"\n' % run_dir
70 elif ori_line.startswith('PYTHON='):
71 dest_line = 'PYTHON="%s"\n' % sys.executable 89 dest_line = 'PYTHON="%s"\n' % sys.executable
72 else: 90 else:
73 dest_line = ori_line 91 dest_line = ori_line
74 sh_buffer += dest_line 92 sh_buffer += dest_line
75 93
222 240
223 setup(name=NAME, 241 setup(name=NAME,
224 version='0.4.1', 242 version='0.4.1',
225 description=u'Salut à Toi multi-frontend XMPP client', 243 description=u'Salut à Toi multi-frontend XMPP client',
226 long_description=u'Salut à Toi (SàT) is a XMPP client based on a daemon/frontend architecture. Its multi-frontends (desktop, web, console interface, CLI, etc) and multi-purposes (instant messaging, microblogging, games, file sharing, etc).', 244 long_description=u'Salut à Toi (SàT) is a XMPP client based on a daemon/frontend architecture. Its multi-frontends (desktop, web, console interface, CLI, etc) and multi-purposes (instant messaging, microblogging, games, file sharing, etc).',
227 author='Goffi (Jérôme Poisson)', 245 author='Association « Salut à Toi »',
228 author_email='goffi@goffi.org', 246 author_email='contact@goffi.org',
229 url='http://www.salut-a-toi.org', 247 url='http://salut-a-toi.org',
230 classifiers=['Development Status :: 3 - Alpha', 248 classifiers=['Development Status :: 3 - Alpha',
231 'Environment :: Console', 249 'Environment :: Console',
232 'Environment :: X11 Applications :: GTK', 250 'Environment :: X11 Applications :: GTK',
233 'Framework :: Twisted', 251 'Framework :: Twisted',
234 'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)', 252 'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)',
235 'Operating System :: POSIX :: Linux', 253 'Operating System :: POSIX :: Linux',
236 'Topic :: Communications :: Chat'], 254 'Topic :: Communications :: Chat'],
237 package_dir={'sat': 'src', 'sat_frontends': 'frontends/src'}, 255 package_dir={'sat': 'src', 'sat_frontends': 'frontends/src', 'twisted.plugins': 'src/twisted/plugins'},
238 packages=['sat', 'sat.tools', 'sat.bridge', 'sat.plugins', 'sat.test', 'sat.core', 'sat.memory', 256 packages=['sat', 'sat.tools', 'sat.bridge', 'sat.plugins', 'sat.test', 'sat.core', 'sat.memory',
239 'sat_frontends', 'sat_frontends.bridge', 'sat_frontends.quick_frontend', 'sat_frontends.jp', 257 'sat_frontends', 'sat_frontends.bridge', 'sat_frontends.quick_frontend', 'sat_frontends.jp',
240 'sat_frontends.primitivus', 'sat_frontends.wix', 'sat_frontends.tools', 'sat.stdui'], 258 'sat_frontends.primitivus', 'sat_frontends.wix', 'sat_frontends.tools', 'sat.stdui', 'twisted.plugins'],
241 package_data={'sat': ['sat.tac', 'sat.sh'], 259 package_data={'sat': ['sat.sh'],
242 'sat_frontends': ['wix/COPYING']}, 260 'sat_frontends': ['wix/COPYING']},
243 data_files=[(os.path.join(sys.prefix, 'share/locale/fr/LC_MESSAGES'), ['i18n/fr/LC_MESSAGES/sat.mo']), 261 data_files=[(os.path.join(sys.prefix, 'share/locale/fr/LC_MESSAGES'), ['i18n/fr/LC_MESSAGES/sat.mo']),
244 ('share/doc/%s' % NAME, ['CHANGELOG', 'COPYING', 'INSTALL', 'README', 'README4TRANSLATORS']), 262 ('share/doc/%s' % NAME, ['CHANGELOG', 'COPYING', 'INSTALL', 'README', 'README4TRANSLATORS']),
245 ], 263 ],
246 scripts=['frontends/src/jp/jp', 'frontends/src/primitivus/primitivus', 'frontends/src/wix/wix'], 264 scripts=['frontends/src/jp/jp', 'frontends/src/primitivus/primitivus', 'frontends/src/wix/wix'],