Foundry.Triplet

Fields

None

Methods

class

new (full_name)

class

new_from_system ()

class

new_with_quadruplet (arch, vendor, kernel, operating_system)

class

new_with_triplet (arch, kernel, operating_system)

get_arch ()

get_full_name ()

get_kernel ()

get_operating_system ()

get_vendor ()

is_system ()

ref ()

unref ()

Details

class Foundry.Triplet
classmethod new(full_name)
Parameters:

full_name (str) – The complete identifier of the machine

Returns:

An Foundry.Triplet.

Return type:

Foundry.Triplet

Creates a new Foundry.Triplet from a given identifier. This identifier can be a simple architecture name, a duet of “arch-kernel” (like “m68k-coff”), a triplet of “arch-kernel-os” (like “x86_64-linux-gnu”) or a quadriplet of “arch-vendor-kernel-os” (like “i686-pc-linux-gnu”)

classmethod new_from_system()
Returns:

An Foundry.Triplet.

Return type:

Foundry.Triplet

Creates a new Foundry.Triplet from a the current system information

classmethod new_with_quadruplet(arch, vendor, kernel, operating_system)
Parameters:
  • arch (str) – The name of the architecture of the machine (like “x86_64”)

  • vendor (str or None) – The name of the vendor of the machine (like “pc”)

  • kernel (str or None) – The name of the kernel of the machine (like “linux”)

  • operating_system (str or None) – The name of the os of the machine (like “gnuabi64”)

Returns:

An Foundry.Triplet.

Return type:

Foundry.Triplet

Creates a new Foundry.Triplet from a given quadruplet of “arch-vendor-kernel-os” (like “i686-pc-linux-gnu”)

classmethod new_with_triplet(arch, kernel, operating_system)
Parameters:
  • arch (str) – The name of the architecture of the machine (like “x86_64”)

  • kernel (str or None) – The name of the kernel of the machine (like “linux”)

  • operating_system (str or None) – The name of the os of the machine (like “gnuabi64”)

Returns:

An Foundry.Triplet.

Return type:

Foundry.Triplet

Creates a new Foundry.Triplet from a given triplet of “arch-kernel-os” (like “x86_64-linux-gnu”)

get_arch()
Returns:

The architecture name of the machine

Return type:

str

Gets the architecture name of the machine

get_full_name()
Returns:

The full name of the machine configuration name

Return type:

str

Gets the full name of the machine configuration name (can be an architecture name, a duet, a triplet or a quadruplet).

get_kernel()
Returns:

The name of the kernel of the machine

Return type:

str or None

Gets name of the kernel of the machine

get_operating_system()
Returns:

The name of the operating system of the machine

Return type:

str or None

Gets name of the operating system of the machine

get_vendor()
Returns:

The vendor name of the machine

Return type:

str or None

Gets the vendor name of the machine

is_system()
Returns:

True if this is the same architecture as the system, False otherwise

Return type:

bool

Gets whether this is the same architecture as the system

ref()
Returns:

An Foundry.Triplet.

Return type:

Foundry.Triplet

Increases the reference count of self

unref()

Decreases the reference count of self Once the reference count reaches 0, the object is freed.