Groups

All groups

All recognized groups and their properties:

Icon

Group ID

Description

Canonical

Member count

🏛️

all_architectures

All architectures

25

all_ci

All CI systems

12

⚙️

all_platforms

All platforms

48

all_traits

Any architectures, platforms and CI systems

85

📱

any_arm

Any ARM architecture

5

🔧

any_mips

Any MIPS architecture

4

☀️

any_sparc

Any SPARC architecture

2

🪟

any_windows

Any Windows

1

🅱️+

bsd

Any BSD

6

🅱️

bsd_without_macos

Any BSD excluding macOS

5

🏢

ibm_mainframe

IBM mainframe

1

🐧

linux

Any Linux distribution

35

linux_layers

Any Linux compatibility layers

2

🐧+

linux_like

Any Linux and compatibility layers

37

🐉

loongarch

LoongArch

1

other_unix

Any other Unix

1

powerpc

PowerPC family

3

🌱

riscv

RISC-V family

2

system_v

AT&T System Five

2

unix

Any Unix

47

unix_layers

Any Unix compatibility layers

1

unix_without_macos

Any Unix excluding macOS

46

🌐

webassembly

WebAssembly

2

🔲

x86

x86 family

4

extra_platforms.group API

Group a collection of traits. Also referred as families.

class extra_platforms.group.Group(id, name, icon='❓', members=<factory>)[source]

Bases: object

A Group identifies a collection of Trait members.

Supports set-like operations (union, intersection, difference, etc.).

id: str

Unique ID of the group.

name: str

User-friendly description of a group.

icon: str = '❓'

Icon of the group.

members: Iterable[Trait]

Traits in this group.

Normalized to MappingProxyType[str, Trait] at init, providing O(1) lookup by ID.

property member_ids: frozenset[str]

Set of member IDs that belong to this group.

property canonical: bool

Returns True if the group is canonical (non-overlapping), False otherwise.

A canonical group is one that does not share any members with other groups, and is composed of members that are of the same kind.

property short_desc: str

Returns the group name with its first letter in lowercase to be used as a short description.

Mainly used to produce docstrings for function dynamically generated for each group.

items()[source]

Iterate over the traits of the group as key-value pairs.

Return type:

Iterator[tuple[str, Trait]]

isdisjoint(other)[source]

Return True if the group has no members in common with other.

Groups are disjoint if and only if their intersection is an empty set.

other can be an arbitrarily nested Iterable of Group and Trait.

Return type:

bool

fullyintersects(other)[source]

Return True if the group has all members in common with other.

Return type:

bool

issubset(other)[source]

Test whether every member in the group is in other.

Return type:

bool

issuperset(other)[source]

Test whether every member in other is in the group.

Return type:

bool

union(*others)[source]

Return a new Group with members from the group and all others.

Caution

The new Group will inherits the metadata of the first one. All other groups’ metadata will be ignored.

Return type:

Group

intersection(*others)[source]

Return a new Group with members common to the group and all others.

Caution

The new Group will inherits the metadata of the first one. All other groups’ metadata will be ignored.

Return type:

Group

difference(*others)[source]

Return a new Group with members in the group that are not in the others.

Caution

The new Group will inherits the metadata of the first one. All other groups’ metadata will be ignored.

Return type:

Group

symmetric_difference(other)[source]

Return a new Group with members in either the group or other but not both.

Caution

The new Group will inherits the metadata of the first one. All other groups’ metadata will be ignored.

Return type:

Group

copy(id=None, name=None, icon=None, members=None)[source]

Return a shallow copy of the group.

Fields can be overridden by passing new values as arguments.

Return type:

Group

add(member)[source]

Return a new Group with the specified trait added.

If the trait is already in the group, returns a copy unchanged.

Return type:

Group

Args:

member: A Trait object or trait ID string to add.

Returns:

A new Group instance with the trait added.

Raises:

ValueError: If the trait ID is not recognized.

remove(member)[source]

Return a new Group with the specified trait removed.

Raises KeyError if the trait is not in the group.

Return type:

Group

Args:

member: A Trait object or trait ID string to remove.

Returns:

A new Group instance with the trait removed.

Raises:

KeyError: If the trait is not in the group.

discard(member)[source]

Return a new Group with the specified trait removed if present.

Unlike remove(), this does not raise an error if the trait is not found.

Return type:

Group

Args:

member: A Trait object or trait ID string to remove.

Returns:

A new Group instance with the trait removed, or a copy if not present.

pop(member_id=None)[source]

Remove and return a trait from the group.

Return type:

tuple[Trait, Group]

Args:
member_id: Optional trait ID to remove. If not provided, removes an arbitrary

trait (specifically, the first one in iteration order).

Returns:

A tuple of (removed_trait, new_group).

Raises:

KeyError: If member_id is provided but not found in the group. KeyError: If the group is empty.

clear()[source]

Return a new empty Group with the same metadata.

Return type:

Group

Returns:

