Search code examples
pythondebianpackageflasgger

Python into Debian package: No module named error


Following the guidelines to build Debian package from a Python files powered by Flassger.

When running a build getting an error:

ImportError: No module named swagger_spec_validator.util

Which mean, that test.py doesn't see swagger_spec_validator.

There seem to be no Swagger related pakcages for Debian at all. Should the swagger_spec_validator be included somewhere in debian/control file?


Solution

  • If swagger is the dependency of the software you package and it is not available in Debian, You'll need to package it before. If swagger is a dependency for test suite only, you may consider modifying or disabling the test.py by creating a patch in d/patches for example..