Skip to content

Commit

Permalink
remove gmp build dependency for cglpk
Browse files Browse the repository at this point in the history
  • Loading branch information
aebrahim committed Jan 16, 2015
1 parent 630740a commit 641b9c4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ cobra/solvers/cglpk.c
cobra/solvers/*so
glpk.h
libglpk.a
libgmp.a
.idea/
.ipynb_checkpoints
examples/faq.py
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ before_install:
- export PIP_OPTS="-f https://pypi.drosophi.la --no-index"
- if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then pip install glpk $PIP_OPTS; fi
- pip install python-libsbml-experimental cython numpy scipy $PIP_OPTS
- wget http://drosophi.la/travis_test_dependencies.zip # solver, glpk, and gmp
- wget http://drosophi.la/travis_test_dependencies.zip # esolver, and glpk
- unzip travis_test_dependencies.zip
- export PATH=$PATH:$PWD
- export LDFLAGS="-Wl,-Bsymbolic-functions"
install:
- python setup.py develop
# # command to run tests
Expand Down
9 changes: 3 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,7 @@ def get_tag(self):
except ImportError:
pass

if system() in {"Windows", "Darwin"}:
build_args["libraries"] = ["glpk"]
else:
build_args["libraries"] = ["glpk", "gmp"]
build_args["libraries"] = ["glpk"]
# It is possible to statically link libglpk to the built extension. This
# allows for simplified installation without the need to install libglpk to
# the system, and is also usueful when installing a particular version of
Expand All @@ -116,10 +113,10 @@ def get_tag(self):
# https://gist.github.com/aebrahim/94a2b231d86821f7f225
include_dirs = []
library_dirs = []
if isfile("libglpk.a") or isfile("libgmp.a"):
if isfile("libglpk.a"):
library_dirs.append(abspath("."))
if isfile("glpk.h"):
include_dirs.append(dirname(abspath("glpk.h")))
include_dirs.append(abspath("."))
if name == "posix":
from subprocess import check_output
try:
Expand Down

0 comments on commit 641b9c4

Please sign in to comment.