6

I'm trying to build a .deb from a python package. In order to do so I have to configure a control file. The control file contains a line where you can define dependencies for your package, e.g:

Depends: python-appindicator, python3-yaml (>=3.11), ${misc:Depends}, ${python3:Depends}

The dependency definition for python3-yaml is easy to understand, but what do ${misc:Depends} and ${python3:Depends} stand for?

Rotareti
  • 49,483
  • 23
  • 112
  • 108

1 Answers1

7

This means that during build process variable ${python3:Depends} will be replaced with guessed py3 dependencies for that package. dh_python3 will help to do that. It's trying to guess what are the dependencies of package which contains such entry by looking for requires.txt file within the build directory, for example at debian/python-foo/usr/lib/python3.4/dist-packages/foo-0.0.1.egg-info/requires.txt and then translating it to the debian-like dependencies. Also ${misc:Depends} means such types of dependencies that are being involved by debhelper itself (by some of dh_* utilities).

NULL
  • 191
  • 1
  • 3
  • 13
  • My package requires a dependency called `PyYAML`. That is the name for it in `requirements.txt` and on `PyPi`. The Debian equivalent for this package is called `python3-yaml`. Do I have to specify `python3-yaml` in the `control` file or will it be included automatically if I have `PyYAML` in `requirements.txt`? – Rotareti May 30 '16 at 09:15
  • 1
    There is no need to specify that package explicitly, it will be translated from `requirements.txt` to debian-like dependency automatically and placed instead of `${python3:Depends}` if it's in there. For some exceptions there are dictionary files to help `dh-python` with translating at `/usr/share/dh-python/dist/`. But for good practice is recommended to set that dependencies explicitly. – NULL May 30 '16 at 09:40