Skip to content

Commit 0279efb

Browse files
committed
2 parents d3580ef + bbaa777 commit 0279efb

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,24 @@ If some dependency is not enabled in the pre-built wheels, you can also run the
136136
- Optional: on Linux use some of the `manylinux` images as a build hosts if maximum portability is needed and run `auditwheel` for the wheel after build
137137
- Optional: on macOS use ``delocate`` (same as ``auditwheel`` but for macOS) for better portability
138138

139+
#### Manual debug builds
140+
141+
In order to build `opencv-python` in an unoptimized debug build, you need to side-step the normal process a bit.
142+
143+
1. Install the packages `scikit-build` and `numpy` via pip.
144+
2. Run the command `python setup.py bdist_wheel --build-type=Debug`.
145+
3. Install the generated wheel file in the `dist/` folder with `pip install dist/wheelname.whl`.
146+
147+
If you would like the build produce all compiler commands, then the following combination of flags and environment variables has been tested to work on Linux:
148+
```
149+
export CMAKE_ARGS='-DCMAKE_VERBOSE_MAKEFILE=ON'
150+
export VERBOSE=1
151+
152+
python3 setup.py bdist_wheel --build-type=Debug
153+
```
154+
155+
See this issue for more discussion: https://github.com/skvark/opencv-python/issues/424
156+
139157
#### Source distributions
140158

141159
Since OpenCV version 4.3.0, also source distributions are provided in PyPI. This means that if your system is not compatible with any of the wheels in PyPI, ``pip`` will attempt to build OpenCV from sources. If you need a OpenCV version which is not available in PyPI as a source distribution, please follow the manual build guidance above instead of this one.

0 commit comments

Comments
 (0)