3 # Copyright (c) Twisted Matrix Laboratories.
4 # See LICENSE for details.
7 Distutils installer for Twisted.
11 # Load setuptools, to build a specific source package
21 Get all extensions from core and all subprojects.
25 if not sys
.platform
.startswith('java'):
26 for dir in os
.listdir("twisted") + [""]:
27 topfiles
= os
.path
.join("twisted", dir, "topfiles")
28 if os
.path
.isdir(topfiles
):
30 setup_py
= os
.path
.join(topfiles
, "setup.py")
31 execfile(setup_py
, ns
, ns
)
32 if "extensions" in ns
:
33 extensions
.extend(ns
["extensions"])
40 Invoke twisted.python.dist with the appropriate metadata about the
43 if os
.path
.exists('twisted'):
44 sys
.path
.insert(0, '.')
45 from twisted
import copyright
46 from twisted
.python
.dist
import getDataFiles
, getScripts
, getPackages
, setup
48 # "" is included because core scripts are directly in bin/
49 projects
= [''] + [x
for x
in os
.listdir('bin')
50 if os
.path
.isdir(os
.path
.join("bin", x
))
51 and not x
.startswith(".")]
54 scripts
.extend(getScripts(i
))
59 version
=copyright
.version
,
60 description
="An asynchronous networking framework written in "
62 author
="Twisted Matrix Laboratories",
63 author_email
="twisted-python@twistedmatrix.com",
64 maintainer
="Glyph Lefkowitz",
65 maintainer_email
="glyph@twistedmatrix.com",
66 url
="http://twistedmatrix.com/",
69 An extensible framework for Python programming, with special focus
70 on event-based network programming and multiprotocol integration.
72 packages
= getPackages('twisted'),
73 conditionalExtensions
= getExtensions(),
75 data_files
=getDataFiles('twisted'),
78 if 'setuptools' in sys
.modules
:
79 from pkg_resources
import parse_requirements
80 requirements
= ["zope.interface"]
82 list(parse_requirements(requirements
))
84 print """You seem to be running a very old version of setuptools.
85 This version of setuptools has a bug parsing dependencies, so automatic
86 dependency resolution is disabled.
89 setup_args
['install_requires'] = requirements
90 setup_args
['include_package_data'] = True
91 setup_args
['zip_safe'] = False
95 if __name__
== "__main__":
98 except KeyboardInterrupt: