MECO™ API Reference
|
[ CLASS ] - Class to operate on env paths. More...
Public Member Functions | |
def | __init__ (self, path, envType) |
Constructor. More... | |
def | path (self) |
Property. More... | |
def | envType (self) |
Property. More... | |
def | envPackageType (self) |
Property. More... | |
def | packages (self) |
Property. More... | |
def | isAPackage (self, packageRootPath) |
Check whether given path is a package. More... | |
def | hasPackage (self, packageName, checkPackageInfoModule=False) |
Check whether the env path has a package with given packageName . More... | |
def | doesPackageHaveAVersion (self, packageName, version) |
Check whether a package has a version. More... | |
def | listPackages (self, invokeShouldInitializePackageCallback=False) |
List packages in the env path. More... | |
def | listVersionsOfAPackage (self, packageName) |
List versions of the given package. More... | |
[ CLASS ] - Class to operate on env paths.
def mMeco.libs.envPathLib.EnvPath.__init__ | ( | self, | |
path, | |||
envType | |||
) |
Constructor.
path | [ str | None | in ] - Absolute package path of an environment. |
envType | [ enum | None | in ] - Value from mMeco.libs.enumLib.EnvType enum class. |
N/A |
def mMeco.libs.envPathLib.EnvPath.path | ( | self | ) |
Property.
N/A |
def mMeco.libs.envPathLib.EnvPath.envType | ( | self | ) |
def mMeco.libs.envPathLib.EnvPath.envPackageType | ( | self | ) |
def mMeco.libs.envPathLib.EnvPath.packages | ( | self | ) |
Property.
N/A |
def mMeco.libs.envPathLib.EnvPath.isAPackage | ( | self, | |
packageRootPath | |||
) |
Check whether given path is a package.
Method checks whether package info module file exists relative to packageRootPath
.
packageRootPath | [ str | None | in ] - Root of a package. |
N/A |
packageRootPath
is not a package. def mMeco.libs.envPathLib.EnvPath.hasPackage | ( | self, | |
packageName, | |||
checkPackageInfoModule = False |
|||
) |
Check whether the env path has a package with given packageName
.
If env path wanted to be checked for a versioned package checkPackageInfoModule
should be provided False
as otherwise this method will check package info module file for non-versioned package.
packageName | [ str | None | in ] - Name of a package to be checked. |
checkPackageInfoModule | [ bool | None | in ] - Whether package info module file should be checked. |
N/A |
packageName
exists in the env. def mMeco.libs.envPathLib.EnvPath.doesPackageHaveAVersion | ( | self, | |
packageName, | |||
version | |||
) |
Check whether a package has a version.
packageName | [ str | None | in ] - Name of a package. |
version | [ str | None | in ] - Version to be checked. |
ValueError | - If the env package type is not mMeco.libs.enumLib.EnvPackageType.kVersioned. |
version
doesn't exist for packageName
. def mMeco.libs.envPathLib.EnvPath.listPackages | ( | self, | |
invokeShouldInitializePackageCallback = False |
|||
) |
List packages in the env path.
invokeShouldInitializePackageCallback | [ bool | False | in ] - Whether to invoke shouldInitializePackage callback. |
N/A |
def mMeco.libs.envPathLib.EnvPath.listVersionsOfAPackage | ( | self, | |
packageName | |||
) |
List versions of the given package.
packageName | [ str | None | in ] - Name of a package. |
ValueError | - If the env package type is not mMeco.libs.enumLib.EnvPackageType.kVersioned. |
packageName
.