From d162dd8cd6b5b3183ffc0db83bdc21985759a48e Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Sun, 8 Dec 2024 10:43:54 -0500 Subject: [PATCH] add one more path --- setup.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/setup.py b/setup.py index ff4157e..890d8e0 100644 --- a/setup.py +++ b/setup.py @@ -5,6 +5,15 @@ from setuptools import setup from setuptools.extension import Extension +CONDA_PREFIX = os.environ.get("CONDA_PREFIX") +if not CONDA_PREFIX: + raise ValueError("CONDA_PREFIX not set, did you active a conda environment?") + +# gurobi seems to be putting its libraries in the top of the conda env +os.environ["PATH"] += os.pathsep + CONDA_PREFIX +print("CONDA_PREFIX:", CONDA_PREFIX) +print("PATH:", os.environ["PATH"]) + # enable test coverage tracing if CYTHON_TRACE is set to a non-zero value CYTHON_TRACE = int(os.getenv("CYTHON_TRACE") in ("1", "True"))