Skip to content

Commit

Permalink
Add a Python 3.9 container (jsc#PED-10823)
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkmueller committed Sep 27, 2024
1 parent 6ada056 commit 406b588
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/bci_build/package/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1650,6 +1650,7 @@ def generate_disk_size_constraints(size_gb: int) -> str:
from .postfix import POSTFIX_CONTAINERS # noqa: E402
from .postgres import POSTGRES_CONTAINERS # noqa: E402
from .python import PYTHON_3_6_CONTAINERS # noqa: E402
from .python import PYTHON_3_9_CONTAINERS # noqa: E402
from .python import PYTHON_3_11_CONTAINERS # noqa: E402
from .python import PYTHON_3_12_CONTAINERS # noqa: E402
from .python import PYTHON_TW_CONTAINERS # noqa: E402
Expand All @@ -1664,6 +1665,7 @@ def generate_disk_size_constraints(size_gb: int) -> str:
*BASE_CONTAINERS,
*PYTHON_3_12_CONTAINERS,
*PYTHON_3_6_CONTAINERS,
*PYTHON_3_9_CONTAINERS,
*PYTHON_3_11_CONTAINERS,
*PYTHON_TW_CONTAINERS,
*THREE_EIGHT_NINE_DS_CONTAINERS,
Expand Down
12 changes: 11 additions & 1 deletion src/bci_build/package/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@
from bci_build.package import Replacement
from bci_build.package import SupportLevel

_PYTHON_VERSIONS = Literal["3.6", "3.10", "3.11", "3.12"]
_PYTHON_VERSIONS = Literal["3.6", "3.9", "3.10", "3.11", "3.12"]

# The lifecycle is handcrafted by the SUSE Python maintainers
_SLE_15_PYTHON_SUPPORT_ENDS: dict[_PYTHON_VERSIONS, datetime.date | None] = {
# Actually end of general support of SLE15, SP7 is the last known SP
"3.6": _SUPPORTED_UNTIL_SLE[OsVersion.SP7],
# per jsc#PED-10823
"3.9": datetime.datetime(2027, 12, 31),
# only openSUSE
"3.10": None,
# https://peps.python.org/pep-0664/ defines 2027/10/31, SUSE offers until end of the year
Expand Down Expand Up @@ -106,6 +108,14 @@ def _get_python_kwargs(py3_ver: _PYTHON_VERSIONS, os_version: OsVersion):
for os_version in (OsVersion.SP6,)
)

PYTHON_3_9_CONTAINERS = (
PythonDevelopmentContainer(
**_get_python_kwargs("3.9", os_version),
package_name="python-3.9-image",
)
for os_version in (OsVersion.SP6,)
)

_PYTHON_TW_VERSIONS: tuple[_PYTHON_VERSIONS, ...] = ("3.10", "3.12", "3.11")
PYTHON_TW_CONTAINERS = (
PythonDevelopmentContainer(
Expand Down

0 comments on commit 406b588

Please sign in to comment.