From c97324beb34570b99e95aef40cf2a68d62acf41a Mon Sep 17 00:00:00 2001 From: Aetheridon Date: Wed, 1 Nov 2023 21:29:36 +0000 Subject: [PATCH] Python 3.12.0 support --- packages/python/3.12.0/build.sh | 21 +++++++++++++++++++++ packages/python/3.12.0/environment | 1 + packages/python/3.12.0/metadata.json | 5 +++++ packages/python/3.12.0/run | 3 +++ packages/python/3.12.0/test.py | 7 +++++++ 5 files changed, 37 insertions(+) create mode 100644 packages/python/3.12.0/build.sh create mode 100644 packages/python/3.12.0/environment create mode 100644 packages/python/3.12.0/metadata.json create mode 100644 packages/python/3.12.0/run create mode 100644 packages/python/3.12.0/test.py diff --git a/packages/python/3.12.0/build.sh b/packages/python/3.12.0/build.sh new file mode 100644 index 0000000..4de24a7 --- /dev/null +++ b/packages/python/3.12.0/build.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +PREFIX=$(realpath $(dirname $0)) + +mkdir -p build + +cd build + +curl "https://www.python.org/ftp/python/3.12.0/Python-3.12.0.tgz" -o python.tar.gz +tar xzf python.tar.gz --strip-components=1 +rm python.tar.gz + +./configure --prefix "$PREFIX" --with-ensurepip=install +make -j$(nproc) +make install -j$(nproc) + +cd .. + +rm -rf build + +bin/pip3 install numpy scipy pandas pycryptodome whoosh bcrypt passlib sympy xxhash base58 cryptography PyNaCl diff --git a/packages/python/3.12.0/environment b/packages/python/3.12.0/environment new file mode 100644 index 0000000..977a5e8 --- /dev/null +++ b/packages/python/3.12.0/environment @@ -0,0 +1 @@ +export PATH=$PWD/bin:$PATH diff --git a/packages/python/3.12.0/metadata.json b/packages/python/3.12.0/metadata.json new file mode 100644 index 0000000..59d257a --- /dev/null +++ b/packages/python/3.12.0/metadata.json @@ -0,0 +1,5 @@ +{ + "language": "python", + "version": "3.12.0", + "aliases": ["py", "py3", "python3", "python3.12"] +} diff --git a/packages/python/3.12.0/run b/packages/python/3.12.0/run new file mode 100644 index 0000000..6f77990 --- /dev/null +++ b/packages/python/3.12.0/run @@ -0,0 +1,3 @@ +#!/bin/bash + +python3.12 "$@" diff --git a/packages/python/3.12.0/test.py b/packages/python/3.12.0/test.py new file mode 100644 index 0000000..1784bfa --- /dev/null +++ b/packages/python/3.12.0/test.py @@ -0,0 +1,7 @@ +working = True + +match working: + case True: + print("OK") + case False: + print()