1/30/2024 0 Comments Libavg python 3 installThe packages are included in Ubuntu 7.04 "Feisty Fawn" and above. Packages which should not be used as examples: libselinux,. not using distutils, but autoconf/automake:.distutils based, using debhelper to build for all supported python versions:.cdbs based (cdbs will be extended to ease this) currently you have to use some hooks:.Python3-dbg -c 'import foo' (one line output on stderr) Try to import the extension both with the normal and the debug interpreter:.Install both the python3-foo-dbg and python3-dbg packages. The python3-foo-dbg can optionally contain debug symbols of the python3-foo package (generated by dh_strip -ppython3-foo -dbg-package=python3-foo-dbg) The python3-foo-dbg docdir should be symlinked to the python3-foo docdir. The debug extension should be built without optimization (-O0), automatically done by distutils.The package must hold only the extension modules and header files installed in /usr/include/pythonX.Y _d (when installed in /usr/include/pythonX.Y in the corresponding python3-foo` package). The name is automatically selected by distutils, for other builds the extension must be renamed manually. so and is installed into the same path as the normal extension. To get the include headers, you can use pythonX.Y-config -includes 2>/dev/null.Īn extension for the debug build is named foo _d. The include path must be /usr/include/pythonX.Y _d. The interpreter python3-dbg must be used (or pythonX.Y-dbg) for build and install. If python3-foo depends on other packages with extensions ( python3-bar), then python3-foo-dbg must depend on the corresponding -dbg packages ( python3-bar-dbg).ĭescription: add (debug extension), maybe shorten the description and add This package contains the extensions built for the python debug interpreter.ĭebian/rules: Modifications depend on the packaging style, in general: Python3-foo: Add a suggests to python3-foo-dbg. Track down the dependencies of a package you want to debug, then create -dbg packages for these needed extensions.Īdd a build dependency on python3-all-dbg (>= 3.7.5-1ubuntu1) (building for more than one Python version), or python3-dbg (>= 3.7.5-1ubuntu1) (building for the current Python version). In addition, C assert()s are enabled (via the C way: by not defining NDEBUG), and some routines do additional sanity checks inside "#ifdef Py_DEBUG" blocks.īuilding a -dbg package requires modification for the packaging please don't create -dbg packages for extensions that you don't need. Py_DEBUG implies LLTRACE, Py_REF_DEBUG, and PYMALLOC_DEBUG (if WITH_PYMALLOC is enabled). This is what is generally meant by "a debug build" of Python. Properties of the debug build (excerpt below) are described in SpecialBuilds.txt, also included in the python3.7-dbg package. Call the python-dbg or the pythonX.Y-dbg binaries instead of the python or pythonX.Y binaries.The python3.7 and python3.8 packages in Ubuntu 20.04 LTS "Focal" (like the contemporaneous python packages in previous Ubuntu versions) are modified to look for extension modules under a different name (normal build: foo-python-37m.so, debug build: foo-python-37dm.so), allowing installation of the extension modules into the same path (The naming is directly taken from the Windows builds which already uses this naming scheme). To ease this task, we want to provide often used extension modules for the debug build as well. Using the debug build to debug an application with dozens of extension modules requires first building of these extensions. It's not possible to mix extension modules built for a normal build with extension modules from a debug build. The Python build flag Py_DEBUG allows for building the interpreter in debug mode the default configuration for this debug mode builds extension modules, which are incompatible with the standard interpreter build (making python objects larger).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |