When I build Python package into .deb to distribute, I have always been using setuptools and in my debian/control file I had following:
Package: myproject
Architecture: all
Depends: ${misc:Depends}, ${python3:Depends}, cron, ...
And I build the Python3 package as follows:
dh build --with python3 --buildsystem pybuild
Documentation for pybuild says that you should never download python3 package dependencies from pypi and fully rely on debian package manager, aka apt-get install python3-* and actually adding ${python3:Depends} in combination with disabled debhelper's http_proxy will do that trick, which basically forces to download all python3 dependencies from apt repo.
But the thing is that python3-* dependencies are not the latest in the apt repo, some of them are very outdated, like sqlalchemy, however my Python3 project, that I wish to distribute is using the latest dependencies.
How can I build my python3 project and then successfully install it on a computer using dpkg buildpackage, but being able to use PyPi dependencies, since they are latest and the ones my project uses?