A new Group instance with no members but same id, name, and icon.

extra_platforms.group_data API

Definitions of ready-to-use groups.

extra_platforms.group_data.ALL_ARCHITECTURES: Group = Group(id='all_architectures', name='All architectures')

All supported architectures.

extra_platforms.group_data.ANY_ARM = Group(id='any_arm', name='Any ARM architecture')

All ARM-based architectures.

extra_platforms.group_data.X86 = Group(id='x86', name='x86 family')

All x86-based architectures (Intel-compatible).

extra_platforms.group_data.LOONGARCH = Group(id='loongarch', name='LoongArch')

LoongArch architecture.

extra_platforms.group_data.ANY_MIPS = Group(id='any_mips', name='Any MIPS architecture')

All MIPS-based architectures.

extra_platforms.group_data.POWERPC = Group(id='powerpc', name='PowerPC family')

All PowerPC-based architectures.

extra_platforms.group_data.RISCV = Group(id='riscv', name='RISC-V family')

All RISC-V-based architectures.

extra_platforms.group_data.ANY_SPARC = Group(id='any_sparc', name='Any SPARC architecture')

All SPARC-based architectures.

extra_platforms.group_data.IBM_MAINFRAME = Group(id='ibm_mainframe', name='IBM mainframe')

IBM mainframe architectures.

extra_platforms.group_data.WEBASSEMBLY = Group(id='webassembly', name='WebAssembly')

WebAssembly architectures.

extra_platforms.group_data.ANY_WINDOWS = Group(id='any_windows', name='Any Windows')

All Windows operating systems.

extra_platforms.group_data.UNIX = Group(id='unix', name='Any Unix')

All Unix-like operating systems and compatibility layers.

extra_platforms.group_data.UNIX_WITHOUT_MACOS = Group(id='unix_without_macos', name='Any Unix excluding macOS')

All Unix platforms, without macOS.

This is useful to avoid macOS-specific workarounds on Unix platforms.

extra_platforms.group_data.BSD = Group(id='bsd', name='Any BSD')

All BSD platforms.

Note

Are considered of this family (according Wikipedia):

  • 386BSD (FreeBSD, NetBSD, OpenBSD, DragonFly BSD)

  • NeXTSTEP

  • Darwin (macOS, iOS, audioOS, iPadOS, tvOS, watchOS, bridgeOS)

  • SunOS

  • Ultrix

extra_platforms.group_data.BSD_WITHOUT_MACOS = Group(id='bsd_without_macos', name='Any BSD excluding macOS')

All BSD platforms, without macOS.

This is useful to avoid macOS-specific workarounds on BSD platforms.

extra_platforms.group_data.LINUX = Group(id='linux', name='Any Linux distribution')

All distributions based on a Linux kernel.

Note

Are considered of this family (according Wikipedia):

  • Android

  • ChromeOS

  • any other distribution

extra_platforms.group_data.LINUX_LAYERS = Group(id='linux_layers', name='Any Linux compatibility layers')

Interfaces that allows Linux binaries to run on a different host system.

Note

Are considered of this family (according Wikipedia):

  • Windows Subsystem for Linux

extra_platforms.group_data.LINUX_LIKE = Group(id='linux_like', name='Any Linux and compatibility layers')

Sum of all Linux distributions and Linux compatibility layers.

extra_platforms.group_data.SYSTEM_V = Group(id='system_v', name='AT&T System Five')

All Unix platforms derived from AT&T System Five.

Note

Are considered of this family (according Wikipedia):

  • A/UX

  • AIX

  • HP-UX

  • IRIX

  • OpenServer

  • Solaris

  • OpenSolaris

  • Illumos

  • Tru64

  • UNIX

  • UnixWare

extra_platforms.group_data.UNIX_LAYERS = Group(id='unix_layers', name='Any Unix compatibility layers')

Interfaces that allows Unix binaries to run on a different host system.

Note

Are considered of this family (according Wikipedia):

  • Cygwin

  • Darling

  • Eunice

  • GNV

  • Interix

  • MachTen

  • Microsoft POSIX subsystem

  • MKS Toolkit

  • PASE

  • P.I.P.S.

  • PWS/VSE-AF

  • UNIX System Services

  • UserLAnd Technologies

  • Windows Services for UNIX

extra_platforms.group_data.OTHER_UNIX = Group(id='other_unix', name='Any other Unix')

All other Unix platforms.

Note

Are considered of this family (according Wikipedia):

  • Coherent

  • GNU/Hurd

  • HarmonyOS

  • LiteOS

  • LynxOS

  • Minix

  • MOS

  • OSF/1

  • QNX

  • BlackBerry 10

  • Research Unix

  • SerenityOS

extra_platforms.group_data.ALL_CI = Group(id='all_ci', name='All CI systems')

All Continuous Integration systems.

extra_platforms.group_data.ALL_TRAITS = Group(id='all_traits', name='Any architectures, platforms and CI systems')

