Skip to content

Commit ca8047a

Browse files
WillAydtopper-123
authored andcommitted
Improved documentation for extension development (pandas-dev#53380)
1 parent b1728e9 commit ca8047a

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
.build_cache_dir
3939
.mesonpy-native-file.ini
4040
MANIFEST
41+
compile_commands.json
42+
debug
4143

4244
# Python files #
4345
################

doc/source/development/debugging_extensions.rst

+18
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,21 @@ For Python developers with limited or no C/C++ experience this can seem a daunti
1313
1. `Fundamental Python Debugging Part 1 - Python <https://willayd.com/fundamental-python-debugging-part-1-python.html>`_
1414
2. `Fundamental Python Debugging Part 2 - Python Extensions <https://willayd.com/fundamental-python-debugging-part-2-python-extensions.html>`_
1515
3. `Fundamental Python Debugging Part 3 - Cython Extensions <https://willayd.com/fundamental-python-debugging-part-3-cython-extensions.html>`_
16+
17+
Generating debug builds
18+
-----------------------
19+
20+
By default building pandas from source will generate a release build. To generate a development build you can type::
21+
22+
pip install -ve . --no-build-isolation --config-settings=builddir="debug" --config-settings=setup-args="-Dbuildtype=debug"
23+
24+
By specifying ``builddir="debug"`` all of the targets will be built and placed in the debug directory relative to the project root. This helps to keep your debug and release artifacts separate; you are of course able to choose a different directory name or omit altogether if you do not care to separate build types.
25+
26+
Editor support
27+
--------------
28+
29+
The meson build system generates a `compilation database <https://clang.llvm.org/docs/JSONCompilationDatabase.html>`_ automatically and places it in the build directory. Many language servers and IDEs can use this information to provide code-completion, go-to-defintion and error checking support as you type.
30+
31+
How each language server / IDE chooses to look for the compilation database may vary. When in doubt you may want to create a symlink at the root of the project that points to the compilation database in your build directory. Assuming you used *debug* as your directory name, you can run::
32+
33+
ln -s debug/compile_commands.json .

0 commit comments

Comments
 (0)