Top Description Fields Constructors Methods
org.python

public Class Version

extends Object
Class Inheritance
Imports
java.io.IOException, .InputStream, java.util.Arrays, .Collection, .EnumSet, .Properties, .Set, org.python.core.CodeFlag

Jython version information. The version number and build information are loaded from the version.properties file, located in this class file's directory. version.properties is generated by ant.

Field Summary

Modifier and TypeField and Description
public static String
DATE

Timestamp of the current build.

private static final Collection<CodeFlag>
defaultCodeFlags

The flags that are set by default in a code object.

private static String
GIT_BRANCH

Current Git branch git name-rev --name-only HEAD.

private static String
GIT_TAG

Current Git tag git describe --all --always --dirty, e.g. 'tip'.

private static String
GIT_VERSION

Current Git global revision id git rev-parse --short HEAD.

public static int
PY_MAJOR_VERSION

Tokenized version.

public static int
public static int
public static int
public static int
public static String
PY_VERSION

The current version of Jython.

public static String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static String
getBuildInfo()

Return the current build information, including revision and timestamp.

public static Set<CodeFlag>
public static String
getGitIdentifier()

Return the current git identifier name, normally the current tag, falling back to the branch.

public static String
getGitVersion()

Return the current git version number.

public static String
getVersion()

Return the Python version, including compiler (or in our case, the Java VM).

public static String
getVM()

Describe the current Java VM.

private static void
loadProperties()

Load the version information from the properties file.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DATEback to summary
public static String DATE

Timestamp of the current build.

defaultCodeFlagsback to summary
private static final Collection<CodeFlag> defaultCodeFlags

The flags that are set by default in a code object.

GIT_BRANCHback to summary
private static String GIT_BRANCH

Current Git branch git name-rev --name-only HEAD.

GIT_TAGback to summary
private static String GIT_TAG

Current Git tag git describe --all --always --dirty, e.g. 'tip'.

GIT_VERSIONback to summary
private static String GIT_VERSION

Current Git global revision id git rev-parse --short HEAD.

PY_MAJOR_VERSIONback to summary
public static int PY_MAJOR_VERSION

Tokenized version.

PY_MICRO_VERSIONback to summary
public static int PY_MICRO_VERSION
PY_MINOR_VERSIONback to summary
public static int PY_MINOR_VERSION
PY_RELEASE_LEVELback to summary
public static int PY_RELEASE_LEVEL
PY_RELEASE_SERIALback to summary
public static int PY_RELEASE_SERIAL
PY_VERSIONback to summary
public static String PY_VERSION

The current version of Jython.

TIMEback to summary
public static String TIME

Constructor Detail

Versionback to summary
public Version()

Method Detail

getBuildInfoback to summary
public static String getBuildInfo()

Return the current build information, including revision and timestamp.

getDefaultCodeFlagsback to summary
public static Set<CodeFlag> getDefaultCodeFlags()
getGitIdentifierback to summary
public static String getGitIdentifier()

Return the current git identifier name, normally the current tag, falling back to the branch.

getGitVersionback to summary
public static String getGitVersion()

Return the current git version number. May be an empty string on environments that can't determine it.

getVersionback to summary
public static String getVersion()

Return the Python version, including compiler (or in our case, the Java VM).

getVMback to summary
public static String getVM()

Describe the current Java VM.

loadPropertiesback to summary
private static void loadProperties()

Load the version information from the properties file.