twisted.python._release
module documentationtwisted.python
View Source
Twisted's automated release system.
This module is only for use within Twisted's release system. If you are anyone else, do not use it. The interface and behaviour will change without notice.
Only Linux is supported by this code. It should not be used by any tools which must run on multiple platforms (eg the setup.py script).
Function | runCommand | Execute a vector of arguments. |
Class | CommandFailed | Raised when a child process exits unsuccessfully. |
Interface | IVCSCommand | An interface for VCS commands. |
Class | GitCommand | Subset of Git commands to release Twisted from a Git repository. |
Class | SVNCommand | Subset of SVN commands to release Twisted from a Subversion checkout. |
Function | getRepositoryCommand | No summary |
Function | getNextVersion | Calculate the version number for a new release of Twisted based on the previous version number. |
Function | changeAllProjectVersions | Change the version of the project. |
Class | Project | A representation of a project that has a version. |
Function | findTwistedProjects | Find all Twisted-style projects beneath a base directory. |
Function | generateVersionFileData | Generate the data to be placed into a _version.py file. |
Function | replaceProjectVersion | Write version specification code into the given filename, which sets the version to the given version number. |
Function | replaceInFile | I replace the text `oldstr' with `newstr' in `filename' using science. |
Class | NoDocumentsFound | Raised when no input documents are found. |
Class | APIBuilder | Generate API documentation from source files using pydoctor. This requires pydoctor to be installed and usable. |
Class | NewsBuilder | Generate the new section of a NEWS file. |
Class | SphinxBuilder | Generate HTML documentation using Sphinx. |
Function | filePathDelta | Return a list of strings that represent destination as a
path relative to origin . |
Class | NotWorkingDirectory | Raised when a directory does not appear to be a repository directory of a supported VCS. |
Class | ChangeVersionsScriptOptions | Options for ChangeVersionsScript . |
Class | ChangeVersionsScript | A thing for changing version numbers. See main . |
Class | BuildAPIDocsScript | A thing for building API documentation. See main . |
Function | _changeVersionInFile | Replace the old version number with the new
one in the given filename . |
Execute a vector of arguments.
Parameters | args | A list of arguments, the first of which will be used as the executable to
run. (type: list
of bytes ) |
The current working directory that the command should run with. | ||
Returns | All of the standard output. (type: bytes ) | |
Raises | CommandFailed | when the program exited with a non-0 exit code. |
Detect the VCS used in the specified directory and return either a SVNCommand
or a GitCommand
if the directory is a Subversion checkout or a Git repository,
respectively. If the directory is neither one nor the other, it raises a NotWorkingDirectory
exception.
Parameters | directory | The directory to detect the VCS used from. (type: FilePath ) |
Returns | (type: SVNCommand
or GitCommand ) | |
Raises | NotWorkingDirectory | if no supported VCS can be found from the specified directory. |
Replace the old
version number with the new
one in the given filename
.
Calculate the version number for a new release of Twisted based on the previous version number.
Parameters | version | The previous version number. |
prerelease | If True , make the next version a pre-release one. If
version is a pre-release, it increments the pre-release
counter, otherwise create a new version with prerelease set to 1. (type: bool ) | |
patch | If True , make the next version a patch release. It increments
the micro counter. (type: bool ) | |
today | The current date. (type: datetime ) |
Change the version of the project.
Parameters | root | The root of the Twisted source tree. (type: FilePath ) |
prerelease | (type: bool ) | |
patch | (type: bool ) | |
today | Defaults to the current day, according to the system clock. (type: datetime ) |
Find all Twisted-style projects beneath a base directory.
Parameters | baseDirectory | A twisted.python.filepath.FilePath
to look inside. |
Returns | A list of Project . |
Generate the data to be placed into a _version.py file.
Parameters | version | A version object. |
Write version specification code into the given filename, which sets the version to the given version number.
Parameters | filename | A filename which is most likely a "_version.py" under some Twisted project. |
newversion | A version object. |
I replace the text `oldstr' with `newstr' in `filename' using science.
Return a list of strings that represent destination
as a
path relative to origin
.
It is assumed that both paths represent directories, not files. That is
to say, the delta of twisted.python.filepath.FilePath
/foo/bar to twisted.python.filepath.FilePath
/foo/baz will be ../baz
, not baz
.
Parameters | origin | The origin of the relative path. (type: twisted.python.filepath.FilePath ) |
destination | The destination of the relative path. (type: twisted.python.filepath.FilePath ) |