Skip to content

Commit

Permalink
add finding mosek python interface to the build process
Browse files Browse the repository at this point in the history
  • Loading branch information
rileyjmurray committed Jan 20, 2020
1 parent b83c85d commit 39e3b56
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion gpkit/build.py
Expand Up @@ -122,6 +122,21 @@ def look(self):
pass


class MosekConif(SolverBackend):

name = 'mosek_conif'

def look(self):
"Attempts to import mosek."
try:
log("# Trying to import mosek...")
# Testing the import, so the variable is intentionally not used
import mosek # pylint: disable=unused-variable
return "in Python path"
except ImportError:
pass


class Mosek(SolverBackend):
"MOSEK finder and builder."
name = "mosek"
Expand Down Expand Up @@ -279,7 +294,7 @@ def build():
log("Started building gpkit...\n")

log("Attempting to find and build solvers:\n")
solvers = [Mosek(), MosekCLI(), CVXopt()]
solvers = [MosekConif(), Mosek(), MosekCLI(), CVXopt()]
installed_solvers = [solver.name
for solver in solvers
if solver.installed]
Expand Down

0 comments on commit 39e3b56

Please sign in to comment.