[Python-checkins] bpo-33281: Fix ctypes.util.find_library regression on macOS (GH-6625) (GH-6680)
Ned Deily
webhook-mailer at python.org
Tue May 1 22:51:34 EDT 2018
https://github.com/python/cpython/commit/c74ca5396aa7740d4fc90617e6b2315e849fa71f
commit: c74ca5396aa7740d4fc90617e6b2315e849fa71f
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Ned Deily <nad at python.org>
date: 2018-05-01T22:51:31-04:00
summary:
bpo-33281: Fix ctypes.util.find_library regression on macOS (GH-6625) (GH-6680)
(cherry picked from commit d06d345f04b3f7e5b318df69b1d179328a64ca9c)
Co-authored-by: Ray Donnelly <mingw.android at gmail.com>
files:
M Lib/ctypes/util.py
diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
index 5e8b31a8546a..97973bce001d 100644
--- a/Lib/ctypes/util.py
+++ b/Lib/ctypes/util.py
@@ -67,7 +67,7 @@ def find_library(name):
return fname
return None
-if os.name == "posix" and sys.platform == "darwin":
+elif os.name == "posix" and sys.platform == "darwin":
from ctypes.macholib.dyld import dyld_find as _dyld_find
def find_library(name):
possible = ['lib%s.dylib' % name,
@@ -80,7 +80,7 @@ def find_library(name):
continue
return None
-if sys.platform.startswith("aix"):
+elif sys.platform.startswith("aix"):
# AIX has two styles of storing shared libraries
# GNU auto_tools refer to these as svr4 and aix
# svr4 (System V Release 4) is a regular file, often with .so as suffix
More information about the Python-checkins
mailing list