python315-freethreaded

LOW
maintainer RubenKelevra 0 votes scanned 2026-11-02 10:02:25.018626
View on AUR
Why flagged

Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.

Triggered rules

Low Few votes, recently uploaded zero_votes_recent

Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.

PKGBUILD

1# Maintainer: @RubenKelevra <rubenkelevra@gmail.com>
2
3pkgname='python315-freethreaded'
4pkgver=3.15.2
5pkgrel=1
6_pybasever='3.15'
7pkgdesc='CPython 3.15 with free-threading support (GIL disabled)'
8arch=('x86_64')
9url='https://www.python.org/'
10license=(
11 'PSF-2.0'
12 'MIT'
13 'Apache-2.0'
14 'BSD-2-Clause'
15 'BSD-3-Clause'
16 'ISC'
17 'MPL-2.0'
18)
19depends=(
20 'expat'
21 'gdbm'
22 'libffi'
23 'ncurses'
24 'openssl'
25 'readline'
26 'util-linux-libs'
27 'zlib'
28 'zstd'
29)
30makedepends=(
31 'bluez-libs'
32 'cosign'
33 'gdb'
34 'mpdecimal'
35 'sqlite'
36 'tk'
37)
38optdepends=(
39 'mpdecimal: decimal module'
40 'sqlite: SQLite bindings'
41 'tk: tkinter module'
42 'xz: LZMA compression'
43)
44options=('!emptydirs')
45source=(
46 "https://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tar.xz"
47 "https://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tar.xz.sigstore"
48 'check-freethreading.py'
49 'LICENSE-mimalloc::https://raw.githubusercontent.com/microsoft/mimalloc/v2.1.9/LICENSE'
50 'LICENSE-HACL::https://raw.githubusercontent.com/hacl-star/hacl-star/8ba599b2f6c9701b3dc961db895b0856a2210f76/dist/LICENSE.txt'
51)
52sha256sums=(
53 '8b5536d280142ecf6cdfe15d12a21ba1c65e300bbf7b28a8d0cdb849575797de'
54 'SKIP'
55 'SKIP'
56 'SKIP'
57 'SKIP'
58)
59b2sums=(
60 'SKIP'
61 'SKIP'
62 '47dbaab3420da37924491a19b42347aab5ef7fc45e0ab2eda4fc96180a802ec6802b53378fb73dc26db4bc457378a0f2d26cae1de645eba3770c5dd4c339b25a'
63 '1366540f2137336d52454cadf92a5e1c9842c8578448bb82c8d566f529826eaafab239fe3d7a53215c176cb302b443e5fce6ed961f7f467a85333b8197f2b5ff'
64 'e6b5bfd1def200509cd936af306f484acd79a6608a0597898d48fc0255ba0aa6195c568ac54507fc3ad6d3d8bc577bf09a3a938a0c391626695e857970063aed'
65)
66
67verify() {
68 cosign verify-blob \
69 --certificate-oidc-issuer 'https://github.com/login/oauth' \
70 --certificate-identity 'hugo@python.org' \
71 --bundle "${SRCDEST}/Python-${pkgver}.tar.xz.sigstore" \
72 "${SRCDEST}/Python-${pkgver}.tar.xz"
73}
74
75prepare() {
76 cd -- "${srcdir}/Python-${pkgver}" || return 1
77
78 rm -rf -- Modules/expat Modules/zlib Modules/_ctypes/{darwin,libffi}* Modules/_decimal/libmpdec
79}
80
81build() {
82 cd -- "${srcdir}/Python-${pkgver}" || return 1
83
84 local _cflags="${CFLAGS} -fno-semantic-interposition -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"
85 CFLAGS="${_cflags}" ./configure \
86 ax_cv_c_float_words_bigendian=no \
87 --prefix=/usr \
88 --enable-ipv6 \
89 --enable-loadable-sqlite-extensions \
90 --enable-shared \
91 --with-computed-gotos \
92 --with-dbmliborder=gdbm:ndbm \
93 --with-lto \
94 --disable-gil \
95 --with-system-expat \
96 --with-system-libmpdec \
97 --with-tzpath=/usr/share/zoneinfo \
98 --without-ensurepip
99
100 make EXTRA_CFLAGS="${_cflags}"
101}
102
103check() {
104 cd -- "${srcdir}/Python-${pkgver}" || return 1
105
106 local _ldpath="${PWD}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
107 LD_LIBRARY_PATH="${_ldpath}" ./python -X gil=0 "${srcdir}/check-freethreading.py"
108 LD_LIBRARY_PATH="${_ldpath}" ./python -X gil=0 -m test -j 2 --timeout 180 \
109 test_free_threading test_threading test_sysconfig test_ssl
110}
111
112package() {
113 cd -- "${srcdir}/Python-${pkgver}" || return 1
114
115 make DESTDIR="${pkgdir}" altinstall
116
117 rm -rf -- "${pkgdir}/usr/lib/python${_pybasever}t/test" \
118 "${pkgdir}/usr/lib/python${_pybasever}t/idlelib/idle_test"
119
120 rm -f -- "${pkgdir}/usr/lib/libpython3.so"
121 mv -- "${pkgdir}/usr/bin/idle${_pybasever}" "${pkgdir}/usr/bin/idle${_pybasever}t"
122 mv -- "${pkgdir}/usr/bin/pydoc${_pybasever}" "${pkgdir}/usr/bin/pydoc${_pybasever}t"
123 rm -f -- "${pkgdir}/usr/bin/python${_pybasever}"
124 rm -rf -- "${pkgdir}/usr/share/man"
125
126 sed -i "s|${srcdir}/Python-${pkgver}:||" \
127 "${pkgdir}/usr/lib/python${_pybasever}t/config-${_pybasever}t-${CARCH}-linux-gnu/Makefile"
128
129 local _installed_config="/usr/lib/python${_pybasever}t/config-${_pybasever}t-${CARCH}-linux-gnu"
130 local _installed_lib="${pkgdir}/usr/lib/python${_pybasever}t"
131 local _sysconfig_py="${_installed_lib}/_sysconfigdata_t_linux_${CARCH}-linux-gnu.py"
132 sed -i \
133 -e "s|${srcdir}/Python-${pkgver}|${_installed_config}|g" \
134 -e "s|LD_LIBRARY_PATH=${_installed_config}|LD_LIBRARY_PATH=/usr/lib|g" \
135 "${pkgdir}${_installed_config}/Makefile" \
136 "${_sysconfig_py}" \
137 "${_installed_lib}/_sysconfig_vars_t_linux_${CARCH}-linux-gnu.json"
138
139 # The installed sysconfig bytecode must match the relocated source data.
140 LD_LIBRARY_PATH="${pkgdir}/usr/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}" \
141 PYTHONHOME="${pkgdir}/usr" \
142 "${pkgdir}/usr/bin/python${_pybasever}t" -m compileall -q -f -o 0 -o 1 -o 2 \
143 -s "${pkgdir}" -p / "${_sysconfig_py}"
144
145 install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
146 install -Dm644 "${srcdir}/LICENSE-mimalloc" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-mimalloc"
147 install -Dm644 "${srcdir}/LICENSE-HACL" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-HACL"
148}
149

Scan history

Scanned at (UTC)SeverityRules
2026-11-02 10:02:25 Low 1

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion