[go: nahoru, domu]

Skip to content

Commit

Permalink
Need to specify all dependencies explicitly now due. Fixes #173
Browse files Browse the repository at this point in the history
  • Loading branch information
tkralphs committed Apr 17, 2023
1 parent d1dbbd4 commit d1d9262
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,21 @@ def getBdistFriendlyString(s):
except:
# If user didn't supply location, then try pkg-config
try:
flags = (check_output(['pkg-config', '--libs', 'cbc'])
.strip().decode('utf-8'))
libs = [flag[2:] for flag in flags.split()
if flag.startswith('-l')]
libDirs = [flag[2:] for flag in flags.split()
if flag.startswith('-L')]
flags = (check_output(['pkg-config', '--cflags', 'cbc'])
.strip().decode('utf-8'))
incDirs = [flag[2:] for flag in flags.split() if
flag.startswith('-I')]
for p in ['cbc','cgl','osi-clp','clp','osi','coinutils']:
flags = (check_output(['pkg-config', '--libs', p])
.strip().decode('utf-8'))
for flag in flags.split():
if flag.startswith('-l') and flag[2:] not in libs:
libs.append(flag[2:])
if flag.startswith('-L') and flag[2:] not in libDirs:
libDirs.append(flag[2:])
flags = (check_output(['pkg-config', '--cflags', p])
.strip().decode('utf-8'))
for flag in flags.split():
if flag.startswith('-I') and flag[2:] not in incDirs:
incDirs.append(flag[2:])
except:
# If pkg-config fails, then look for an installed Cbc
# If pkg-config fails, then look for an installed Cbc
try:
location = dirname(
check_output(['which', 'cbc']).strip()).decode('utf-8')
Expand Down

0 comments on commit d1d9262

Please sign in to comment.