I am building a .deb package of python module with dpkg-buildpackage.
in setup.py i have specified install_requires=['othermodule>=2.0']
but the generated control file does not specify version. Depends: python (>= 2.7), othermodule,
dh_python is guessing the requirements based on setup.py file. However the manpage of dh_python2 states that
(version requirements are ignored by default)
but I cannot manage to include the version in the control file. The problem is that without the version included the .deb package gets installed but then starting the program I get:
pkg_resources.DistributionNotFound: The 'othermodule>=2.0' distribution was not found and is required by ...
because the version installed is less than 2.0
I would like to be able to specify the dependency version only once (in the setup.py for example)
[EDIT:]
I see that in pydist.py the function load() searches in absolute paths:
def load(dname='/usr/share/python/dist/', fname='debian/pydist-overrides',
fbname='/usr/share/python/dist_fallback'):
instead of under ./debian where my package structure lays. And since the package is not installed yet (I am in the process of building it) the pydist file is not found. Am I missing something???