From dc5c9d8a3fd73f958f8848577f96b5686845653e Mon Sep 17 00:00:00 2001 From: Andy Fiddaman Date: Fri, 16 Feb 2024 08:01:09 +0000 Subject: [PATCH] Build python 3.12 modules --- src/Makefile.com | 4 ++-- src/pkg/Makefile | 4 ++-- src/pkg/external_deps.txt | 15 +++++++++++++++ src/pkg/manifests/package:pkg.p5m | 5 ++++- src/pkg/manifests/system:zones:brand:bhyve.p5m | 10 +++++++++- src/pkg/manifests/system:zones:brand:emu.p5m | 3 +-- src/pkg/transforms/pynext | 14 +++++++++----- src/setup.py | 2 +- src/tests/pkg5unittest.py | 2 +- 9 files changed, 44 insertions(+), 15 deletions(-) diff --git a/src/Makefile.com b/src/Makefile.com index 3d3d183ed..6855b0e8e 100644 --- a/src/Makefile.com +++ b/src/Makefile.com @@ -10,7 +10,7 @@ # # Copyright 2022, Richard Lowe. -# Copyright 2022 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2024 OmniOS Community Edition (OmniOSce) Association. CODE_WS:sh = git rev-parse --show-toplevel MACH:sh = uname -p @@ -30,7 +30,7 @@ CFLAGS = -m64 -Wall -Werror -Wextra -gdwarf-2 -gstrict-dwarf \ CPPFLAGS = -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS # Whitespace separated list of versions to build and test, latest one first -PYVERSIONS = 3.11 +PYVERSIONS = 3.12 3.11 # The single version used for shebang lines and packaging. PYVER = 3.11 diff --git a/src/pkg/Makefile b/src/pkg/Makefile index be76ee1c6..7ce6760fd 100644 --- a/src/pkg/Makefile +++ b/src/pkg/Makefile @@ -20,7 +20,7 @@ # # Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2012, OmniTI Computer Consulting, Inc. All rights reserved. -# Copyright 2022 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2024 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -106,7 +106,7 @@ INCORP = consolidation\:ips\:ips-incorporation PM_TRANSFORMS = defaults # For python version migrations -#PM_TRANSFORMS += pynext +PM_TRANSFORMS += pynext i386_DEFINES = \ i386_ONLY='' \ diff --git a/src/pkg/external_deps.txt b/src/pkg/external_deps.txt index 937892d20..0da4fe59c 100644 --- a/src/pkg/external_deps.txt +++ b/src/pkg/external_deps.txt @@ -9,7 +9,20 @@ pkg:/library/python-3/rapidjson-311 pkg:/library/python-3/setuptools-311 # + pkg:/runtime/python-312 + pkg:/library/python-3/cffi-312 + pkg:/library/python-3/coverage-312 + pkg:/library/python-3/cryptography-312 + pkg:/library/python-3/jsonrpclib-312 + pkg:/library/python-3/jsonschema-312 + pkg:/library/python-3/pybonjour-312 + pkg:/library/python-3/pycurl-312 + pkg:/library/python-3/pyopenssl-312 + pkg:/library/python-3/rapidjson-312 + pkg:/library/python-3/setuptools-312 + # pkg:/system/library/python/libbe-311 + pkg:/system/library/python/libbe-312 # pkg:/SUNWcs pkg:/archiver/gnu-tar @@ -41,4 +54,6 @@ pkg:/text/locale pkg:/web/ca-bundle pkg:/web/curl + # + pkg://extra.omnios/ooce/emulator/qemu diff --git a/src/pkg/manifests/package:pkg.p5m b/src/pkg/manifests/package:pkg.p5m index 69e2018a4..28f693a4c 100644 --- a/src/pkg/manifests/package:pkg.p5m +++ b/src/pkg/manifests/package:pkg.p5m @@ -20,7 +20,7 @@ # # Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2012, OmniTI Computer Consulting, Inc. All rights reserved. -# Copyright 2023 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2024 OmniOS Community Edition (OmniOSce) Association. # # # pkgdepend doesn't understand the relative import syntax "from .x import y", @@ -38,6 +38,8 @@ # + + set name=pkg.fmri value=pkg:/package/pkg@$(PKGVERS) set name=pkg.summary value="Image Packaging System - pkg(7)" set name=pkg.description \ @@ -259,6 +261,7 @@ file path=usr/bin/pkgsurf dir path=usr/lib dir path=usr/lib/pkg file path=usr/lib/pkg.depotd mode=0755 +dir path=usr/lib/python3.12 dir path=usr/share dir path=usr/share/lib dir path=usr/share/lib/pkg diff --git a/src/pkg/manifests/system:zones:brand:bhyve.p5m b/src/pkg/manifests/system:zones:brand:bhyve.p5m index 9a5143aba..2fe5c1853 100644 --- a/src/pkg/manifests/system:zones:brand:bhyve.p5m +++ b/src/pkg/manifests/system:zones:brand:bhyve.p5m @@ -10,11 +10,13 @@ # source. A copy of the CDDL is also available via the Internet at # http://www.illumos.org/license/CDDL. # -# Copyright 2023 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2024 OmniOS Community Edition (OmniOSce) Association. # + + set name=pkg.fmri value=pkg:/system/zones/brand/bhyve@$(PKGVERS) set name=pkg.summary value="Image Packaging System branded zone - bhyve zones" set name=pkg.description value="Support for bhyve branded zones" @@ -31,7 +33,9 @@ dir path=usr/lib/brand dir path=usr/lib/brand/bhyve dir path=usr/lib/brand/bhyve/__pycache__ file path=usr/lib/brand/bhyve/__pycache__/bootlib.cpython-311.pyc mode=0444 +file path=usr/lib/brand/bhyve/__pycache__/bootlib.cpython-312.pyc mode=0444 file path=usr/lib/brand/bhyve/__pycache__/bundle.cpython-311.pyc mode=0444 +file path=usr/lib/brand/bhyve/__pycache__/bundle.cpython-312.pyc mode=0444 file path=usr/lib/brand/bhyve/boot mode=0555 file path=usr/lib/brand/bhyve/bootlib.py mode=0444 file path=usr/lib/brand/bhyve/bundle.py mode=0444 @@ -46,8 +50,12 @@ file path=usr/lib/brand/bhyve/uefi/__init__.py mode=0444 dir path=usr/lib/brand/bhyve/uefi/__pycache__ file path=usr/lib/brand/bhyve/uefi/__pycache__/__init__.cpython-311.pyc \ mode=0444 +file path=usr/lib/brand/bhyve/uefi/__pycache__/__init__.cpython-312.pyc \ + mode=0444 file path=usr/lib/brand/bhyve/uefi/__pycache__/align.cpython-311.pyc mode=0444 +file path=usr/lib/brand/bhyve/uefi/__pycache__/align.cpython-312.pyc mode=0444 file path=usr/lib/brand/bhyve/uefi/__pycache__/vars.cpython-311.pyc mode=0444 +file path=usr/lib/brand/bhyve/uefi/__pycache__/vars.cpython-312.pyc mode=0444 file path=usr/lib/brand/bhyve/uefi/align.py mode=0444 file path=usr/lib/brand/bhyve/uefi/vars.py mode=0444 file path=usr/lib/brand/bhyve/uninstall mode=0555 diff --git a/src/pkg/manifests/system:zones:brand:emu.p5m b/src/pkg/manifests/system:zones:brand:emu.p5m index 7373468d7..02c174ede 100644 --- a/src/pkg/manifests/system:zones:brand:emu.p5m +++ b/src/pkg/manifests/system:zones:brand:emu.p5m @@ -10,7 +10,7 @@ # source. A copy of the CDDL is also available via the Internet at # http://www.illumos.org/license/CDDL. # -# Copyright 2023 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2024 OmniOS Community Edition (OmniOSce) Association. # set name=pkg.fmri value=pkg:/system/zones/brand/emu@$(PKGVERS) @@ -37,4 +37,3 @@ dir path=usr/share/man/man7 file path=usr/share/man/man7/emu.7 license lic_CDDL license=lic_CDDL depend type=require fmri=pkg://extra.omnios/ooce/emulator/qemu@8 -depend type=require fmri=system/zones/brand/bhyve@$(PKGVERS) diff --git a/src/pkg/transforms/pynext b/src/pkg/transforms/pynext index e4e51d4c8..ae4aad2d7 100644 --- a/src/pkg/transforms/pynext +++ b/src/pkg/transforms/pynext @@ -8,7 +8,7 @@ # source. A copy of the CDDL is also available via the Internet at # http://www.illumos.org/license/CDDL. # -# Copyright 2022 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2024 OmniOS Community Edition (OmniOSce) Association. # # A temporary transform that makes it easy to ship modules from a newer @@ -21,10 +21,14 @@ delete pkg.depend.bypass-generate notfound> -# Deliver 3.10 modules alongside the 3.11 ones (temporary, during migration) - edit path 311 310> - edit path 3.11 3.10> +# Deliver 3.12 modules alongside the 3.11 ones (temporary, during migration) + edit path 311 312> + edit path 3.11 3.12> - edit path TBD ''> +# During the 3.11 to 3.12 upgrade, we need to also translate the loadable +# module names as they were (incorrectly) unqualified with 3.11 + edit path cpython-312.so cpython-312-x86_64-pc-solaris2.so > + edit path TBD ''> diff --git a/src/setup.py b/src/setup.py index 4e8108e81..26fcaabc2 100755 --- a/src/setup.py +++ b/src/setup.py @@ -112,7 +112,7 @@ # Extract Python minor version. py_version = ".".join(platform.python_version_tuple()[:2]) -assert py_version in ("3.10", "3.11") +assert py_version in ("3.11", "3.12") py_install_dir = "usr/lib/python" + py_version + "/vendor-packages" py64_executable = "/usr/bin/python" + py_version diff --git a/src/tests/pkg5unittest.py b/src/tests/pkg5unittest.py index 7168ed000..5c45980a2 100644 --- a/src/tests/pkg5unittest.py +++ b/src/tests/pkg5unittest.py @@ -1253,7 +1253,7 @@ def combine(self, o): setattr(self, n, v) -class _Pkg5TestResult(unittest._TextTestResult): +class _Pkg5TestResult(unittest.TextTestResult): baseline = None machsep = "|"