diff --git a/files/0001-Try-to-load-so.avx2-libs-first-if-they-exist-and-cpu.patch b/files/0001-Try-to-load-so.avx2-libs-first-if-they-exist-and-cpu.patch new file mode 100644 --- /dev/null +++ b/files/0001-Try-to-load-so.avx2-libs-first-if-they-exist-and-cpu.patch @@ -0,0 +1,40 @@ +From 667437c59a4a74b7ca1bad217df8c2d02283a377 Mon Sep 17 00:00:00 2001 +From: Joey Riches +Date: Thu, 22 Jul 2021 02:54:21 +0100 +Subject: [PATCH 1/1] Try to load so.avx2 libs first if they exist and cpu is + supported + +--- + Python/dynload_shlib.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/Python/dynload_shlib.c b/Python/dynload_shlib.c +index f271193190..49de8510d6 100644 +--- a/Python/dynload_shlib.c ++++ b/Python/dynload_shlib.c +@@ -61,6 +61,7 @@ _PyImport_FindSharedFuncptr(const char *prefix, + void *handle; + char funcname[258]; + char pathbuf[260]; ++ char *pathname2; + int dlopenflags=0; + + if (strchr(pathname, '/') == NULL) { +@@ -93,7 +94,13 @@ _PyImport_FindSharedFuncptr(const char *prefix, + + dlopenflags = PyThreadState_GET()->interp->dlopenflags; + +- handle = dlopen(pathname, dlopenflags); ++ pathname2 = malloc(strlen(pathname) + strlen(".avx2") + 1); ++ sprintf(pathname2, "%s%s", pathname, ".avx2"); ++ if (__builtin_cpu_supports("avx2") && access(pathname2, R_OK) == 0) ++ handle = dlopen(pathname2, dlopenflags); ++ else ++ handle = dlopen(pathname, dlopenflags); ++ free(pathname2); + + if (handle == NULL) { + PyObject *mod_name; +-- +2.32.0 + diff --git a/files/series b/files/series --- a/files/series +++ b/files/series @@ -1,2 +1,3 @@ 0001-ensurepip-Always-install-pip-setuptools-ignoring-ins.patch turn_off_test_socket_during_pgo.patch +0001-Try-to-load-so.avx2-libs-first-if-they-exist-and-cpu.patch diff --git a/package.yml b/package.yml --- a/package.yml +++ b/package.yml @@ -1,6 +1,6 @@ name : python3 version : 3.7.11 -release : 32 +release : 33 source : - https://www.python.org/ftp/python/3.7.11/Python-3.7.11.tar.xz : ddb4196ab5c4f69e895920a422cb60d42b46e2de2b173ce7fd57f1435459a734 - https://files.pythonhosted.org/packages/47/ca/f0d790b6e18b3a6f3bd5e80c2ee4edbb5807286c21cdd0862ca933f751dd/pip-21.1.3-py3-none-any.whl : 78cb760711fedc073246543801c84dc5377affead832e103ad0211f99303a204 @@ -38,7 +38,7 @@ - test : - /usr/lib/python3.7/test - tkinter : - - /usr/lib64/python3.7/lib-dynload/_tkinter.cpython-37m-x86_64-linux-gnu.so + - /usr/lib64/python3.7/lib-dynload/_tkinter.cpython-37m-x86_64-linux-gnu.so* setup : | %apply_patches diff --git a/pspec_x86_64.xml b/pspec_x86_64.xml --- a/pspec_x86_64.xml +++ b/pspec_x86_64.xml @@ -2,8 +2,8 @@ python3 - Reilly Brogan - reilly@reillybrogan.com + Joey Riches + josephriches@gmail.com Python-2.0 programming.python @@ -4894,7 +4894,7 @@ programming.devel - python3 + python3 /usr/include/python3.7m/Python-ast.h @@ -5021,7 +5021,7 @@ programming.python - python3 + python3 /usr/lib/python3.7/test/Sine-1000Hz-300ms.aif @@ -8082,19 +8082,19 @@ programming.python - python3 + python3 /usr/lib64/python3.7/lib-dynload/_tkinter.cpython-37m-x86_64-linux-gnu.so - - 2021-06-28 + + 2021-07-23 3.7.11 Packaging update - Reilly Brogan - reilly@reillybrogan.com + Joey Riches + josephriches@gmail.com \ No newline at end of file