Search code examples
pythonpackagingpippypi

Packaging a Python app with PyPI + OS-level dependencies


I would like to package a Python scientific application for PyPI. My problem is that it relies on PyPI-level deps (e.g. numpy, scipy, etc.) as well as others which must be dealt at the OS-level: wxPython and Python-VTK (e.g. with apt-get on Ubuntu, homebrew on OSX, etc).

I'd like to know what would be the ideal strategy for doing this, and in particular, which packaging system would fit best (I'm currently favoring Distribute).


Solution

  • distribute is a fork of setuptools with better perhaps documentation. You basically have distutils (stdlib) and setuptools as your choices. Since distutils doesn't let you specify dependencies, only setuptools is left.

    You generally list all dependencies, and document the installation procedure clearly (including in the long_description field pushed to PyPI). Include the OS-level installed packages, most distributions include the egg information when installing these.