Distributing programs depending on third party modules.
Kevin Walzer
kw at codebykevin.com
Tue May 15 10:33:08 EDT 2007
Tina I wrote:
> Hi list,
>
> Is there a preferred way to distribute programs that depends on third
> party modules like PyQt, Beautifulsoup etc? I have used setuptools and
> just having the setup script check for the existence of the required
> modules. If they're not found I have it exit with a message that it need
> this or that installed.
>
> But this is not very convenient for the end user and I have got a few
> complaints about it. Am I missing something in setuptools or is there a
> better way to do it (except for bundling the modules in the package
> which seem like a rather nasty workaround)?
>
> Thanks
> Tina
What platform are you doing this on? On the Linux platform, "dependency
hell" of this sort is pretty much unavoidable, because there are so many
different packaging systems (apt, rpm, and so on): it's standard to let
the package manager handle these dependencies. And yes, it is
frustrating for end users.
On Windows and the Mac, bundling all the modules isn't a "nasty
workaround"; it's the standard behavior. End users on those platforms
expect complete application packages, including all supporting
libraries, to be provided by the developers. The standard tools for
doing this are py2exe for Windows (http://www.py2exe.org/) and py2app
for Mac (http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html).
There are other methods for distributing "frozen binaries," including
the freeze module that ships with Python itself, cx_freeze, and
PyInstaller: these three may work on Linux/Unix as well as Windows (they
are not supported on the Mac). But the methods above are generally the
ones most widely used.
--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
More information about the Python-list
mailing list