Ejemplo n.º 1
0
def main(args):
    """
    Invoke twisted.python.dist with the appropriate metadata about the
    Twisted package.
    """
    if os.path.exists('twisted'):
        sys.path.insert(0, '.')
    from twisted import copyright
    from twisted.python.dist import getDataFiles, getExtensions, getScripts, \
        getPackages, setup, twisted_subprojects

    # "" is included because core scripts are directly in bin/
    projects = [''] + [x for x in os.listdir('bin')
                       if os.path.isdir(os.path.join("bin", x))
                       and x in twisted_subprojects]

    scripts = []
    for i in projects:
        scripts.extend(getScripts(i))

    setup_args = dict(
        # metadata
        name="Twisted",
        version=copyright.version,
        description="An asynchronous networking framework written in Python",
        author="Twisted Matrix Laboratories",
        author_email="*****@*****.**",
        maintainer="Glyph Lefkowitz",
        maintainer_email="*****@*****.**",
        url="http://twistedmatrix.com/",
        license="MIT",
        long_description="""\
An extensible framework for Python programming, with special focus
on event-based network programming and multiprotocol integration.
""",
        packages = getPackages('twisted'),
        conditionalExtensions = getExtensions(),
        scripts = scripts,
        data_files=getDataFiles('twisted'),
        classifiers=[
            "Programming Language :: Python :: 2.5",
            "Programming Language :: Python :: 2.6",
            "Programming Language :: Python :: 2.7",
            ])

    if 'setuptools' in sys.modules:
        from pkg_resources import parse_requirements
        requirements = ["zope.interface"]
        try:
            list(parse_requirements(requirements))
        except:
            print """You seem to be running a very old version of setuptools.
This version of setuptools has a bug parsing dependencies, so automatic
dependency resolution is disabled.
"""
        else:
            setup_args['install_requires'] = requirements
        setup_args['include_package_data'] = True
        setup_args['zip_safe'] = False
    setup(**setup_args)
Ejemplo n.º 2
0
def main(args):
    """
    Invoke twisted.python.dist with the appropriate metadata about the
    Twisted package.
    """
    if os.path.exists('twisted'):
        sys.path.insert(0, '.')
    from twisted import copyright
    from twisted.python.dist import getDataFiles, getExtensions, getScripts, \
        getPackages, setup, twisted_subprojects

    # "" is included because core scripts are directly in bin/
    projects = [''] + [x for x in os.listdir('bin')
                       if os.path.isdir(os.path.join("bin", x))
                       and x in twisted_subprojects]

    scripts = []
    for i in projects:
        scripts.extend(getScripts(i))

    setup_args = dict(
        # metadata
        name="Twisted",
        version=copyright.version,
        description="An asynchronous networking framework written in Python",
        author="Twisted Matrix Laboratories",
        author_email="*****@*****.**",
        maintainer="Glyph Lefkowitz",
        maintainer_email="*****@*****.**",
        url="http://twistedmatrix.com/",
        license="MIT",
        long_description="""\
An extensible framework for Python programming, with special focus
on event-based network programming and multiprotocol integration.
""",
        packages = getPackages('twisted'),
        conditionalExtensions = getExtensions(),
        scripts = scripts,
        data_files=getDataFiles('twisted'),
        classifiers=[
            "Programming Language :: Python :: 2.6",
            "Programming Language :: Python :: 2.7",
            ])

    if 'setuptools' in sys.modules:
        from pkg_resources import parse_requirements
        requirements = ["zope.interface"]
        try:
            list(parse_requirements(requirements))
        except:
            print("""You seem to be running a very old version of setuptools.
This version of setuptools has a bug parsing dependencies, so automatic
dependency resolution is disabled.
""")
        else:
            setup_args['install_requires'] = requirements
        setup_args['include_package_data'] = True
        setup_args['zip_safe'] = False
    setup(**setup_args)
Ejemplo n.º 3
0
def main(args):
    """
    Invoke twisted.python.dist with the appropriate metadata about the
    Twisted package.
    """
    # On Python 3, use setup3.py until Python 3 port is done:
    if sys.version_info[0] > 2:
        import setup3

        setup3.main()
        return

    if os.path.exists("twisted"):
        sys.path.insert(0, ".")

    setup_args = {}

    if "setuptools" in sys.modules:
        from pkg_resources import parse_requirements

        requirements = ["zope.interface >= 3.6.0"]
        try:
            list(parse_requirements(requirements))
        except:
            print(
                """You seem to be running a very old version of setuptools.
This version of setuptools has a bug parsing dependencies, so automatic
dependency resolution is disabled.
"""
            )
        else:
            setup_args["install_requires"] = requirements
        setup_args["include_package_data"] = True
        setup_args["zip_safe"] = False

    from twisted.python.dist import (
        STATIC_PACKAGE_METADATA,
        getDataFiles,
        getExtensions,
        getAllScripts,
        getPackages,
        setup,
        _EXTRAS_REQUIRE,
    )

    scripts = getAllScripts()

    setup_args.update(
        dict(
            packages=getPackages("twisted"),
            conditionalExtensions=getExtensions(),
            scripts=scripts,
            extras_require=_EXTRAS_REQUIRE,
            data_files=getDataFiles("twisted"),
            **STATIC_PACKAGE_METADATA
        )
    )

    setup(**setup_args)
