From 8bedbb5ee574b2f005dd5f066638cb79dc90f0eb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Dec 2014 09:27:21 -0500 Subject: Use hasattr per recommendation in docs for dl. --- setuptools/command/build_ext.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'setuptools/command/build_ext.py') diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 53bf9cd3..684200ad 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -33,10 +33,8 @@ if sys.platform == "darwin": use_stubs = True elif os.name != 'nt': try: - from dl import RTLD_NOW - - have_rtld = True - use_stubs = True + import dl + use_stubs = have_rtld = hasattr(dl, 'RTLD_NOW') except ImportError: pass -- cgit v1.2.3