views:

353

answers:

5

For instance, what if PIL, python-rsvg and libev3 are dependencies of the program? These dependencies are not in pypi index, the latter two are Debian package names.

+2  A: 

Simply don't put them in your dependencies and document that in your INSTALL or README.

Luper Rouch
A: 

If you are packaging something to be installed on Debian (as implied), the best way to manage dependencies is to package your program as a .deb and express the dependencies the Debian way. (Note, PIL is available in Debian as python-imaging.)

Ned Deily
A: 

Since the setup.py is Python code too, you just can download and run the setup.py on those packages.

juanjux
+3  A: 

You could use setuptools. setuptools allows you to add any kind of Python installable (any distutils/setuptools enabled package) as a dependency, no matter if it is on PyPI or not.

For example, to depend on PIL 1.1.6, use something like:

setup(...,
      install_requires = ["http://effbot.org/downloads/Imaging-1.1.6.tar.gz"],
      ...)

See setuptools docs for more information.

pH
How is PIL in turn going to cope with dependencies that are not python packages?
btw0
setuptools is only going to run "setup.py install" as usual, any dependency handling is as per Imaging default process, so, if Imaging does it right, as it should, you get PIL correctly installed.Apart from that, you have little good choices: 1) inform your user what "native" packages he must install using the distribution default process, 2) create a distribution native package and the setup the dependencies (the ugly part is that there is a lot of distros out there).
pH
+1  A: 

I've reported this problem here :

http://mail.python.org/pipermail/python-list/2009-September/727045.html