Ejemplo n.º 4
0
def main(args):
    """
    Invoke twisted.python.dist with the appropriate metadata about the
    Twisted package.
    """
    # On Python 3, use setup3.py until Python 3 port is done:
    if sys.version_info[0] > 2:
        import setup3
        setup3.main()
        return

    if os.path.exists('twisted'):
        sys.path.insert(0, '.')

    setup_args = {}

    if 'setuptools' in sys.modules:
        from pkg_resources import parse_requirements
        requirements = ["zope.interface >= 3.6.0"]
        try:
            list(parse_requirements(requirements))
        except:
            print("""You seem to be running a very old version of setuptools.
This version of setuptools has a bug parsing dependencies, so automatic
dependency resolution is disabled.
""")
        else:
            setup_args['install_requires'] = requirements
        setup_args['include_package_data'] = True
        setup_args['zip_safe'] = False

    from twisted.python.dist import (STATIC_PACKAGE_METADATA, getDataFiles,
                                     getExtensions, getAllScripts, getPackages,
                                     setup, _EXTRAS_REQUIRE)

    scripts = getAllScripts()

    setup_args.update(
        dict(packages=getPackages('twisted'),
             conditionalExtensions=getExtensions(),
             scripts=scripts,
             extras_require=_EXTRAS_REQUIRE,
             data_files=getDataFiles('twisted'),
             **STATIC_PACKAGE_METADATA))

    setup(**setup_args)
Ejemplo n.º 5
0
def main(args):
    """
    Invoke twisted.python.dist with the appropriate metadata about the
    Twisted package.
    """
    if os.path.exists('twisted'):
        sys.path.insert(0, '.')

    setup_args = {}

    if 'setuptools' in sys.modules:
        from pkg_resources import parse_requirements
        requirements = ["zope.interface >= 3.6.0"]
        try:
            list(parse_requirements(requirements))
        except:
            print("""You seem to be running a very old version of setuptools.
This version of setuptools has a bug parsing dependencies, so automatic
dependency resolution is disabled.
""")
        else:
            setup_args['install_requires'] = requirements
            setuptools._TWISTED_NO_CHECK_REQUIREMENTS = True
        setup_args['include_package_data'] = True
        setup_args['zip_safe'] = False

    from twisted.python.dist import (
        STATIC_PACKAGE_METADATA, getDataFiles, getExtensions, getAllScripts,
        getPackages, setup)

    scripts = getAllScripts()

    setup_args.update(dict(
        packages=getPackages('twisted'),
        conditionalExtensions=getExtensions(),
        scripts=scripts,
        data_files=getDataFiles('twisted'),
        **STATIC_PACKAGE_METADATA))

    setup(**setup_args)
Ejemplo n.º 6
0
def main():
    from setuptools import setup

    # Make sure the to-be-installed version of Twisted is used, if available,
    # since we're importing from it:
    if os.path.exists('twisted'):
        sys.path.insert(0, '.')

    from twisted.python.dist3 import modulesToInstall
    from twisted.python.dist3 import testDataFiles, _processDataFileList
    from twisted.python.dist import STATIC_PACKAGE_METADATA, getDataFiles

    _dataFiles = _processDataFileList(testDataFiles)
    args = STATIC_PACKAGE_METADATA.copy()
    args['install_requires'] = ["zope.interface >= 4.0.2"]
    args['py_modules'] = modulesToInstall
    args['data_files'] = getDataFiles('twisted') + _dataFiles
    args['zip_safe'] = False
    args['cmdclass'] = {'sdist': DisabledSdist}
    args['scripts'] = ['bin/trial', 'bin/twistd']

    setup(**args)
Ejemplo n.º 7
0
def main():
    from setuptools import setup

    # Make sure the to-be-installed version of Twisted is used, if available,
    # since we're importing from it:
    if os.path.exists('twisted'):
        sys.path.insert(0, '.')

    from twisted.python.dist3 import modulesToInstall
    from twisted.python.dist3 import testDataFiles, _processDataFileList
    from twisted.python.dist import STATIC_PACKAGE_METADATA, getDataFiles

    _dataFiles = _processDataFileList(testDataFiles)
    args = STATIC_PACKAGE_METADATA.copy()
    args['install_requires'] = ["zope.interface >= 4.0.2"]
    args['py_modules'] = modulesToInstall
    args['data_files'] = getDataFiles('twisted') + _dataFiles
    args['zip_safe'] = False
    args['cmdclass'] = {'sdist': DisabledSdist}
    args['scripts'] = ['bin/trial']

    setup(**args)
