Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add PyPi dependencies to DEB package

I created some python app using autobahn and packaged it using baazar builddeb. In python setup.py file I added requires tag with all the required dependencies. Is it possible to tell debian package installer to install these packages?

I added some of deps to debian/control>Depends but:

  1. dpkg -i my_package does not install dependencies. Just shows the error and I need to install these deps manually.

  2. some packages does not exists in standard Ubuntu repos. For example autobahn. And in general I'd like to have installed all python dependencies by pip/easy_install

I am using DistUtilsExtra.auto.setup with personalized install action. So I think I could run easy_install packages there. Is it good idea?

Thank you.

like image 602
marcinpz Avatar asked Aug 31 '12 07:08

marcinpz


People also ask

Does pip pull from PyPI?

pip is installing the packages from PyPi, yes. On the PyPi website you can find links to github where you can find the full package code, but where pip download is PyPi.

Does pip install dependencies of dependencies?

Pip will not flag dependency conflicts. As a result, it will happily install multiple versions of a dependency into your project, which will likely result in errors.

Is PyPI the same as pip?

pip is the de facto package manager in the Python world. It can install packages from many sources, but PyPI is the primary package source where it's used. When installing packages, pip will first resolve the dependencies, check if they are already installed on the system, and, if not, install them.


1 Answers

Create debian packages from pypi using the python-stdeb package, then depend on them like any other package.

See http://pypi.python.org/pypi/stdeb

like image 186
steveayre Avatar answered Sep 23 '22 17:09

steveayre