pex.platform.types

Module Contents

class pex.platform.types.Platform(name: str, alter_names: list = [], exec: str | None = None, sub_sets: list = [])

Bases: object

Subclass of pex.platform.types module.

This subclass of pex.platform.types module is intended for providing an implementation of platform descriptor.

__hash__() int

Make this architecture hashable.

Return int:

architecture hash

__add__(platform: Any) Any

Add platform to current platform sub sets.

Parameters:

platform (Any) – platform to add

Return Any:

updated platform

__sub__(platform: Any) Any

Remove platform from current sub sets.

Parameters:

platform (Any) – platform to remove

Return Any:

updated platform

__str__() str

Covert to string.

Return str:

platform name

__contains__(platform: Any) bool

Check if platform is a sub set of current one.

Parameters:

platform (Any) – can be platform name of alternative name

Return bool:

True if contains else False

__eq__(platform: Any) bool

Check if platform compatible with current one.

Parameters:

platform (Any) – can be platform name or alternative name

Return bool:

True if compatible else False

pex.platform.types.OS_ANDROID
pex.platform.types.OS_MACOS
pex.platform.types.OS_WINDOWS
pex.platform.types.OS_LINUX
pex.platform.types.OS_IPHONE
pex.platform.types.OS_UNIX
pex.platform.types.OS_GENERIC