python: fix find_library() with musl (from Alpine).

This commit is contained in:
Juan RP 2016-01-24 10:32:46 +01:00
parent cce15273f4
commit 2847b4200b
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
See http://bugs.alpinelinux.org/issues/4512
http://bugs.alpinelinux.org/issues/5038
--- Lib/ctypes/util.py
+++ Lib/ctypes/util.py
@ -27,13 +27,13 @@ See http://bugs.alpinelinux.org/issues/4512
+ for d in paths:
+ f = os.path.join(d, name)
+ if _is_elf(f):
+ return f
+ return os.path.basename(f)
+
+ prefix = os.path.join(d, 'lib'+name)
+ for suffix in ['.so', '.so.*', '.*.so.*']:
+ for f in glob('{0}{1}'.format(prefix, suffix)):
+ if _is_elf(f):
+ return f
+ return os.path.basename(f)
+
def find_library(name):
- return _findSoname_ldconfig(name) or _get_soname(_findLib_gcc(name))

View File

@ -4,7 +4,7 @@
#
pkgname=python
version=2.7.11
revision=5
revision=6
wrksrc="Python-${version}"
hostmakedepends="pkg-config"
makedepends="