Skip to content

Commit

Permalink
Add python 3.12 modules
Browse files Browse the repository at this point in the history
  • Loading branch information
citrus-it committed Feb 11, 2024
1 parent bcce37d commit 85a3494
Show file tree
Hide file tree
Showing 71 changed files with 2,784 additions and 2 deletions.
59 changes: 59 additions & 0 deletions build/python312/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@

Python module dependencies
--------------------------

setuptools
pip (and pip depends on setuptools! See "Bootstrap" below)

pkg
cryptography
setuptools-rust
semantic-version
typing-extensions
tomli
six
cffi
pycparser
asn1crypto
idna
jsonrpclib
jsonschema
attrs
pyrsistent
js-regex
orjson
pycurl
rapidjson
coverage
pyopenssl
cryptography

bhyve (brand)
pyyaml

glib2
meson


Bootstrap
---------

To bootstrap modules for a new python version, build 'setuptools' and 'pip'
with the '-f bootstrap' flag, and install these bootstrap packages:

for m in setuptools pip; do
{ cd $m; ./build.sh -f bootstrap -blt; }
done
pfexec pkg install {pip,setuptools}-3XX-bootstrap

then build again, without the bootstrap flag:

for m in setuptools pip; do
{ cd $m; ./build.sh -blt; }
done

and finally switch out the bootstrap packages for the real ones:

pfexec pkg install --reject pip-3XX-bootstrap pip-3XX
pfexec pkg install --reject setuptools-3XX-bootstrap setuptools-3XX

38 changes: 38 additions & 0 deletions build/python312/asn1crypto/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/bash
#
# {{{ CDDL HEADER
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
# }}}
#
# Copyright 2024 OmniOS Community Edition (OmniOSce) Association.

. ../../../lib/build.sh

PKG=library/python-3/asn1crypto-312
PROG=asn1crypto
inherit_ver python311/asn1crypto
SUMMARY="asn1crypto - Fast ASN.1 parser..."
DESC="$SUMMARY"

. $SRCDIR/../common.sh

BUILD_DEPENDS_IPS+="library/python-$PYMVER/setuptools-$SPYVER"

init
download_source pymodules/$PROG $PROG $VER
patch_source
prep_build
python_build
make_package
clean_up

# Vim hints
# vim:ts=4:sw=4:et:fdm=marker
14 changes: 14 additions & 0 deletions build/python312/asn1crypto/local.mog
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.

# Copyright 2019 OmniOS Community Edition (OmniOSce) Association.

license LICENSE license=MIT

36 changes: 36 additions & 0 deletions build/python312/attrs/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/bash
#
# {{{ CDDL HEADER
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
# }}}
#
# Copyright 2024 OmniOS Community Edition (OmniOSce) Association.
#
. ../../../lib/build.sh

PKG=library/python-3/attrs-312
PROG=attrs
inherit_ver python311/attrs
SUMMARY="Python attrs"
DESC="Classes Without Boilerplate"

. $SRCDIR/../common.sh

init
download_source pymodules/$PROG $PROG $VER
patch_source
prep_build
python_build
make_package
clean_up

# Vim hints
# vim:ts=4:sw=4:et:fdm=marker
18 changes: 18 additions & 0 deletions build/python312/attrs/local.mog
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#

# Copyright 2019 OmniOS Community Edition (OmniOSce) Association.

license LICENSE license=MIT

<transform file path=usr/bin \
-> edit path usr/bin usr/lib/python$(PYTHONVER)/bin>

44 changes: 44 additions & 0 deletions build/python312/cffi/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/bash
#
# {{{ CDDL HEADER
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
# }}}
#
# Copyright 2024 OmniOS Community Edition (OmniOSce) Association.

. ../../../lib/build.sh

PKG=library/python-3/cffi-312
PROG=cffi
inherit_ver python311/cffi
SUMMARY="cffi"
DESC="Foreign Function Interface for Python calling C code"

. $SRCDIR/../common.sh

CFLAGS[aarch64]+=" -mtls-dialect=trad"

RUN_DEPENDS_IPS+="
library/python-$PYMVER/pycparser-$SPYVER
"

REMOVE_PREVIOUS=1

init
download_source pymodules/$PROG $PROG $VER
patch_source
prep_build
python_build
make_package
clean_up

# Vim hints
# vim:ts=4:sw=4:et:fdm=marker
14 changes: 14 additions & 0 deletions build/python312/cffi/local.mog
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.

# Copyright 2019 OmniOS Community Edition (OmniOSce) Association.

license LICENSE license=MIT

3 changes: 3 additions & 0 deletions build/python312/coverage/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

Coverage is needed in order to run the pkg(7) test-suite

36 changes: 36 additions & 0 deletions build/python312/coverage/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/bash
#
# {{{ CDDL HEADER
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
# }}}
#
# Copyright 2024 OmniOS Community Edition (OmniOSce) Association.

. ../../../lib/build.sh

PKG=library/python-3/coverage-312
PROG=coverage
inherit_ver python311/coverage
SUMMARY="Python coverage module"
DESC="Code coverage testing for Python"

. $SRCDIR/../common.sh

init
download_source pymodules/$PROG $PROG $VER
patch_source
prep_build
python_build
make_package
clean_up

# Vim hints
# vim:ts=4:sw=4:et:fdm=marker
18 changes: 18 additions & 0 deletions build/python312/coverage/local.mog
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.

# Copyright 2019 OmniOS Community Edition (OmniOSce) Association.

license LICENSE.txt license=Apache2

<transform file path=usr/bin -> set pkg.depend.bypass-generate .* >
<transform file path=usr/bin \
-> edit path usr/bin usr/lib/python$(PYTHONVER)/bin>

36 changes: 36 additions & 0 deletions build/python312/crossenv/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/bash
#
# {{{ CDDL HEADER
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
# }}}

# Copyright 2024 OmniOS Community Edition (OmniOSce) Association.

. ../../../lib/build.sh

PKG=library/python-3/crossenv-312
PROG=crossenv
inherit_ver python311/crossenv
SUMMARY="A cross-compiling tool for Python extension modules"
DESC="$SUMMARY"

. $SRCDIR/../common.sh

init
download_source pymodules/$PROG $PROG $VER
patch_source
prep_build
python_build
make_package
clean_up

# Vim hints
# vim:ts=4:sw=4:et:fdm=marker
14 changes: 14 additions & 0 deletions build/python312/crossenv/local.mog
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# 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.

license LICENSE.txt license=MIT

12 changes: 12 additions & 0 deletions build/python312/crossenv/patches/illumos.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -wpruN '--exclude=*.orig' a~/crossenv/__init__.py a/crossenv/__init__.py
--- a~/crossenv/__init__.py 1970-01-01 00:00:00
+++ a/crossenv/__init__.py 1970-01-01 00:00:00
@@ -509,6 +509,8 @@ class CrossEnvBuilder(venv.EnvBuilder):
self.host_machine = self.host_gnu_type.split('-')[0]

self.host_release = ''
+ if self.host_sysname == "sunos5":
+ self.host_release = '5.11'
if self.macosx_deployment_target:
try:
major, minor = self.macosx_deployment_target.split(".")
1 change: 1 addition & 0 deletions build/python312/crossenv/patches/series
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
illumos.patch
Loading

0 comments on commit 85a3494

Please sign in to comment.