Skip to content

Commit 3ab3a1a

Browse files
Fix debug command (#1027)
* Add SCIPvarMarkRelaxationOnly * Fix and add isRelaxationOnly * remove debug flag * Change activation of debug mode * Update setup.py * Update build.rst
1 parent f0d47a4 commit 3ab3a1a

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

docs/build.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,7 @@ Build with Debug
168168
To use debug information in PySCIPOpt you need to build it with the following command:
169169

170170
.. code-block::
171-
172-
export CFLAGS="-UNDEBUG"
173-
export CXXFLAGS="-UNDEBUG"
171+
export PYSCIPOPT_DEBUG=True # With Windows CMD: set PYSCIPOPT_DEBUG=True
174172
python -m pip install .
175173
176174
.. note:: Be aware that you will need the debug library of the SCIP Optimization Suite for this to work

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,8 @@
6262
extra_link_args.append(f"-Wl,-rpath,{libdir}")
6363

6464
# enable debug mode if requested
65-
if "--debug" in sys.argv:
65+
if os.environ.get("PYSCIPOPT_DEBUG")=="True":
6666
extra_compile_args.append("-UNDEBUG")
67-
sys.argv.remove("--debug")
6867

6968
use_cython = True
7069

tests/test_vars.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ def test_markRelaxationOnly():
7979
assert x.isRelaxationOnly()
8080
assert x.isDeletable()
8181
assert not y.isRelaxationOnly()
82-
assert not y.isDeletable()
82+
assert not y.isDeletable()

0 commit comments

Comments
 (0)