Distutils convenience functionality.

Don't use this outside of Twisted.

Maintainer: Christopher Armstrong

Class ConditionalExtension An extension module that will only be compiled if certain conditions are met.
Function setup An alternative to distutils' setup() which is specially designed for Twisted subprojects.
Function get_setup_args Undocumented
Function getVersion Extract the version number.
Function relativeTo Gets 'relativee' relative to 'basepath'.
Function getDataFiles Get all the data files that should be included in this distutils Project.
Function getExtensions Get the C extensions used for Twisted.
Function getPackages Get all packages which are under dname. This is necessary for Python 2.2's distutils. Pretty similar arguments to getDataFiles, including 'parent'.
Function getScripts Returns a list of scripts for Twisted.
Class build_scripts_twisted Renames scripts so they end with '.py' on Windows.
Class install_data_twisted I make sure data files are installed in the package directory.
Class build_ext_twisted Allow subclasses to easily detect and customize Extensions to build at install-time.
Variable _EXTRA_OPTIONS These are the actual package names and versions that will be used by extras_require. This is not passed to setup directly so that combinations of the packages can be created without the need to copy package names multiple times.
Variable _EXTRAS_REQUIRE 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 ".[dev]"

This has been supported by setuptools since 0.5a4.

Variable _PLATFORM_INDEPENDENT A list of all optional cross-platform dependencies, as setuptools version specifiers, used to populate _EXTRAS_REQUIRE.
Function _filterNames Given a list of file names, return those names that should be copied.
Function _checkCPython Checks if this implementation is CPython.
_EXTRA_OPTIONS =
These are the actual package names and versions that will be used by extras_require. This is not passed to setup directly so that combinations of the packages can be created without the need to copy package names multiple times.
_EXTRAS_REQUIRE =
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 ".[dev]"

This has been supported by setuptools since 0.5a4.

_PLATFORM_INDEPENDENT =
A list of all optional cross-platform dependencies, as setuptools version specifiers, used to populate _EXTRAS_REQUIRE.
def setup(**kw): (source)

An alternative to distutils' setup() which is specially designed for Twisted subprojects.

ParametersconditionalExtensionsExtensions to optionally build. (type: list of ConditionalExtension)
def get_setup_args(**kw): (source)
Undocumented
def getVersion(base): (source)

Extract the version number.

ReturnsThe version number of the project, as a string like "2.0.0". (type: str)
def _filterNames(names): (source)

Given a list of file names, return those names that should be copied.

def relativeTo(base, relativee): (source)

Gets 'relativee' relative to 'basepath'.

i.e.,

>>> relativeTo('/home/', '/home/radix/')
'radix'
>>> relativeTo('.', '/home/radix/Projects/Twisted') # curdir is /home/radix
'Projects/Twisted'

The 'relativee' must be a child of 'basepath'.

def getDataFiles(dname, ignore=None, parent=None): (source)

Get all the data files that should be included in this distutils Project.

'dname' should be the path to the package that you're distributing.

'ignore' is a list of sub-packages to ignore. This facilitates disparate package hierarchies. That's a fancy way of saying that the 'twisted' package doesn't want to include the 'twisted.conch' package, so it will pass ['conch'] as the value.

'parent' is necessary if you're distributing a subpackage like twisted.conch. 'dname' should point to 'twisted/conch' and 'parent' should point to 'twisted'. This ensures that your data_files are generated correctly, only using relative paths for the first element of the tuple ('twisted/conch/*'). The default 'parent' is the current working directory.

def getExtensions(): (source)

Get the C extensions used for Twisted.

def getPackages(dname, pkgname=None, results=None, ignore=None, parent=None): (source)

Get all packages which are under dname. This is necessary for Python 2.2's distutils. Pretty similar arguments to getDataFiles, including 'parent'.

def getScripts(basedir=''): (source)

Returns a list of scripts for Twisted.

def _checkCPython(sys=sys, platform=platform): (source)

Checks if this implementation is CPython.

This uses platform.python_implementation.

This takes sys and platform kwargs that by default use the real modules. You shouldn't care about these -- they are for testing purposes only.

ReturnsFalse if the implementation is definitely not CPython, True otherwise.
API Documentation for Twisted, generated by pydoctor at 2015-11-29 11:40:45.