commit: f34defc4858abb4511ab277f652333181c65d7e4
parent 2325df7f38ff39512c0ee6b0bd2a342f788eddfc
Author: fosslinux <fosslinux@aussies.space>
Date: Wed, 21 Dec 2022 14:15:59 +1100
Add Python-3.3.7
Diffstat:
5 files changed, 130 insertions(+), 0 deletions(-)
diff --git a/sysa/SHA256SUMS.pkgs b/sysa/SHA256SUMS.pkgs
@@ -5,6 +5,7 @@ bc392178f552280ba1063123257bcf549fdea088e1f78f60c93e19c9e05fa3f6 Python-2.3.7_0
e3e79771785905e169a19d8b0d784e74e5acf75889ebba2e18fcfb3ac01012f2 Python-2.5.6_0.tar.bz2
cabadffa45bbef9043dfb940a90ec90c0cd81876493e38657f63b15bdac67065 Python-3.1.5_0.tar.bz2
e25a6388869762a20aac39a67b51e0bdabec852ee41f1224ebac1c35fb6fdf16 Python-3.1.5_1.tar.bz2
+d0ef6a98b24e036bfd4c72aa6ae24044d85772a661553f0db5d932eef397015a Python-3.3.7_0.tar.bz2
2fde9f584a275efc5c8bf23adaa690e06ab6922ecbc35108731e87f565ddb2b6 autoconf-2.12_0.tar.bz2
40d88d4b1048ab70eaecf753fb77713dfcaa9c9c72252cd36459236034cdcdfd autoconf-2.13_0.tar.bz2
38f0de4c816088c514dbfb1536779f2204426a95bd6f57fa87b83bffefcaa390 autoconf-2.52_0.tar.bz2
diff --git a/sysc/Python-3.3.7/Python-3.3.7.sh b/sysc/Python-3.3.7/Python-3.3.7.sh
@@ -0,0 +1,83 @@
+# SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+src_prepare() {
+ default
+
+ # Delete generated files
+ rm Include/Python-ast.h Python/Python-ast.c
+ rm Lib/stringprep.py
+ rm Lib/pydoc_data/topics.py
+ rm Misc/Vim/python.vim
+ rm -r Modules/_ctypes/libffi
+ rm Python/importlib.h
+ mv Lib/plat-generic .
+ rm -r Lib/plat-*
+ mv plat-generic Lib/
+ grep generated -r . -l | grep encodings | xargs rm
+
+ # Regenerate encodings
+ mkdir Tools/unicode/in Tools/unicode/out
+ mv ../CP437.TXT Tools/unicode/in/
+ pushd Tools/unicode
+ python gencodec.py in/ ../../Lib/encodings/
+ popd
+
+ # Regenerate unicode
+ rm Modules/unicodedata_db.h Modules/unicodename_db.h Objects/unicodetype_db.h
+ mv ../*.txt ../*.zip .
+ python Tools/unicode/makeunicodedata.py
+
+ # Regenerate sre_constants.h
+ rm Modules/sre_constants.h
+ cp Lib/sre_constants.py .
+ python sre_constants.py
+
+ # Regenerate _ssl_data.h
+ python Tools/ssl/make_ssl_data.py /usr/include/openssl Modules/_ssl_data.h
+
+ # Regenerate autoconf
+ autoreconf-2.71 -fi
+}
+
+src_configure() {
+ CFLAGS="-U__DATE__ -U__TIME__" \
+ LDFLAGS="-L/usr/lib/musl" \
+ ./configure \
+ --prefix="${PREFIX}" \
+ --libdir="${PREFIX}/lib/musl" \
+ --with-system-ffi
+}
+
+src_compile() {
+ # Build pgen
+ make Parser/pgen
+ # Regen graminit.c and graminit.h
+ make Include/graminit.h
+
+ # Regenerate some Python scripts using the other regenerated files
+ # Must move them out to avoid using Lib/ module files which are
+ # incompatible with running version of Python
+ cp Lib/{symbol,keyword,token}.py .
+ cp token.py _token.py
+ python symbol.py
+ python keyword.py
+ python token.py
+
+ # Now build the main program
+ make CFLAGS="-U__DATE__ -U__TIME__"
+}
+
+src_install() {
+ default
+ ln -s "${PREFIX}/lib/musl/python3.3/lib-dynload" "${DESTDIR}${PREFIX}/lib/python3.3/lib-dynload"
+ ln -s "${PREFIX}/bin/python3.3" "${DESTDIR}${PREFIX}/bin/python"
+
+ # Remove non-reproducible .pyc/o files
+ find "${DESTDIR}" -name "*.pyc" -delete
+ find "${DESTDIR}" -name "*.pyo" -delete
+
+ # This file is not reproducible and I don't care to fix it
+ rm "${DESTDIR}/${PREFIX}/lib/python3.3/lib2to3/"{Pattern,}"Grammar3.3.7.final.0.pickle"
+}
diff --git a/sysc/Python-3.3.7/patches/symbol.patch b/sysc/Python-3.3.7/patches/symbol.patch
@@ -0,0 +1,22 @@
+SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
+
+SPDX-License-Identifier: PSF-2.0
+
+token is in the standard library which takes precedence over files
+in the path. Rename this file so we can actually import it.
+
+--- Lib/symbol.py 2022-12-19 21:52:07.101953334 +1100
++++ Lib/symbol.py 2022-12-19 21:52:14.752082879 +1100
+@@ -102,10 +102,10 @@
+
+ def main():
+ import sys
+- import token
++ import _token
+ if len(sys.argv) == 1:
+ sys.argv = sys.argv + ["Include/graminit.h", "Lib/symbol.py"]
+- token._main()
++ _token._main()
+
+ if __name__ == "__main__":
+ main()
diff --git a/sysc/Python-3.3.7/sources b/sysc/Python-3.3.7/sources
@@ -0,0 +1,22 @@
+https://www.python.org/ftp/python/3.3.7/Python-3.3.7.tar.xz 85f60c327501c36bc18c33370c14d472801e6af2f901dafbba056f61685429fe
+http://ftp.unicode.org/Public/3.2-Update/UnicodeData-3.2.0.txt 5e444028b6e76d96f9dc509609c5e3222bf609056f35e5fcde7e6fb8a58cd446
+http://ftp.unicode.org/Public/3.2-Update/CompositionExclusions-3.2.0.txt 1d3a450d0f39902710df4972ac4a60ec31fbcb54ffd4d53cd812fc1200c732cb
+http://ftp.unicode.org/Public/3.2-Update/EastAsianWidth-3.2.0.txt ce19f35ffca911bf492aab6c0d3f6af3d1932f35d2064cf2fe14e10be29534cb
+http://ftp.unicode.org/Public/3.2-Update/DerivedCoreProperties-3.2.0.txt 787419dde91701018d7ad4f47432eaa55af14e3fe3fe140a11e4bbf3db18bb4c
+http://ftp.unicode.org/Public/3.2-Update/DerivedNormalizationProps-3.2.0.txt bab49295e5f9064213762447224ccd83cea0cced0db5dcfc96f9c8a935ef67ee
+http://ftp.unicode.org/Public/3.2-Update/LineBreak-3.2.0.txt d693ef2a603d07e20b769ef8ba29afca39765588a03e3196294e5be8638ca735
+http://ftp.unicode.org/Public/3.2-Update/SpecialCasing-3.2.0.txt 1f7913b74dddff55ee566f6220aa9e465bae6f27709fc21d353b04adb8572b37
+http://ftp.unicode.org/Public/3.2-Update/CaseFolding-3.2.0.txt 370f3d1e79a52791c42065946711f4eddb6d9820726afd0e436a3c50360475a9
+http://ftp.unicode.org/Public/3.2-Update/Unihan-3.2.0.zip 0582b888c4ebab6e3ce8d340c74788f1a68ca662713a1065b9a007f24bb4fe46
+http://ftp.unicode.org/Public/6.1.0/ucd/UnicodeData.txt 3066262585a3c4f407b16db787e6d3a6e033b90f27405b6c76d1babefffca6ad UnicodeData-6.1.0.txt
+http://ftp.unicode.org/Public/6.1.0/ucd/CompositionExclusions.txt 21124f9d38372d68e09c67bcb64694fd4bca0c9cb39c576b1f095554c4ea9693 CompositionExclusions-6.1.0.txt
+http://ftp.unicode.org/Public/6.1.0/ucd/EastAsianWidth.txt d591c24b702c1b025b58ca6168746f713b657c6e252c268f52cb07758f428067 EastAsianWidth-6.1.0.txt
+http://ftp.unicode.org/Public/6.1.0/ucd/DerivedCoreProperties.txt a03e62ba5fa9c6f327b6e6cfc5d014f59af9b262b768dd9a6aaa39d205dd8b7a DerivedCoreProperties-6.1.0.txt
+http://ftp.unicode.org/Public/6.1.0/ucd/DerivedNormalizationProps.txt d028f7eccab4998f8d7a6b15703b088e26ff6ee1f2dbc0939ae872c213de8620 DerivedNormalizationProps-6.1.0.txt
+http://ftp.unicode.org/Public/6.1.0/ucd/LineBreak.txt 7b7e2cf582ef7f24fd2747a4ef1a50934c15a0fc0ab10ce737d5e3e47bebde0d LineBreak-6.1.0.txt
+http://ftp.unicode.org/Public/6.1.0/ucd/NameAliases.txt 7253bd84e20d34491b2b124a85ca84bd2cd5d113e4957aebae92f0e3c21f0a45 NameAliases-6.1.0.txt
+http://ftp.unicode.org/Public/6.1.0/ucd/NamedSequences.txt 60c88b6e3ceec871cc6b7e2d552453f88eef0f40ff2188d9cec7021c2debd36a NamedSequences-6.1.0.txt
+http://ftp.unicode.org/Public/6.1.0/ucd/SpecialCasing.txt 7d047fe1aa8a68cc12101427cf03bfbce83201ee277e907822901735f0bfee3c SpecialCasing-6.1.0.txt
+http://ftp.unicode.org/Public/6.1.0/ucd/CaseFolding.txt 4c0bece13821a24f469bb8d16ea33fc7da6436b7ebe64c78635673dbfaa88edc CaseFolding-6.1.0.txt
+http://ftp.unicode.org/Public/6.1.0/ucd/Unihan.zip 8ca508ef1bc7eba8c102710016d8510f871f69bdcc74ff877c33d01bb799a38f Unihan-6.1.0.zip
+http://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP437.TXT 6bad4dabcdf5940227c7d81fab130dcb18a77850b5d79de28b5dc4e047b0aaac
diff --git a/sysc/run2.sh b/sysc/run2.sh
@@ -117,6 +117,8 @@ build Python-3.1.5 stage1.sh
build Python-3.1.5 stage2.sh
+build Python-3.3.7
+
if [ "$FORCE_TIMESTAMPS" = True ] ; then
echo 'Forcing all files timestamps to be 0 unix time.'
canonicalise_all_files_timestamp