Ticket #3696: extra_requires-3696.diff

File extra_requires-3696.diff, 2.0 KB (added by Chris Wolfe, 5 years ago)

dist.py, setup.py, news file

  • setup.py

    diff --git setup.py setup.py
    index 26f052b..e63f1b5 100755
    dependency resolution is disabled. 
    5454
    5555    from twisted.python.dist import (
    5656        STATIC_PACKAGE_METADATA, getDataFiles, getExtensions, getAllScripts,
    57         getPackages, setup)
     57        getPackages, setup, EXTRAS_REQUIRE)
    5858
    5959    scripts = getAllScripts()
    6060
    dependency resolution is disabled. 
    6262        packages=getPackages('twisted'),
    6363        conditionalExtensions=getExtensions(),
    6464        scripts=scripts,
     65        extras_require=EXTRAS_REQUIRE,
    6566        data_files=getDataFiles('twisted'),
    6667        **STATIC_PACKAGE_METADATA))
    6768
  • twisted/python/dist.py

    diff --git twisted/python/dist.py twisted/python/dist.py
    index 9566039..c97bf3f 100644
    twisted_subprojects = ["conch", "lore", "mail", "names", 
    5050                       "words"]
    5151
    5252
     53# extras_require is a dictionary of items that can be passed to setup.py
     54# to install optional dependencies. For example, to install the optional
     55# dev dependencies one would type `pip install -e . "twisted[dev]"`
     56EXTRAS_REQUIRE = {
     57    'docs': ['sphinx >= 1.2.2',
     58             'pydoctor >= 0.5'],
     59    'dev': ['twistedchecker >= 0.2.0',
     60            'pyflakes >= 0.8.1',
     61            'twisted-dev-tools >= 0.0.2'],
     62    'conch': ['gmpy',
     63              'pycrypto',
     64              'pyasn1',
     65              'pyopenssl'],
     66    'subunit' : ['python-subunit'],
     67    'soap': ['soappy'],
     68    'windows': ['pywin32'],
     69    'cocoa': ['pyobjc'],
     70    'serial': ['pyserial'],
     71    'gtk': ['PyGTK'],
     72    'pam': ['pam'],
     73    'wx': ['wxPython']
     74}
     75
    5376
    5477class ConditionalExtension(Extension):
    5578    """
  • new file twisted/topfiles/3696.misc

    diff --git twisted/topfiles/3696.misc twisted/topfiles/3696.misc
    new file mode 100644
    index 0000000..78e79d4
    - +  
     1Optional dependencies can be installed using the extra_requires facility provided by setuptools
     2 No newline at end of file