Thanks a lot, Andrey, for the time analyzing the problems here, and for the clarifications. I thought libpython was like "libc" for python...
So the main issue seems to be dh_python3 not recognizing the package as "python"... I attach the list of files and directories of the latest package version just in case it's easy to spot problems from it (the "__pycache__" are there for a test Ubuntu build, but are not in the Debian build). Note that I want to ship: - A cpython .so module + its .pyi stubs. - The corresponding py.typed file, which I understand is recommended/mandatory when shipping .pyi stubs. - Pure python scripts (right now, only "ros_bridge.py"). At present, I put everything under "/usr/lib/python3/dist-packages/mrpt/" so everything is together, not "polluting" the "dist-packages" directory. Maybe the package should be named "python3-mrpt" instead? Any way to test dh_python3 manually? Perhaps just build the package locally and run dh_python3 from the pkg root directory? Best, JL On Mon, Jul 10, 2023 at 2:58 PM Andrey Rakhmatullin <w...@wrar.name> wrote: > > On Mon, Jul 10, 2023 at 11:22:05AM +0200, José Luis Blanco-Claraco wrote: > > On Mon, Jul 10, 2023 at 11:09 AM Andrey Rakhmatullin <w...@wrar.name> wrote: > > > No, as it says "phyton3". > > > (I would also expect that using appropriate substvars here is better than > > > writing deps manually) > > > > I know, and added ${python3:Depends} and ${shlibs:Depends}, but > > "dh-python" seems not to add any substvars, and "shlibs" does neither. > shlibs:Depends is indeed irrelevant here. > python3:Depends being empty is a problem that needs to be fixed. I've > built the package and it lacks postinst/prerm so I guess dh_python3 didn't > find any modules in the package. I also see that the package is named > python3-pymrpt while the top-level module is named myrpt, though I don't > know if this can cause any problems beside the autopkgtest not working. > > > In fact, the "so" module built from the pybind11 wrapper seems not to > > list any python library in "ldd", which also puzzled me: > > > > ldd mrpt/pymrpt.cpython-310-x86_64-linux-gnu.so | grep py > > libsnappy.so.1 => /lib/x86_64-linux-gnu/libsnappy.so.1 > > (0x00007facb732d000) > Python extensions indeed don't need to link libpython, which is (mostly?) > for embedding the interpreter, as extensions are loaded into an > interpreter themselves. > > > I checked that other "*cpython.so" modules out there indeed list > > "libpython3.xxx.so" in their "ldd". > (I've checked two random extensiopns and they don't) > > > I understand this is what is preventing "shlibs" to automatically list > > python3 as a substvar, but don't know how to fix it. > It's not, and shlibs:Depends won't list python3 anyway. > -- /** * Jose Luis Blanco-Claraco * Universidad de Almería - Departamento de Ingeniería * [Homepage]( https://w3.ual.es/~jlblanco/ ) * [GH profile]( https://github.com/jlblancoc ) */
python3-pymrpt_2.10.1~20230709-1304-git-1ea114bb~lunar-1_amd64.deb ------------------------------------------------------------------ new Debian package, version 2.0. size 5599708 bytes: control archive=2659 bytes. 2601 bytes, 17 lines control 6102 bytes, 64 lines md5sums Package: python3-pymrpt Source: mrpt Version: 1:2.10.1~20230709-1304-git-1ea114bb~lunar-1 Architecture: amd64 Maintainer: Jose Luis Blanco Claraco <joseluisblan...@gmail.com> Installed-Size: 28338 Depends: libc6 (>= 2.34), libgcc-s1 (>= 3.3.1), libmrpt-apps2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-bayes2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-comms2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-config2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-containers2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-core2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-expr2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-graphs2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-gui2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-hwdrivers2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-img2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-io2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-kinematics2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-maps2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-math2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-nanogui2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-nav2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-obs2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-opengl2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-poses2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-random2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-rtti2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-serialization2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-slam2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-system2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-tfest2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-topography2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libmrpt-vision2.9 (>= 1:2.10.1~20230709-1304-git-1ea114bb~lunar), libstdc++6 (>= 11) Section: science Priority: optional Homepage: https://www.mrpt.org/ Description: Python interface to the MRPT package (Python 3) The Mobile Robot Programming Toolkit (MRPT) is an extensive, cross-platform, and open source C++ library aimed to help robotics researchers to design and implement algorithms in the fields of Simultaneous Localization and Mapping (SLAM), computer vision, and motion planning (obstacle avoidance). . This package contains Python 3 wrapper of the C++ MRPT libraries. drwxr-xr-x root/root 0 2023-07-09 22:04 ./ drwxr-xr-x root/root 0 2023-07-09 22:04 ./usr/ drwxr-xr-x root/root 0 2023-07-09 22:04 ./usr/lib/ drwxr-xr-x root/root 0 2023-07-09 22:04 ./usr/lib/python3/ drwxr-xr-x root/root 0 2023-07-09 22:04 ./usr/lib/python3/dist-packages/ drwxr-xr-x root/root 0 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt-2.10.1.dist-info/ -rw-r--r-- root/root 4 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt-2.10.1.dist-info/INSTALLER -rw-r--r-- root/root 9247 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt-2.10.1.dist-info/METADATA -rw-r--r-- root/root 5353 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt-2.10.1.dist-info/RECORD -rw-r--r-- root/root 0 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt-2.10.1.dist-info/REQUESTED -rw-r--r-- root/root 92 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt-2.10.1.dist-info/WHEEL -rw-r--r-- root/root 118 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt-2.10.1.dist-info/direct_url.json -rw-r--r-- root/root 5 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt-2.10.1.dist-info/top_level.txt drwxr-xr-x root/root 0 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/ -rw-r--r-- root/root 15 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/__init__.py -rw-r--r-- root/root 16 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/__init__.pyi drwxr-xr-x root/root 0 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/__pycache__/ -rw-r--r-- root/root 181 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/__pycache__/__init__.cpython-311.pyc -rw-r--r-- root/root 5565 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/__pycache__/ros_bridge.cpython-311.pyc -rw-r--r-- root/root 0 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/py.typed -rw-r--r-- root/root 27617608 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt.cpython-311-x86_64-linux-gnu.so drwxr-xr-x root/root 0 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/ -rw-r--r-- root/root 149 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/__init__.pyi drwxr-xr-x root/root 0 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/ -rw-r--r-- root/root 16922 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/__init__.pyi -rw-r--r-- root/root 3573 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/apps.pyi -rw-r--r-- root/root 27909 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/bayes.pyi drwxr-xr-x root/root 0 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/comms/ -rw-r--r-- root/root 5472 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/comms/__init__.pyi -rw-r--r-- root/root 1953 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/comms/net.pyi -rw-r--r-- root/root 8346 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/config.pyi -rw-r--r-- root/root 38400 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/containers.pyi -rw-r--r-- root/root 1304 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/cpu.pyi -rw-r--r-- root/root 1427 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/expr.pyi -rw-r--r-- root/root 1370 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/global_settings.pyi -rw-r--r-- root/root 3361 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/graphs.pyi -rw-r--r-- root/root 33859 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/gui.pyi -rw-r--r-- root/root 101485 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/hwdrivers.pyi -rw-r--r-- root/root 30501 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/img.pyi drwxr-xr-x root/root 0 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/io/ -rw-r--r-- root/root 14345 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/io/__init__.pyi -rw-r--r-- root/root 398 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/io/zip.pyi -rw-r--r-- root/root 11518 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/kinematics.pyi -rw-r--r-- root/root 167423 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/maps.pyi -rw-r--r-- root/root 104716 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/math.pyi -rw-r--r-- root/root 84935 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/nav.pyi drwxr-xr-x root/root 0 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/obs/ -rw-r--r-- root/root 86616 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/obs/__init__.pyi drwxr-xr-x root/root 0 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/obs/gnss/ -rw-r--r-- root/root 27413 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/obs/gnss/__init__.pyi -rw-r--r-- root/root 2013 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/obs/gnss/nv_oem6_ins_status_type.pyi -rw-r--r-- root/root 3453 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/obs/gnss/nv_oem6_position_type.pyi -rw-r--r-- root/root 2877 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/obs/gnss/nv_oem6_solution_status.pyi -rw-r--r-- root/root 555 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/obs/stock_observations.pyi drwxr-xr-x root/root 0 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/opengl/ -rw-r--r-- root/root 157963 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/opengl/__init__.pyi -rw-r--r-- root/root 533 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/opengl/stock_objects.pyi drwxr-xr-x root/root 0 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/poses/ -rw-r--r-- root/root 1315 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/poses/Lie.pyi -rw-r--r-- root/root 116992 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/poses/__init__.pyi -rw-r--r-- root/root 110 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/pymrpt_internal.pyi -rw-r--r-- root/root 1660 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/random.pyi drwxr-xr-x root/root 0 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/rtti/ -rw-r--r-- root/root 4718 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/rtti/__init__.pyi -rw-r--r-- root/root 120 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/rtti/internal.pyi -rw-r--r-- root/root 10006 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/serialization.pyi -rw-r--r-- root/root 47472 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/slam.pyi drwxr-xr-x root/root 0 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/system/ -rw-r--r-- root/root 27650 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/system/__init__.pyi -rw-r--r-- root/root 589 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/system/os.pyi -rw-r--r-- root/root 3144 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/tfest.pyi -rw-r--r-- root/root 10298 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/topography.pyi drwxr-xr-x root/root 0 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/typemeta/ -rw-r--r-- root/root 503 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/typemeta/__init__.pyi -rw-r--r-- root/root 22419 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/typemeta/internal.pyi -rw-r--r-- root/root 36596 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/mrpt/vision.pyi -rw-r--r-- root/root 5693 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/nanogui.pyi drwxr-xr-x root/root 0 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/std/ -rw-r--r-- root/root 22757 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/std/__init__.pyi -rw-r--r-- root/root 2301 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/pymrpt/std/chrono.pyi -rw-r--r-- root/root 3476 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/ros_bridge.py -rw-r--r-- root/root 727 2023-07-09 22:04 ./usr/lib/python3/dist-packages/mrpt/ros_bridge.pyi drwxr-xr-x root/root 0 2023-07-09 22:04 ./usr/share/ drwxr-xr-x root/root 0 2023-07-09 22:04 ./usr/share/doc/ drwxr-xr-x root/root 0 2023-07-09 22:04 ./usr/share/doc/python3-pymrpt/ -rw-r--r-- root/root 1474 2023-07-09 22:04 ./usr/share/doc/python3-pymrpt/changelog.Debian.gz -rw-r--r-- root/root 54730 2023-07-01 07:42 ./usr/share/doc/python3-pymrpt/copyright