Commit 2189277a authored by Stefan Behnel's avatar Stefan Behnel

remove some references to old "build_ext" building way in cygdb docs

parent 87a9bc29
...@@ -16,22 +16,18 @@ installation). ...@@ -16,22 +16,18 @@ installation).
The debugger will need debug information that the Cython compiler can export. The debugger will need debug information that the Cython compiler can export.
This can be achieved from within the setup This can be achieved from within the setup
script by passing ``pyrex_gdb=True`` to your Cython Extenion class:: script by passing ``gdb_debug=True`` to ``cythonize()``::
from Cython.Distutils import extension from distutils.code import setup
from distutils.extension import Extension
ext = extension.Extension('source', ['source.pyx'], pyrex_gdb=True) extensions = [Extension('source', ['source.pyx'])]
setup(..., ext_modules=[ext])
With this approach debug information can be enabled on a per-module basis. setup(..., ext_modules=cythonize(extensions, gdb_debug=True))
Another (easier) way is to simply pass the ``--pyrex-gdb`` flag as a command
line argument::
python setup.py build_ext --pyrex-gdb For development it's often helpful to pass the ``--inplace`` flag to
the ``setup.py`` script, which makes distutils build your project
For development it's often easy to use the ``--inplace`` flag also, which makes "in place", i.e., not in a separate `build` directory.
distutils build your project "in place", i.e., not in a separate `build`
directory.
When invoking Cython from the command line directly you can have it write When invoking Cython from the command line directly you can have it write
debug information using the ``--gdb`` flag:: debug information using the ``--gdb`` flag::
...@@ -45,7 +41,7 @@ Running the Debugger ...@@ -45,7 +41,7 @@ Running the Debugger
To run the Cython debugger and have it import the debug information exported To run the Cython debugger and have it import the debug information exported
by Cython, run ``cygdb`` in the build directory:: by Cython, run ``cygdb`` in the build directory::
$ python setup.py build_ext --pyrex-gdb --inplace $ python setup.py build_ext --inplace
$ cygdb $ cygdb
GNU gdb (GDB) 7.2 GNU gdb (GDB) 7.2
... ...
...@@ -58,7 +54,7 @@ installed and managed by your package manager you probably need to install debug ...@@ -58,7 +54,7 @@ installed and managed by your package manager you probably need to install debug
support separately, e.g. for ubuntu:: support separately, e.g. for ubuntu::
$ sudo apt-get install python-dbg $ sudo apt-get install python-dbg
$ python-dbg setup.py build_ext --pyrex-gdb --inplace $ python-dbg setup.py build_ext --inplace
Then you need to run your script with ``python-dbg`` also. Then you need to run your script with ``python-dbg`` also.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment