3
# Copyright (c) 2001-2009 Twisted Matrix Laboratories.
4
# See LICENSE for details.
8
Distutils installer for Twisted.
13
if sys.version_info < (2,3):
14
print >>sys.stderr, "You must use at least Python 2.3 for Twisted"
17
if os.path.exists('twisted'):
18
sys.path.insert(0, '.') # eek! need this to import twisted. sorry.
19
from twisted import copyright
20
from twisted.python.dist import setup, ConditionalExtension as Extension
21
from twisted.python.dist import getPackages, getDataFiles, getScripts
22
from twisted.python.dist import twisted_subprojects
27
Extension("twisted.protocols._c_urlarg",
28
["twisted/protocols/_c_urlarg.c"]),
30
Extension("twisted.test.raiser",
31
["twisted/test/raiser.c"]),
33
Extension("twisted.python._epoll",
34
["twisted/python/_epoll.c"],
35
condition=lambda builder: builder._check_header("sys/epoll.h")),
37
Extension("twisted.internet.iocpreactor.iocpsupport",
38
["twisted/internet/iocpreactor/iocpsupport/iocpsupport.c",
39
"twisted/internet/iocpreactor/iocpsupport/winsock_pointers.c"],
41
condition=lambda builder: sys.platform == "win32"),
43
Extension("twisted.internet.cfsupport",
44
["twisted/internet/cfsupport/cfsupport.c"],
45
extra_compile_args=['-w'],
46
extra_link_args=['-framework','CoreFoundation',
47
'-framework','CoreServices',
48
'-framework','Carbon'],
49
condition=lambda builder: sys.platform == "darwin"),
51
Extension("twisted.python._initgroups",
52
["twisted/python/_initgroups.c"]),
55
# Figure out which plugins to include: all plugins except subproject ones
56
subProjectsPlugins = ['twisted_%s.py' % subProject
57
for subProject in twisted_subprojects]
58
plugins = os.listdir(os.path.join(
59
os.path.dirname(os.path.abspath(copyright.__file__)), 'plugins'))
60
plugins = [plugin[:-3] for plugin in plugins if plugin.endswith('.py') and
61
plugin not in subProjectsPlugins]
68
version=copyright.version,
69
description="The core parts of the Twisted networking framework",
70
author="Twisted Matrix Laboratories",
71
author_email="twisted-python@twistedmatrix.com",
72
maintainer="Glyph Lefkowitz",
73
url="http://twistedmatrix.com/",
76
This is the core of Twisted, including:
77
* Networking support (twisted.internet)
78
* Trial, the unit testing framework (twisted.trial)
79
* AMP, the Asynchronous Messaging Protocol (twisted.protocols.amp)
80
* Twisted Spread, a remote object system (twisted.spread)
81
* Utility code (twisted.python)
82
* Basic abstractions that multiple subprojects use
83
(twisted.cred, twisted.application, twisted.plugin)
84
* Database connectivity support (twisted.enterprise)
85
* A few basic protocols and protocol abstractions (twisted.protocols)
89
packages=getPackages('twisted',
90
ignore=twisted_subprojects + ['plugins']),
92
data_files=getDataFiles('twisted', ignore=twisted_subprojects),
93
conditionalExtensions=extensions,
94
scripts = getScripts(""),
98
if __name__ == '__main__':