commit: 69b04f3be77e25e10f1e11b15d862d0cbe707c4d
parent ce189763b6be8651daead037f020988e456a0ae7
Author: Michael Forney <mforney@mforney.org>
Date: Tue, 6 Oct 2020 01:01:42 -0700
python: Update to 3.9.0
Diffstat:
10 files changed, 62 insertions(+), 20 deletions(-)
diff --git a/pkg/python/.gitignore b/pkg/python/.gitignore
@@ -1,3 +1,3 @@
-/Python-3.8.6.tar.xz
+/Python-3.9.0.tar.xz
/modules.ninja
/src
diff --git a/pkg/python/gen.lua b/pkg/python/gen.lua
@@ -56,7 +56,7 @@ rule('makesetup', 'lua $dir/makesetup.lua $dir/modules.lua <$in >$out')
build('makesetup', '$outdir/config.c', {'$srcdir/Modules/config.c.in', '|', '$dir/makesetup.lua', '$dir/modules.lua'})
cc('Modules/getbuildinfo.c', nil, {
- cflags=[[$cflags -D 'DATE="Oct 14 2019"' -D 'TIME="15:34:47"']]
+ cflags=[[$cflags -D 'DATE="Oct 4 2020"' -D 'TIME="19:31:29"']]
})
cc('Modules/getpath.c', nil, {
cflags={
@@ -64,7 +64,7 @@ cc('Modules/getpath.c', nil, {
[[-D 'PYTHONPATH=":plat-linux"']],
[[-D 'PREFIX="/"']],
[[-D 'EXEC_PREFIX="/"']],
- [[-D 'VERSION="3.8"']],
+ [[-D 'VERSION="3.9"']],
[[-D 'VPATH=""']],
},
})
@@ -82,6 +82,9 @@ end
cc('Python/getplatform.c', nil, {
cflags=string.format([[$cflags -D 'PLATFORM="%s"']], platform),
})
+cc('Python/initconfig.c', nil, {
+ cflags=[[$cflags -D 'PLATLIBDIR="lib"']],
+})
cc('Python/sysmodule.c', nil, {
cflags=string.format([[$cflags -D 'ABIFLAGS="%s"']], abiflags),
})
@@ -109,6 +112,7 @@ lib('libpython.a', {expand{'Modules/', srcs}, paths[[
descrobject.c
enumobject.c
exceptions.c
+ genericaliasobject.c
genobject.c
fileobject.c
floatobject.c
@@ -144,6 +148,7 @@ lib('libpython.a', {expand{'Modules/', srcs}, paths[[
node.c
parser.c
token.c
+ pegen/(pegen.c parse.c parse_string.c peg_api.c)
myreadline.c parsetok.c tokenizer.c
)
Python/(
@@ -168,9 +173,10 @@ lib('libpython.a', {expand{'Modules/', srcs}, paths[[
getversion.c
graminit.c
hamt.c
+ hashtable.c
import.c
importdl.c
- initconfig.c
+ initconfig.c.o
marshal.c
modsupport.c
mysnprintf.c
@@ -215,10 +221,10 @@ man{'$outdir/python3.1'}
sym('share/man/man1/python.1.gz', 'python3.1.gz')
for f in iterlines('pylibs.txt') do
- file('lib/python3.8/'..f, '644', '$srcdir/Lib/'..f)
+ file('lib/python3.9/'..f, '644', '$srcdir/Lib/'..f)
end
-file('lib/python3.8/_sysconfigdata_'..abiflags..'_'..platform..'_.py', '644', '$dir/lib/_sysconfigdata.py')
-file('lib/python3.8/Makefile', '644', '$dir/lib/Makefile')
-dir('lib/python3.8/lib-dynload', '755')
+file('lib/python3.9/_sysconfigdata_'..abiflags..'_'..platform..'_.py', '644', '$dir/lib/_sysconfigdata.py')
+file('lib/python3.9/Makefile', '644', '$dir/lib/Makefile')
+dir('lib/python3.9/lib-dynload', '755')
fetch 'curl'
diff --git a/pkg/python/modules.lua b/pkg/python/modules.lua
@@ -27,7 +27,8 @@ return {
'_io/stringio.c',
},
faulthandler={'faulthandler.c'},
- _tracemalloc={'_tracemalloc.c', 'hashtable.c'},
+ _tracemalloc={'_tracemalloc.c'},
+ _peg_parser={'_peg_parser.c'},
--_symtable={'symtablemodule.c'},
--xxsubtype={'xxsubtype.c'},
@@ -38,6 +39,7 @@ return {
cmath={'cmathmodule.c', '_math.c'},
-- time defined above
_datetime={'_datetimemodule.c'},
+ _zoneinfo={'_zoneinfo.c'},
_random={'_randommodule.c'},
_bisect={'_bisectmodule.c'},
_heapq={'_heapqmodule.c'},
diff --git a/pkg/python/patch/0001-Fix-build-with-libressl.patch b/pkg/python/patch/0001-Fix-build-with-libressl.patch
@@ -0,0 +1,25 @@
+From c10df94443a1193da36af080993d64942b272be4 Mon Sep 17 00:00:00 2001
+From: Michael Forney <mforney@mforney.org>
+Date: Tue, 6 Oct 2020 00:58:09 -0700
+Subject: [PATCH] Fix build with libressl
+
+---
+ Modules/_hashopenssl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c
+index adc8653773..c40a3ff705 100644
+--- a/Modules/_hashopenssl.c
++++ b/Modules/_hashopenssl.c
+@@ -32,7 +32,7 @@
+ # error "OPENSSL_THREADS is not defined, Python requires thread-safe OpenSSL"
+ #endif
+
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
+ /* OpenSSL < 1.1.0 */
+ #define EVP_MD_CTX_new EVP_MD_CTX_create
+ #define EVP_MD_CTX_free EVP_MD_CTX_destroy
+--
+2.28.0
+
diff --git a/pkg/python/pyconfig.h b/pkg/python/pyconfig.h
@@ -1,6 +1,7 @@
#ifndef Py_PYCONFIG_H
#define Py_PYCONFIG_H
/* #undef AC_APPLE_UNIVERSAL_BUILD */
+/* #undef AIX_BUILDDATE */
/* #undef AIX_GENUINE_CPLUSPLUS */
/* #undef ALT_SOABI */
/* #undef ANDROID_API_LEVEL */
@@ -11,7 +12,6 @@
/* #undef FLOAT_WORDS_BIGENDIAN */
/* #undef FLOCK_NEEDS_LIBBSD */
/* #undef GETPGRP_HAVE_ARG */
-/* #undef GETTIMEOFDAY_NO_TZ */
#define HAVE_ACCEPT4 1
#define HAVE_ACOSH 1
#define HAVE_ADDRINFO 1
@@ -162,7 +162,6 @@
#define HAVE_GETSID 1
#define HAVE_GETSPENT 1
#define HAVE_GETSPNAM 1
-#define HAVE_GETTIMEOFDAY 1
/* #undef HAVE_GETWD */
/* #undef HAVE_GLIBC_MEMMOVE_BUG */
#define HAVE_GRP_H 1
@@ -198,14 +197,17 @@
#define HAVE_LINKAT 1
#define HAVE_LINUX_CAN_BCM_H 1
#define HAVE_LINUX_CAN_H 1
+#define HAVE_LINUX_CAN_J1939_H 1
#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1
#define HAVE_LINUX_CAN_RAW_H 1
+#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1
#define HAVE_LINUX_MEMFD_H 1
#define HAVE_LINUX_NETLINK_H 1
#define HAVE_LINUX_QRTR_H 1
#define HAVE_LINUX_RANDOM_H 1
#define HAVE_LINUX_TIPC_H 1
#define HAVE_LINUX_VM_SOCKETS_H 1
+#define HAVE_LINUX_WAIT_H 1
#define HAVE_LOCKF 1
#define HAVE_LOG1P 1
#define HAVE_LOG2 1
@@ -257,7 +259,6 @@
#define HAVE_PTHREAD_KILL 1
#define HAVE_PTHREAD_SIGMASK 1
#define HAVE_PTY_H 1
-#define HAVE_PUTENV 1
#define HAVE_PWRITE 1
#define HAVE_PWRITEV 1
/* #undef HAVE_PWRITEV2 */
@@ -409,7 +410,6 @@
#define HAVE_UNAME 1
#define HAVE_UNISTD_H 1
#define HAVE_UNLINKAT 1
-#define HAVE_UNSETENV 1
/* #undef HAVE_USABLE_WCHAR_T */
/* #undef HAVE_UTIL_H */
#define HAVE_UTIMENSAT 1
@@ -447,6 +447,7 @@
#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1
#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
/* #undef PYLONG_BITS_IN_DIGIT */
+#define PY_BUILTIN_HASHLIB_HASHES "sha3,blake2"
#define PY_COERCE_C_LOCALE 1
#define PY_FORMAT_SIZE_T "z"
#define PY_SSL_DEFAULT_CIPHERS 1
diff --git a/pkg/python/pylibs.txt b/pkg/python/pylibs.txt
@@ -1,11 +1,12 @@
# 2,<cd src/Lib && find * '(' -name test -o -name tests -o -name idle_test ')' '!' -prune -o -name '*.py' -o -name '*Grammar.txt' | LC_COLLATE=C sort
__future__.py
__phello__.foo.py
+_aix_support.py
_bootlocale.py
+_bootsubprocess.py
_collections_abc.py
_compat_pickle.py
_compression.py
-_dummy_thread.py
_markupbase.py
_osx_support.py
_py_abc.py
@@ -45,6 +46,7 @@ asyncio/staggered.py
asyncio/streams.py
asyncio/subprocess.py
asyncio/tasks.py
+asyncio/threads.py
asyncio/transports.py
asyncio/trsock.py
asyncio/unix_events.py
@@ -156,7 +158,6 @@ distutils/util.py
distutils/version.py
distutils/versionpredicate.py
doctest.py
-dummy_threading.py
email/__init__.py
email/_encoded_words.py
email/_header_value_parser.py
@@ -274,7 +275,6 @@ encodings/koi8_u.py
encodings/kz1048.py
encodings/latin_1.py
encodings/mac_arabic.py
-encodings/mac_centeuro.py
encodings/mac_croatian.py
encodings/mac_cyrillic.py
encodings/mac_farsi.py
@@ -311,6 +311,7 @@ encodings/uu_codec.py
encodings/zlib_codec.py
ensurepip/__init__.py
ensurepip/__main__.py
+ensurepip/_bundled/__init__.py
ensurepip/_uninstall.py
enum.py
filecmp.py
@@ -325,6 +326,7 @@ getopt.py
getpass.py
gettext.py
glob.py
+graphlib.py
gzip.py
hashlib.py
heapq.py
@@ -402,6 +404,7 @@ imp.py
importlib/__init__.py
importlib/_bootstrap.py
importlib/_bootstrap_external.py
+importlib/_common.py
importlib/abc.py
importlib/machinery.py
importlib/metadata.py
@@ -647,6 +650,7 @@ types.py
typing.py
unittest/__init__.py
unittest/__main__.py
+unittest/_log.py
unittest/async_case.py
unittest/case.py
unittest/loader.py
@@ -706,3 +710,7 @@ xmlrpc/server.py
zipapp.py
zipfile.py
zipimport.py
+zoneinfo/__init__.py
+zoneinfo/_common.py
+zoneinfo/_tzpath.py
+zoneinfo/_zoneinfo.py
diff --git a/pkg/python/sha256 b/pkg/python/sha256
@@ -1 +1 @@
-a9e0b79d27aa056eb9cce8d63a427b5f9bab1465dee3f942dcfdb25a82f4ab8a Python-3.8.6.tar.xz
+9c73e63c99855709b9be0b3cc9e5b072cb60f37311e8c4e50f15576a0bf82854 Python-3.9.0.tar.xz
diff --git a/pkg/python/url b/pkg/python/url
@@ -1 +1 @@
-url = "https://www.python.org/ftp/python/3.8.6/Python-3.8.6.tar.xz"
+url = "https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tar.xz"
diff --git a/pkg/python/ver b/pkg/python/ver
@@ -1 +1 @@
-3.8.6 r0
+3.9.0 r0
diff --git a/pkg/youtube-dl/gen.lua b/pkg/youtube-dl/gen.lua
@@ -1,6 +1,6 @@
file('bin/youtube-dl', '755', '$srcdir/bin/youtube-dl')
for f in iterlines('pylibs.txt') do
- file('lib/python3.8/'..f, '644', '$srcdir/'..f)
+ file('lib/python3.9/'..f, '644', '$srcdir/'..f)
end
fetch 'git'