Skip to content

Commit

Permalink
Ship python 3.13 modules alongside
Browse files Browse the repository at this point in the history
citrus-it committed Dec 30, 2024
1 parent 481e05a commit 30564ec
Showing 10 changed files with 3,431 additions and 16 deletions.
2 changes: 2 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
@@ -101,3 +101,5 @@ $(TESTRESULTS): $(PYTESTS)

FRC:

.NO_PARALLEL: $(PYTESTS)

2 changes: 1 addition & 1 deletion src/Makefile.com
Original file line number Diff line number Diff line change
@@ -34,7 +34,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.
PYVERSIONS = 3.12
PYVERSIONS = 3.12 3.13
# The single version used for shebang lines and packaging.
PYVER = 3.12

4 changes: 0 additions & 4 deletions src/modules/p5p.py
Original file line number Diff line number Diff line change
@@ -598,9 +598,6 @@ def add(self, pathname, arcname=None):
self.__queue_offset += entry_sz
self.__queue.append((pathname, ti.name))

# Discard tarinfo; it would be more efficient to keep these in
# memory, but at a significant memory footprint cost.
ti.tarfile = None
del ti

def __add_publisher_files(
@@ -1311,7 +1308,6 @@ def close(self, progtrack=None):
ti = tfile.members.pop()
if progtrack:
progtrack.archive_add_progress(1, tfile.offset - start_offset)
ti.tarfile = None
del ti

# Cleanup temporary files.
2 changes: 1 addition & 1 deletion src/pkg/Makefile
Original file line number Diff line number Diff line change
@@ -108,7 +108,7 @@ INCORP = consolidation\:ips\:ips-incorporation

PM_TRANSFORMS = defaults
# For python version migrations
#PM_TRANSFORMS += pynext
PM_TRANSFORMS += pynext

i386_DEFINES = \
i386_ONLY='' \
13 changes: 13 additions & 0 deletions src/pkg/external_deps.txt
Original file line number Diff line number Diff line change
@@ -11,7 +11,20 @@
pkg:/library/python-3/rapidjson-312
pkg:/library/python-3/setuptools-312
#
pkg:/runtime/python-313
pkg:/library/python-3/cffi-313
pkg:/library/python-3/coverage-313
pkg:/library/python-3/cryptography-313
pkg:/library/python-3/jsonrpclib-313
pkg:/library/python-3/jsonschema-313
pkg:/library/python-3/pybonjour-313
pkg:/library/python-3/pycurl-313
pkg:/library/python-3/pyopenssl-313
pkg:/library/python-3/rapidjson-313
pkg:/library/python-3/setuptools-313
#
pkg:/system/library/python/libbe-312
pkg:/system/library/python/libbe-313
#
pkg:/SUNWcs
pkg:/archiver/gnu-tar
1 change: 1 addition & 0 deletions src/pkg/manifests/package:pkg.p5m
Original file line number Diff line number Diff line change
@@ -28,6 +28,7 @@
#
<include bundledlicences.3.12.core.p5m>
<include bundledmodules.3.12.core.p5m>
<include bundledmodules.3.13.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 \
1 change: 1 addition & 0 deletions src/pkg/manifests/system:zones:brand:bhyve.p5m
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@

<include bundledlicences.3.12.bhyve.p5m>
<include bundledmodules.3.12.bhyve.p5m>
<include bundledmodules.3.13.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"
16 changes: 9 additions & 7 deletions src/pkg/transforms/pynext
Original file line number Diff line number Diff line change
@@ -15,19 +15,21 @@
# version of python alongside the existing ones to aid transition or
# testing

<transform dir path=$(PYDIR)$ -> emit %(action.name) path=TBD%(path) >

<transform file dir path=$(PYDIRVP) -> \
emit %(action.name) path=TBD%(path) \
pkg.depend.bypass-generate=%(pkg.depend.bypass-generate;notfound='notfound')>

<transform path=TBD -> delete pkg.depend.bypass-generate notfound>
<transform file path=usr/lib/brand/bhyve/(uefi/)?__pycache__/ -> \
emit %(action.name) path=TBD%(path) \
pkg.depend.bypass-generate=%(pkg.depend.bypass-generate;notfound='notfound')>

# Deliver 3.12 modules alongside the 3.11 ones (temporary, during migration)
<transform path=TBD -> edit path 312 311>
<transform path=TBD -> edit path 3.12 3.11>
<transform path=TBD -> delete pkg.depend.bypass-generate notfound>

# During the 3.11 to 3.12 upgrade, we need to also translate the loadable
# module names as they were unqualified with 3.11
<transform path=TBD -> edit path cpython-311-$(TRIPLE) cpython-311>
# Deliver new modules alongside the old ones (temporary, during migration)
<transform path=TBD -> edit path 312 313>
<transform path=TBD -> edit path 3.12 3.13>

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

3,400 changes: 3,400 additions & 0 deletions src/tests/timing_info.3.13

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions tools/installmodules
Original file line number Diff line number Diff line change
@@ -117,9 +117,9 @@ echo "+ Generating manifest fragment"
PYTHONPATH=$ROOT/usr/lib/pkg/python$PYVER
PYTHONPATH+=:$ROOT/usr/lib/python$PYVER/vendor-packages
PYTHONPATH+=:/usr/lib/python$PYVER/vendor-packages
PKGSEND="python3 -s $ROOT/usr/bin/pkgsend"
PKGMOGRIFY="python3 -s $ROOT/usr/bin/pkgmogrify"
PKGFMT="python3 -s $ROOT/usr/bin/pkgfmt"
PKGSEND="python$PYVER -s $ROOT/usr/bin/pkgsend"
PKGMOGRIFY="python$PYVER -s $ROOT/usr/bin/pkgmogrify"
PKGFMT="python$PYVER -s $ROOT/usr/bin/pkgfmt"
PATH=$ROOT/usr/bin:$PATH
;;
esac

0 comments on commit 30564ec

Please sign in to comment.