Hi,

while working further on doing packaging on NetBox I've started trying to package more upcoming new dependencies.

Namely I was looking into mkdocstrings [1], which is a new dep for the next minor version of NetBox (in order to build the documentation).

mkdocstrings comes (of course) with own new package build deps [2] on mkdocs-autorefs [3] and mkdocstrings-python-legacy [4].
pymdown-extensions is something Sandro Tosi was already working on.

To get the additional build dependencies packaged first I started on mkdocs-autorefs.
While doing this the package build breaks due missing PDM support.

dh binary --with python3 --buildsystem=pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild
   dh_auto_build -O--buildsystem=pybuild
I: pybuild plugin_pyproject:107: Building wheel for python3.9 with "build" 
module
I: pybuild base:237: python3.9 -m build --skip-dependency-check --no-isolation --wheel --outdir /build/mkdocs-autorefs-0.4.1/.pybuild/cpython3_3.9_autorefs * Building wheel...

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pep517/wrappers.py", line 332, in 
_call_hook
    raise BackendUnavailable(data.get('traceback', ''))
pep517.wrappers.BackendUnavailable: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pep517/in_process/_in_process.py", line 
89, in _build_backend
    obj = import_module(mod_path)
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'pdm'

ERROR Backend 'pdm.pep517.api' is not available.
E: pybuild pybuild:367: build: plugin pyproject failed with: exit code=1: python3.9 -m build --skip-dependency-check --no-isolation --wheel --outdir /build/mkdocs-autorefs-0.4.1/.pybuild/cpython3_3.9_autorefs I: pybuild plugin_pyproject:107: Building wheel for python3.10 with "build" module I: pybuild base:237: python3.10 -m build --skip-dependency-check --no-isolation --wheel --outdir /build/mkdocs-autorefs-0.4.1/.pybuild/cpython3_3.10_autorefs * Building wheel...

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pep517/wrappers.py", line 332, in 
_call_hook
    raise BackendUnavailable(data.get('traceback', ''))
pep517.wrappers.BackendUnavailable: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pep517/in_process/_in_process.py", line 
89, in _build_backend
    obj = import_module(mod_path)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'pdm'

ERROR Backend 'pdm.pep517.api' is not available.
E: pybuild pybuild:367: build: plugin pyproject failed with: exit code=1: python3.10 -m build --skip-dependency-check --no-isolation --wheel --outdir /build/mkdocs-autorefs-0.4.1/.pybuild/cpython3_3.10_autorefs dh_auto_build: error: pybuild --build -i python{version} -p "3.9 3.10" returned exit code 13
make: *** [debian/rules:10: binary] Error 13
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
I: copying local configuration
E: Failed autobuilding of package

I've tried to find out if we have in Debian PDM already included but haven't found any Python related packages. But my knowledge about core package build backends is really poor. And doing a packaging of such an module is for sure to much I could do.

Anyone here on the list who can shad some light about PDM [5] or is someone already working on this? Or is there a way to get such packages build without a need for PDM to be around? Sorry if this is a stupid questions, but I'm really not in the deep interns of Python package build systems.


[1] https://github.com/mkdocstrings/mkdocstrings
[2] https://github.com/mkdocstrings/mkdocstrings/blob/master/pyproject.toml#L37
[3] https://github.com/mkdocstrings/autorefs
[4] https://github.com/mkdocstrings/python-legacy
[5] https://github.com/pdm-project/pdm

--
Regards
Carsten

Reply via email to