Skip to content

Fix master compatibility #988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
# if SCIPOPTDIR is not set, we assume that SCIP is installed globally
if not scipoptdir:
if platform.system() == "Darwin":
includedir = "/usr/local/include/"
libdir = "/usr/local/lib/"
includedir = "/usr/local/include"
libdir = "/usr/local/lib"
else:
includedir = "."
libdir = "."
Expand Down Expand Up @@ -58,6 +58,7 @@

# set runtime libraries
if platform.system() in ["Linux", "Darwin"]:
extra_compile_args.append("-I/opt/homebrew/include")
extra_link_args.append(f"-Wl,-rpath,{libdir}")

# enable debug mode if requested
Expand Down
2 changes: 1 addition & 1 deletion src/pyscipopt/scip.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@
if rc == SCIP_OKAY:
pass
elif rc == SCIP_ERROR:
raise Exception('SCIP: unspecified error!')

Check failure on line 301 in src/pyscipopt/scip.pxi

View workflow job for this annotation

GitHub Actions / test-coverage (3.11)

SCIP: unspecified error!
elif rc == SCIP_NOMEMORY:
raise MemoryError('SCIP: insufficient memory error!')
elif rc == SCIP_READERROR:
Expand Down Expand Up @@ -2361,7 +2361,7 @@
"""
if self.getMajorVersion() < MAJOR:
raise Exception("linked SCIP is not compatible to this version of PySCIPOpt - use at least version", MAJOR)
if self.getMinorVersion() < MINOR:
if self.getMajorVersion() == MAJOR and self.getMinorVersion() < MINOR:
warnings.warn(
"linked SCIP {}.{} is not recommended for this version of PySCIPOpt - use version {}.{}.{}".format(
self.getMajorVersion(), self.getMinorVersion(), MAJOR, MINOR, PATCH))
Expand Down