summaryrefslogtreecommitdiff
path: root/setuptools/command/build_ext.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2014-12-23 09:27:21 -0500
committerJason R. Coombs <jaraco@jaraco.com>2014-12-23 09:27:21 -0500
commit8bedbb5ee574b2f005dd5f066638cb79dc90f0eb (patch)
treec3e6db4214c172cb86989e95b4f2c8dcaec39782 /setuptools/command/build_ext.py
parent42ef8cbbb3e08a89e3513bfa16b61541df1d11fa (diff)
downloadpython-setuptools-git-8bedbb5ee574b2f005dd5f066638cb79dc90f0eb.tar.gz
Use hasattr per recommendation in docs for dl.
Diffstat (limited to 'setuptools/command/build_ext.py')
-rw-r--r--setuptools/command/build_ext.py6
1 files changed, 2 insertions, 4 deletions
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