Ejemplo n.º 8
0
def main(args):
    """
    Invoke twisted.python.dist with the appropriate metadata about the
    Twisted package.
    """
    # On Python 3, use setup3.py until Python 3 port is done:
    if sys.version_info[0] > 2:
        import setup3
        setup3.main()
        return

    if os.path.exists('twisted'):
        sys.path.insert(0, '.')

    setup_args = {}
    requirements = ["zope.interface >= 3.6.0"]

    setup_args['install_requires'] = requirements
    setup_args['include_package_data'] = True
    setup_args['zip_safe'] = False

    from twisted.python.dist import (STATIC_PACKAGE_METADATA, getDataFiles,
                                     getExtensions, getScripts, getPackages,
                                     setup, _EXTRAS_REQUIRE)

    scripts = getScripts()

    setup_args.update(
        dict(packages=getPackages('twisted'),
             conditionalExtensions=getExtensions(),
             scripts=scripts,
             extras_require=_EXTRAS_REQUIRE,
             data_files=getDataFiles('twisted'),
             **STATIC_PACKAGE_METADATA))

    setup(**setup_args)
Ejemplo n.º 9
0
def main(args):
    """
    Invoke twisted.python.dist with the appropriate metadata about the
    Twisted package.
    """
    # On Python 3, use setup3.py until Python 3 port is done:
    if sys.version_info[0] > 2:
        import setup3
        setup3.main()
        return

    if os.path.exists('twisted'):
        sys.path.insert(0, '.')

    setup_args = {}
    requirements = ["zope.interface >= 3.6.0"]

    setup_args['install_requires'] = requirements
    setup_args['include_package_data'] = True
    setup_args['zip_safe'] = False

    from twisted.python.dist import (
        STATIC_PACKAGE_METADATA, getDataFiles, getExtensions, getScripts,
        getPackages, setup, _EXTRAS_REQUIRE)

    scripts = getScripts()

    setup_args.update(dict(
        packages=getPackages('twisted'),
        conditionalExtensions=getExtensions(),
        scripts=scripts,
        extras_require=_EXTRAS_REQUIRE,
        data_files=getDataFiles('twisted'),
        **STATIC_PACKAGE_METADATA))

    setup(**setup_args)
Ejemplo n.º 10
0
    author="Twisted Matrix Laboratories",
    author_email="*****@*****.**",
    maintainer="Glyph Lefkowitz",
    url="http://twistedmatrix.com/",
    license="MIT",
    long_description="""\
This is the core of Twisted, including:
 * Networking support (twisted.internet)
 * Trial, the unit testing framework (twisted.trial)
 * AMP, the Asynchronous Messaging Protocol (twisted.protocols.amp)
 * Twisted Spread, a remote object system (twisted.spread)
 * Utility code (twisted.python)
 * Basic abstractions that multiple subprojects use
   (twisted.cred, twisted.application, twisted.plugin)
 * Database connectivity support (twisted.enterprise)
 * A few basic protocols and protocol abstractions (twisted.protocols)
""",

    # build stuff
    packages=getPackages('twisted',
                         ignore=twisted_subprojects + ['plugins']),
    plugins=plugins,
    data_files=getDataFiles('twisted', ignore=twisted_subprojects),
    conditionalExtensions=extensions,
    scripts = getScripts(""),
)


if __name__ == '__main__':
    setup(**setup_args)
Ejemplo n.º 11
0
    version=copyright.version,
    description="The core parts of the Twisted networking framework",
    author="Twisted Matrix Laboratories",
    author_email="*****@*****.**",
    maintainer="Glyph Lefkowitz",
    url="http://twistedmatrix.com/",
    license="MIT",
    long_description="""\
This is the core of Twisted, including:
 * Networking support (twisted.internet)
 * Trial, the unit testing framework (twisted.trial)
 * AMP, the Asynchronous Messaging Protocol (twisted.protocols.amp)
 * Twisted Spread, a remote object system (twisted.spread)
 * Utility code (twisted.python)
 * Basic abstractions that multiple subprojects use
   (twisted.cred, twisted.application, twisted.plugin)
 * Database connectivity support (twisted.enterprise)
 * A few basic protocols and protocol abstractions (twisted.protocols)
""",
    # build stuff
    packages=getPackages("twisted", ignore=twisted_subprojects + ["plugins"]),
    plugins=plugins,
    data_files=getDataFiles("twisted", ignore=twisted_subprojects),
    conditionalExtensions=extensions,
    scripts=getScripts(""),
)


if __name__ == "__main__":
    setup(**setup_args)