Skip to content

Commit

Permalink
Add new LINUX_LIKE family
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeldycke committed Aug 24, 2024
1 parent e173b80 commit e54b583
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
> \[!IMPORTANT\]
> This version is not released yet and is under active development.
- Add new `LINUX_LIKE` family that merge `ALL_LINUX` and `LINUX_LAYERS` groups.

## [1.1.1 (2024-08-21)](https://github.com/kdeldycke/extra-platforms/compare/v1.1.0...v1.1.1)

- Run tests on `ubuntu-24.04` and `macos-12`.
Expand Down
2 changes: 2 additions & 0 deletions extra_platforms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def cache(user_function):
BSD_WITHOUT_MACOS,
EXTRA_GROUPS,
LINUX_LAYERS,
LINUX_LIKE,
NON_OVERLAPPING_GROUPS,
OTHER_UNIX,
SYSTEM_V,
Expand Down Expand Up @@ -275,6 +276,7 @@ def current_os() -> Platform:
"is_xenserver", # noqa: F405
"KVMIBM", # noqa: F405
"LINUX_LAYERS", # noqa: F405
"LINUX_LIKE", # noqa: F405
"LINUXMINT", # noqa: F405
"MACOS", # noqa: F405
"MAGEIA", # noqa: F405
Expand Down
12 changes: 11 additions & 1 deletion extra_platforms/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def issuperset(self, other: Group | Iterable[Platform]) -> bool:
XENSERVER,
),
)
"""All Unix platforms based on a Linux kernel.
"""All distributions based on a Linux kernel.
.. note::
Are considered of this family (`according Wikipedia
Expand All @@ -312,6 +312,15 @@ def issuperset(self, other: Group | Iterable[Platform]) -> bool:
"""


LINUX_LIKE = Group(
"linux_like",
"Any Linux and compatibility layers",
"🐧+",
(*ALL_LINUX.platforms, *LINUX_LAYERS.platforms),
)
"""Sum of all Linux distributions and Linux compatibility layers."""


SYSTEM_V = Group(
"system_v", "Any Unix derived from AT&T System Five", "Ⅴ", (AIX, SOLARIS)
)
Expand Down Expand Up @@ -419,6 +428,7 @@ def issuperset(self, other: Group | Iterable[Platform]) -> bool:
EXTRA_GROUPS: frozenset[Group] = frozenset(
(
ALL_PLATFORMS,
LINUX_LIKE,
UNIX,
UNIX_WITHOUT_MACOS,
BSD_WITHOUT_MACOS,
Expand Down

0 comments on commit e54b583

Please sign in to comment.