-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
61 lines (52 loc) · 1.75 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env python
# Copyright (c) Ralph Meijer.
# See LICENSE for details.
import sys
from setuptools import setup
from idavoll import __version__
install_requires = [
'wokkel >= 0.5.0',
'simplejson',
]
if sys.version_info < (2, 5):
install_requires.append('uuid')
# Make sure 'twisted' doesn't appear in top_level.txt
try:
from setuptools.command import egg_info
egg_info.write_toplevel_names
except (ImportError, AttributeError):
pass
else:
def _top_level_package(name):
return name.split('.', 1)[0]
def _hacked_write_toplevel_names(cmd, basename, filename):
pkgs = dict.fromkeys(
[_top_level_package(k)
for k in cmd.distribution.iter_distribution_names()
if _top_level_package(k) != "twisted"
]
)
cmd.write_file("top-level names", filename, '\n'.join(pkgs) + '\n')
egg_info.write_toplevel_names = _hacked_write_toplevel_names
setup(name='idavoll',
version=__version__,
description='Jabber Publish-Subscribe Service Component',
author='Ralph Meijer',
author_email='[email protected]',
url='http://idavoll.ik.nu/',
license='MIT',
packages=[
'idavoll',
'idavoll.test',
'twisted.plugins',
],
package_data={'twisted.plugins': ['twisted/plugins/idavoll.py',
'twisted/plugins/idavoll_http.py']},
data_files=[('share/idavoll', ['db/pubsub.sql',
'db/gateway.sql',
'db/to_idavoll_0.8.sql',
'doc/examples/idavoll.tac',
])],
zip_safe=False,
install_requires=install_requires,
)