Skip to content

Commit c2d8cfd

Browse files
mdealencarJoao-DionisioCopilot
authored
fix: set proper include and lib paths for building within conda (#1125)
* fix: set proper include and lib paths for building within conda * Update setup.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update setup.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: João Dionísio <57299939+Joao-Dionisio@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent fd66f4c commit c2d8cfd

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

setup.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,14 @@
1313
conda_prefix = os.environ.get("CONDA_PREFIX", "").strip('"')
1414

1515
if conda_prefix and os.path.exists(os.path.join(conda_prefix, "include")):
16-
includedirs = os.path.join(conda_prefix, "include")
17-
libdir = os.path.join(conda_prefix, "lib")
18-
libname = "libscip" if platform.system() == "Windows" else "scip"
16+
if platform.system() == "Windows":
17+
includedirs = [os.path.join(conda_prefix, "Library/include")]
18+
libdir = os.path.join(conda_prefix, "Library/lib")
19+
libname = "libscip"
20+
else:
21+
includedirs = [os.path.join(conda_prefix, "include")]
22+
libdir = os.path.join(conda_prefix, "lib")
23+
libname = "scip"
1924
print(f"Detected conda environment at {conda_prefix}.")
2025
print(f"Using include path {includedirs}.")
2126
print(f"Using library directory {libdir}.\n")

0 commit comments

Comments
 (0)