diff --git setup.py setup.py index 26f052b..e63f1b5 100755 --- setup.py +++ setup.py @@ -54,7 +54,7 @@ dependency resolution is disabled. from twisted.python.dist import ( STATIC_PACKAGE_METADATA, getDataFiles, getExtensions, getAllScripts, - getPackages, setup) + getPackages, setup, EXTRAS_REQUIRE) scripts = getAllScripts() @@ -62,6 +62,7 @@ dependency resolution is disabled. packages=getPackages('twisted'), conditionalExtensions=getExtensions(), scripts=scripts, + extras_require=EXTRAS_REQUIRE, data_files=getDataFiles('twisted'), **STATIC_PACKAGE_METADATA)) diff --git twisted/python/dist.py twisted/python/dist.py index 9566039..c97bf3f 100644 --- twisted/python/dist.py +++ twisted/python/dist.py @@ -50,6 +50,29 @@ twisted_subprojects = ["conch", "lore", "mail", "names", "words"] +# extras_require is a dictionary of items that can be passed to setup.py +# to install optional dependencies. For example, to install the optional +# dev dependencies one would type `pip install -e . "twisted[dev]"` +EXTRAS_REQUIRE = { + 'docs': ['sphinx >= 1.2.2', + 'pydoctor >= 0.5'], + 'dev': ['twistedchecker >= 0.2.0', + 'pyflakes >= 0.8.1', + 'twisted-dev-tools >= 0.0.2'], + 'conch': ['gmpy', + 'pycrypto', + 'pyasn1', + 'pyopenssl'], + 'subunit' : ['python-subunit'], + 'soap': ['soappy'], + 'windows': ['pywin32'], + 'cocoa': ['pyobjc'], + 'serial': ['pyserial'], + 'gtk': ['PyGTK'], + 'pam': ['pam'], + 'wx': ['wxPython'] +} + class ConditionalExtension(Extension): """ diff --git twisted/topfiles/3696.misc twisted/topfiles/3696.misc new file mode 100644 index 0000000..78e79d4 --- /dev/null +++ twisted/topfiles/3696.misc @@ -0,0 +1 @@ +Optional dependencies can be installed using the extra_requires facility provided by setuptools \ No newline at end of file