pymor.version

Git implementation of _version.py.

Module Contents

Classes

VersioneerConfig

Container for Versioneer configuration parameters.

Functions

get_keywords

Get the keywords needed to look up the version information.

get_config

Create, populate and return the VersioneerConfig() object.

register_vcs_handler

Create decorator to mark a method as the handler of a VCS.

run_command

Call the given command(s).

versions_from_parentdir

Try to determine the version from the parent directory name.

git_get_keywords

Extract version information from the given file.

git_versions_from_keywords

Get version information from git keywords.

git_pieces_from_vcs

Get version from 'git describe' in the root of the source tree.

plus_or_dot

Return a + if we don't already have one, else return a .

render_pep440

Build up version string, with post-release "local version identifier".

render_pep440_pre

TAG[.post2.devRUN_NUMBER] -- No -dirty.

render_pep440_post

TAG[.postDISTANCE[.dev0]+gHEX] .

render_pep440_old

TAG[.postDISTANCE[.dev0]] .

render_git_describe

TAG[-DISTANCE-gHEX][-dirty].

render_git_describe_long

TAG-DISTANCE-gHEX[-dirty].

render

Render the given version pieces into the requested style.

get_versions

Get version information or return default if unable to do so.

Attributes

LONG_VERSION_PY

HANDLERS

pymor.version.get_keywords()[source]

Get the keywords needed to look up the version information.

class pymor.version.VersioneerConfig[source]

Container for Versioneer configuration parameters.

pymor.version.get_config()[source]

Create, populate and return the VersioneerConfig() object.

exception pymor.version.NotThisMethod[source]

Bases: Exception

Exception raised if a method is not valid for the current scenario.

pymor.version.LONG_VERSION_PY[source]
pymor.version.HANDLERS[source]
pymor.version.register_vcs_handler(vcs, method)[source]

Create decorator to mark a method as the handler of a VCS.

pymor.version.run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, env=None)[source]

Call the given command(s).

pymor.version.versions_from_parentdir(parentdir_prefix, root, verbose)[source]

Try to determine the version from the parent directory name.

Source tarballs conventionally unpack into a directory that includes both the project name and a version string. We will also support searching up two directory levels for an appropriately named parent directory

pymor.version.git_get_keywords(versionfile_abs)[source]

Extract version information from the given file.

pymor.version.git_versions_from_keywords(keywords, tag_prefix, verbose)[source]

Get version information from git keywords.

pymor.version.git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command)[source]

Get version from ‘git describe’ in the root of the source tree.

This only gets called if the git-archive ‘subst’ keywords were not expanded, and _version.py hasn’t already been rewritten with a short version string, meaning we’re inside a checked out source tree.

pymor.version.plus_or_dot(pieces)[source]

Return a + if we don’t already have one, else return a .

pymor.version.render_pep440(pieces)[source]

Build up version string, with post-release “local version identifier”.

Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you get a tagged build and then dirty it, you’ll get TAG+0.gHEX.dirty

Exceptions: 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty]

pymor.version.render_pep440_pre(pieces)[source]

TAG[.post2.devRUN_NUMBER] – No -dirty.

Exceptions: 1: no tags. 0.post2.devRUN_NUMBER

pymor.version.render_pep440_post(pieces)[source]

TAG[.postDISTANCE[.dev0]+gHEX] .

The “.dev0” means dirty. Note that .dev0 sorts backwards (a dirty tree will appear “older” than the corresponding clean one), but you shouldn’t be releasing software with -dirty anyways.

Exceptions: 1: no tags. 0.postDISTANCE[.dev0]

pymor.version.render_pep440_old(pieces)[source]

TAG[.postDISTANCE[.dev0]] .

The “.dev0” means dirty.

Exceptions: 1: no tags. 0.postDISTANCE[.dev0]

pymor.version.render_git_describe(pieces)[source]

TAG[-DISTANCE-gHEX][-dirty].

Like ‘git describe –tags –dirty –always’.

Exceptions: 1: no tags. HEX[-dirty] (note: no ‘g’ prefix)

pymor.version.render_git_describe_long(pieces)[source]

TAG-DISTANCE-gHEX[-dirty].

Like ‘git describe –tags –dirty –always -long’. The distance/hash is unconditional.

Exceptions: 1: no tags. HEX[-dirty] (note: no ‘g’ prefix)

pymor.version.render(pieces, style)[source]

Render the given version pieces into the requested style.

pymor.version.get_versions()[source]

Get version information or return default if unable to do so.