• Bug#1067085: nanobind-dev not in python path and without distribution i

    From Francesco Ballarin@21:1/5 to All on Mon Mar 18 09:30:01 2024
    Package: nanobind-dev
    Version: 1.9.2-1
    Severity: normal
    X-Debbugs-Cc: francesco.ballarin@unicatt.it, dparsons@debian.org

    Dear Maintainer,

    I would like to ask two questions related on usage of nanobind-dev from
    python:

    1) The user guide at https://nanobind.readthedocs.io/en/latest/building.html#finding-nanobind
    states that the downstream user should query
    python3 -m nanobind --cmake_dir
    to determine where nanobind is installed. However, this is not currently possible with nanobind-dev, since the file __init__.py is not installed
    among the standard python paths. To make this work, one has to use PYTHONPATH=/usr/share python3 -m nanobind --cmake_dir

    2) Downstream users or packages may have a pyproject.toml file which
    contains
    ============
    [build-system]
    requires = ["nanobind"]
    ============
    When building with --no-build-isolation, this requires the
    nanobind-*.dist-info folder to be present. Currently either
    pip3 show nanobind
    or
    PYTHONPATH=/usr/share pip3 show nanobind
    show
    WARNING: Package(s) not found: nanobind
    while nanobind installed from pypi.org would show something like
    ============
    Name: nanobind
    Version: 1.9.2
    Summary: nanobind: tiny and efficient C++/Python bindings
    Home-page: https://github.com/wjakob/nanobind
    Author: Wenzel Jakob
    Author-email: wenzel.jakob@epfl.ch
    License: BSD
    Location: /usr/local/lib/python3.11/dist-packages
    Requires:
    Required-by:
    =============
    The next version of fenics-dolfinx, to be packaged in Debian upon
    release, will require --no-build-isolation and nanobind.

    Thanks,
    Francesco





    -- System Information:
    Debian Release: trixie/sid
    APT prefers testing
    APT policy: (500, 'testing')
    Architecture: amd64 (x86_64)

    Kernel: Linux 6.6.15-amd64 (SMP w/8 CPU threads; PREEMPT)
    Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
    Shell: /bin/sh linked to /usr/bin/dash
    Init: unable to detect

    Versions of packages nanobind-dev depends on:
    ii libeigen3-dev 3.4.0-4
    ii robin-map-dev 1.2.1-1

    nanobind-dev recommends no packages.

    nanobind-dev suggests no packages.

    -- no debconf information

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Timo =?UTF-8?Q?R=C3=B6hling?=@21:1/5 to francesco.ballarin@unicatt.it on Sat Apr 6 23:10:01 2024
    Hi,

    On Mon, 18 Mar 2024 08:16:33 +0000 Francesco Ballarin <francesco.ballarin@unicatt.it> wrote:
    1) The user guide at https://nanobind.readthedocs.io/en/latest/building.html#finding-nanobind states that the downstream user should query
    python3 -m nanobind --cmake_dir
    to determine where nanobind is installed.
    The `python3 -m nanobind --cmake_dir` call is only needed for the
    pip/conda package because it installs the CMake config in a location
    that is not searched by default. It is not necessary for the Debian
    package -- find_package(nanobind) works out of the box -- but does
    not hurt (much) either.

    2) Downstream users or packages may have a pyproject.toml file
    which
    contains
    ============
    [build-system]
    requires = ["nanobind"]
    ============
    I added a new binary package python3-nanobind, which provides the
    nanobind module for this use case. Technically, it is not needed for
    the reason outlined above, but if it makes life easier for
    downstream users, that's good enough for me.


    Cheers
    Timo


    --
    ⢀⣴⠾⠻⢶⣦⠀ ╭────────────────────────────────────────────────────╮
    ⣾⠁⢠⠒⠀⣿⡁ │ Timo Röhling │
    ⢿⡄⠘⠷⠚⠋⠀ │ 9B03 EBB9 8300 DF97 C2B1 23BF CC8C 6BDD 1403 F4CA │
    ⠈⠳⣄⠀⠀⠀⠀ ╰────────────────────────────────────────────────────╯

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCgAdFiEEmwPruYMA35fCsSO/zIxr3RQD9MoFAmYRuO4ACgkQzIxr3RQD 9MoDOg/9E6sFwc72T2D8Un82Mhq7BaZhzffiphGJuTrn10MOe87aTumQ3ISAjECf EabNbmjUb96lAcmqA3PHTsV/CmYyC07orvG1gIyDr6Jubf3FK7aPB7V3ar5J37c4 y1/6QkZKXmE1ho+QdnIWIjsS2onQ1UMS6jHw5KxVP/5Ay7/RZmXbn/3qFK+lm2/s oUUFL3xop0UpRAnwAfL0WSXJh1CbHI/u51UufuwVTSCothUGVHGqQOavSOq99O9l j18MHdcQCGgRPD5yOO9pyj+iEKOPNlObS0sBGORsijDIRjKTgc3nN7ZHdRC0SxJM +b8v9Gy68srzSrPpwNX3+t/+luj9tZXPxrHZoE3rbNA