All supported architectures, platforms and CI systems.

extra_platforms.group_data.ALL_ARCHITECTURE_GROUPS: frozenset[Group] = frozenset({Group(id='ibm_mainframe', name='IBM mainframe'), Group(id='webassembly', name='WebAssembly'), Group(id='any_sparc', name='Any SPARC architecture'), Group(id='x86', name='x86 family'), Group(id='powerpc', name='PowerPC family'), Group(id='riscv', name='RISC-V family'), Group(id='loongarch', name='LoongArch'), Group(id='any_arm', name='Any ARM architecture'), Group(id='any_mips', name='Any MIPS architecture'), Group(id='all_architectures', name='All architectures')})

All groups whose members are architectures.

extra_platforms.group_data.ALL_PLATFORM_GROUPS: frozenset[Group] = frozenset({Group(id='linux_layers', name='Any Linux compatibility layers'), Group(id='linux_like', name='Any Linux and compatibility layers'), Group(id='bsd_without_macos', name='Any BSD excluding macOS'), Group(id='bsd', name='Any BSD'), Group(id='system_v', name='AT&T System Five'), Group(id='unix_layers', name='Any Unix compatibility layers'), Group(id='unix', name='Any Unix'), Group(id='any_windows', name='Any Windows'), Group(id='linux', name='Any Linux distribution'), Group(id='other_unix', name='Any other Unix'), Group(id='unix_without_macos', name='Any Unix excluding macOS'), Group(id='all_platforms', name='All platforms')})

All groups whose members are platforms.

extra_platforms.group_data.ALL_CI_GROUPS: frozenset[Group] = frozenset({Group(id='all_ci', name='All CI systems')})

All groups whose members are CI systems.

Note

Not that useful currently, but provided for symmetry with architecture and platform groups.

extra_platforms.group_data.NON_OVERLAPPING_GROUPS: frozenset[Group] = frozenset({Group(id='linux_layers', name='Any Linux compatibility layers'), Group(id='any_windows', name='Any Windows'), Group(id='ibm_mainframe', name='IBM mainframe'), Group(id='bsd', name='Any BSD'), Group(id='webassembly', name='WebAssembly'), Group(id='any_sparc', name='Any SPARC architecture'), Group(id='system_v', name='AT&T System Five'), Group(id='x86', name='x86 family'), Group(id='powerpc', name='PowerPC family'), Group(id='riscv', name='RISC-V family'), Group(id='all_ci', name='All CI systems'), Group(id='linux', name='Any Linux distribution'), Group(id='loongarch', name='LoongArch'), Group(id='any_arm', name='Any ARM architecture'), Group(id='unix_layers', name='Any Unix compatibility layers'), Group(id='other_unix', name='Any other Unix'), Group(id='any_mips', name='Any MIPS architecture')})

Non-overlapping groups.

Hint

These groups together cover all recognized architectures, platforms, and CI systems. They are all marked as canonical.

extra_platforms.group_data.EXTRA_GROUPS: frozenset[Group] = frozenset({Group(id='linux_like', name='Any Linux and compatibility layers'), Group(id='unix_without_macos', name='Any Unix excluding macOS'), Group(id='unix', name='Any Unix'), Group(id='all_architectures', name='All architectures'), Group(id='bsd_without_macos', name='Any BSD excluding macOS'), Group(id='all_platforms', name='All platforms'), Group(id='all_traits', name='Any architectures, platforms and CI systems')})

Overlapping groups, defined for convenience.

Hint

None of these groups are marked as canonical.

extra_platforms.group_data.ALL_GROUPS: frozenset[Group] = frozenset({Group(id='unix', name='Any Unix'), Group(id='any_windows', name='Any Windows'), Group(id='linux_like', name='Any Linux and compatibility layers'), Group(id='ibm_mainframe', name='IBM mainframe'), Group(id='system_v', name='AT&T System Five'), Group(id='x86', name='x86 family'), Group(id='all_ci', name='All CI systems'), Group(id='linux', name='Any Linux distribution'), Group(id='any_arm', name='Any ARM architecture'), Group(id='unix_layers', name='Any Unix compatibility layers'), Group(id='other_unix', name='Any other Unix'), Group(id='linux_layers', name='Any Linux compatibility layers'), Group(id='bsd', name='Any BSD'), Group(id='webassembly', name='WebAssembly'), Group(id='any_sparc', name='Any SPARC architecture'), Group(id='unix_without_macos', name='Any Unix excluding macOS'), Group(id='powerpc', name='PowerPC family'), Group(id='riscv', name='RISC-V family'), Group(id='all_architectures', name='All architectures'), Group(id='bsd_without_macos', name='Any BSD excluding macOS'), Group(id='all_platforms', name='All platforms'), Group(id='loongarch', name='LoongArch'), Group(id='any_mips', name='Any MIPS architecture'), Group(id='all_traits', name='Any architectures, platforms and CI systems')})

All groups.