- Package:
- python3-spglib
- Source:
- python3-spglib
- Description:
- C library for crystal symmetry determination - Python3 bindings
- Submitter:
- Drew Parsons
- Date:
- 2024-02-06 15:51:03 UTC
- Severity:
- normal
We have dh_python3 to help automatically identify python package dependencies when building a package. It's unable to identify spglib, however. For instance a pymatgen build log shows dh_python3 -a -O--buildsystem=pybuild I: dh_python3 pydist:302: Cannot find package that provides spglib. Please add package that provides it to Build-Depends or add "spglib python3-spglib" line to debian/py3dist-overrides or add proper dependency to Depends by hand and ignore this info. I'm not sure exactly why dh_python3 can't identify it. I would have thought it could find out which package provides /usr/lib/python3/dist-packages/spglib. But it's not doing that. Maybe it's a bug in dh-python. But I notice that python3-spglib doesn't provide the .dist-info directory that most other python packages provide. I guess dh-python is using the dist-info mechanism to identify packages. Perhaps we should file a bug against dh-python for it to run something like "dpkg -S /usr/lib/python3/dist-packages/<pymodule>" if it doesn't find a dist-info entry. In the meantime, I figure spglib's lack of dist-info occurs because it's a cmake build rather than a python setuptools build, in which case the problem sits alongside Bug#1061263.
Hi, I think both #1061263 and #1061357 could be solved by switching spglib's buildsystem to one based on scikit-build-core, as its pyproject.toml supports that. Andrius
Hi, I made an attempt to build spglib with scikit-build-core by specifying '--buildsystem pybuild' in debian/rules, adding the required build dependencies and patching pyproject.toml to run tests for Python. As expected, spglib is built for all supported Python versions. Shared libraries are built as well, but they are built for every supported Python version separately and are different (at least of same size). Fortran interface does not get built at all. So the buildsystem could be switched, possibly resolving both #1061263 and #1061357, but with the price of losing Fortran interface and strange issue with different shared libraries (maybe just an unreproducible build). Best, Andrius
Hi, I have uploaded spglib 2.2.0-3 with sort of dual buildsystem where python package is built by pybuild. Thus now dist-info is present in the binary package. I did not close this bug as I have not attempted to rebuilt pymatgen yet. If you do and find the "Cannot find package that provides spglib" message gone, please close this bug. Best, Andrius