Page Menu
Home
Solus
Search
Configure Global Search
Log In
Files
F10785460
D11518.id27873.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D11518.id27873.diff
View Options
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 <josephriches@gmail.com>
+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 @@
<Source>
<Name>python3</Name>
<Packager>
- <Name>Reilly Brogan</Name>
- <Email>reilly@reillybrogan.com</Email>
+ <Name>Joey Riches</Name>
+ <Email>josephriches@gmail.com</Email>
</Packager>
<License>Python-2.0</License>
<PartOf>programming.python</PartOf>
@@ -4894,7 +4894,7 @@
</Description>
<PartOf>programming.devel</PartOf>
<RuntimeDependencies>
- <Dependency release="32">python3</Dependency>
+ <Dependency release="33">python3</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="header">/usr/include/python3.7m/Python-ast.h</Path>
@@ -5021,7 +5021,7 @@
</Description>
<PartOf>programming.python</PartOf>
<RuntimeDependencies>
- <Dependency releaseFrom="32">python3</Dependency>
+ <Dependency releaseFrom="33">python3</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="library">/usr/lib/python3.7/test/Sine-1000Hz-300ms.aif</Path>
@@ -8082,19 +8082,19 @@
</Description>
<PartOf>programming.python</PartOf>
<RuntimeDependencies>
- <Dependency release="32">python3</Dependency>
+ <Dependency release="33">python3</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="library">/usr/lib64/python3.7/lib-dynload/_tkinter.cpython-37m-x86_64-linux-gnu.so</Path>
</Files>
</Package>
<History>
- <Update release="32">
- <Date>2021-06-28</Date>
+ <Update release="33">
+ <Date>2021-07-23</Date>
<Version>3.7.11</Version>
<Comment>Packaging update</Comment>
- <Name>Reilly Brogan</Name>
- <Email>reilly@reillybrogan.com</Email>
+ <Name>Joey Riches</Name>
+ <Email>josephriches@gmail.com</Email>
</Update>
</History>
</PISI>
\ No newline at end of file
File Metadata
Details
Attached
Mime Type
text/plain
Expires
May 27 2023, 4:17 AM (10 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5836341
Default Alt Text
D11518.id27873.diff (4 KB)
Attached To
Mode
D11518: Enable support for python to dlopen .so.avx2 libs
Attached
Detach File
Event Timeline
Log In to Comment