Skip to content

Commit e944137

Browse files
committed
curl-config may not always return -Lsomething
1 parent d89d74a commit e944137

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

setup.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,19 @@
1515
libpython = "python%i.%i" % (sys.version_info[0], sys.version_info[1])
1616

1717
#LIBRARY_PATH is often not set in Galaxy, though curl-config is in the PATH
18+
additional_libs = [sysconfig.get_config_var("LIBDIR")]
1819
foo, _ = subprocess.Popen(['curl-config', '--libs'], stdout=subprocess.PIPE).communicate()
1920
foo = foo.strip().split()
20-
curldir = None
2121
for v in foo:
22-
if(v[0:2] == "-L")) :
23-
curldir = v[2:]
22+
if(v[0:2] == "-L") :
23+
additional_libs.append(v[2:])
2424

2525
#Galaxy will often link against the wrong libpython!!!!
26-
pythondir = sysconfig.get_config_var("LIBDIR")
2726

2827
module1 = Extension('pyBigWig',
2928
sources = srcs,
3029
libraries = ["m", "z", "curl", libpython],
31-
library_dirs = [pythondir, curldir],
30+
library_dirs = additional_libs,
3231
include_dirs = ['libBigWig'])
3332

3433
setup(name = 'pyBigWig',

0 commit comments

Comments
 (0)