Skip to content

Commit

Permalink
Build python 3.12 modules
Browse files Browse the repository at this point in the history
  • Loading branch information
citrus-it committed Feb 18, 2024
1 parent 4535b34 commit 664e8d3
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/Makefile.com
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/pkg/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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='' \
Expand Down
15 changes: 15 additions & 0 deletions src/pkg/external_deps.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -41,4 +54,6 @@
pkg:/text/locale
pkg:/web/ca-bundle
pkg:/web/curl
#
pkg://extra.omnios/ooce/emulator/qemu

5 changes: 4 additions & 1 deletion src/pkg/manifests/package:pkg.p5m
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -38,6 +38,8 @@
#
<include bundledlicences.3.11.core.p5m>
<include bundledmodules.3.11.core.p5m>
<include bundledlicences.3.12.core.p5m>
<include bundledmodules.3.12.core.p5m>
set name=pkg.fmri value=pkg:/package/pkg@$(PKGVERS)
set name=pkg.summary value="Image Packaging System - pkg(7)"
set name=pkg.description \
Expand Down Expand Up @@ -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
Expand Down
10 changes: 9 additions & 1 deletion src/pkg/manifests/system:zones:brand:bhyve.p5m
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#

<include bundledlicences.3.11.bhyve.p5m>
<include bundledmodules.3.11.bhyve.p5m>
<include bundledlicences.3.12.bhyve.p5m>
<include bundledmodules.3.12.bhyve.p5m>
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"
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/pkg/manifests/system:zones:brand:emu.p5m
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ 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)
#depend type=require fmri=system/zones/brand/bhyve@$(PKGVERS)
14 changes: 9 additions & 5 deletions src/pkg/transforms/pynext
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -21,10 +21,14 @@

<transform path=TBD -> delete pkg.depend.bypass-generate notfound>

# Deliver 3.10 modules alongside the 3.11 ones (temporary, during migration)
<transform path=TBD -> edit path 311 310>
<transform path=TBD -> edit path 3.11 3.10>
# Deliver 3.12 modules alongside the 3.11 ones (temporary, during migration)
<transform path=TBD -> edit path 311 312>
<transform path=TBD -> edit path 3.11 3.12>

<transform path=TBD -> 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
<transform path=TBD \
-> edit path cpython-312.so cpython-312-x86_64-pc-solaris2.so >

<transform path=TBD -> edit path TBD ''>

2 changes: 1 addition & 1 deletion src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/tests/pkg5unittest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ def combine(self, o):
setattr(self, n, v)


class _Pkg5TestResult(unittest._TextTestResult):
class _Pkg5TestResult(unittest.TextTestResult):
baseline = None
machsep = "|"

Expand Down

0 comments on commit 664e8d3

Please sign in to comment.