Hi Gianfranco (2022.03.04_17:26:52_-0400)
> Hello, with the changes in Python3.10, packages using automake will
> try to install into /usr/local/lib instead of /usr/lib

Aha, thanks for that.

The patch should work, but I'm not convinced that it's the best
solution.

The comment, copied from pybind11 refers to headers, but the paths being
queried are platlib and purelib. These are module installation paths,
not header paths.

It makes sense for packages to install to /usr/local when being built
locally, and to /usr when being built as part of a Debian package build.

In the pybind11 case, I helped it to find the Python headers in
/usr/include (platinclude), but let it install modules to the /usr/local
platlib.

dh_python3 will move modules from /usr/local to /usr, so this works.
Although there are scenarios where it won't, such as anything that
hard-codes the target path. And packages may need to adjust dh_install
configuration to find modules in /usr/local.

With this patch, automake will install to /usr for locally built code
and debian-packaged code. This probably isn't desired. Maybe check
prefix and select the appropriate scheme from that?

SR

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  +1 415 683 3272

Reply via email to