summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2016-08-20 06:39:42 +0200
committerStefan Behnel <stefan_ml@behnel.de>2016-08-20 06:39:42 +0200
commitd32038b3a7a0f625501ed7f8a29f03068f7778d2 (patch)
treea7e039e68c34e5ad37ebae49040d11486b05c8d6
parentbfdca59a235b29568e4ad7069951878ec7594d5b (diff)
downloadpython-lxml-d32038b3a7a0f625501ed7f8a29f03068f7778d2.tar.gz
link against librt only on Linux
-rw-r--r--setupinfo.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/setupinfo.py b/setupinfo.py
index 844c8cb9..6e160f09 100644
--- a/setupinfo.py
+++ b/setupinfo.py
@@ -231,17 +231,17 @@ def print_libxml_error():
def libraries():
+ librt = ['rt'] if 'linux' in sys.platform else []
+
if sys.platform in ('win32',):
libs = ['libxslt', 'libexslt', 'libxml2', 'iconv']
if OPTION_STATIC:
libs = ['%s_a' % lib for lib in libs]
libs.extend(['zlib', 'WS2_32'])
elif OPTION_STATIC:
- libs = ['rt', 'z', 'm']
- elif sys.platform in ('darwin',):
- libs = ['xslt', 'exslt', 'xml2', 'z', 'm']
+ libs = librt + ['z', 'm']
else:
- libs = ['xslt', 'exslt', 'rt', 'xml2', 'z', 'm']
+ libs = ['xslt', 'exslt'] + librt + ['xml2', 'z', 'm']
return libs
def library_dirs(static_library_dirs):