[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help with Lintian error in python3 (pybind11-wrapped) package



On Mon, Jul 10, 2023 at 05:11:39PM +0200, José Luis Blanco-Claraco wrote:
> Thanks a lot, Andrey, for the time analyzing the problems here, and
> for the clarifications. I thought libpython was like "libc" for
> python...
It is, but as extensions are loadable plugins, they are fine with symbols
being provided by the executable instead of linking a library. If you
check you will see that Py* symbols in the extensions are unresolved and
that /usr/bin/python3 exports them.

> 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).
TBH I don't think it's about the file list (though it's possible).

> 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.
I don't think this makes sense. You should put them wherever the upstream
puts them so that the module can be imported (and scripts can be run) in
the way that is documented and expected by users.

> Maybe the package should be named "python3-mrpt" instead?
It should always be named for its top-level importable module, see
https://www.debian.org/doc/packaging-manuals/python-policy/index.html#module-package-names

> Any way to test dh_python3 manually? Perhaps just build the package
> locally and run dh_python3 from the pkg root directory?
Yes. And you should run it in the verbose mode.


Reply to: