By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,222 Members | 2,416 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,222 IT Pros & Developers. It's quick & easy.

Distributing programs depending on third party modules.

P: n/a
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
May 15 '07 #1
Share this Question
Share on Google+
11 Replies


P: n/a
Tina I a écrit :
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
EasyInstall, perhaps ?
http://peak.telecommunity.com/DevCenter/EasyInstall

HTH
May 15 '07 #2

P: n/a
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/py2a...oc/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
May 15 '07 #3

P: n/a
Kevin Walzer a écrit :
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,
Yes it is. EasyInstall works just fine.
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.
I'm a happy user of Gentoo and Ubuntu. I don't have any frustration
feeling.

May 15 '07 #4

P: n/a
Bruno Desthuilliers wrote:
>What platform are you doing this on? On the Linux platform,
"dependency hell" of this sort is pretty much unavoidable,

Yes it is. EasyInstall works just fine.
You can install a beast like PyQt with easy_install? Meaning, that it
will download and build/install not just the PyQt bits, but also Qt
itself, sip, and all the other foundational components? If easy_install
handles all that, I'm impressed.
--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
May 15 '07 #5

P: n/a
Kevin Walzer wrote:
>
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.
I mainly write apps for Linux although some are in theory cross platform
(but I don't have Windows to test on so I don't really care about that
part). Of course catering to every concievable package management system
is impossible so I'm looking for something to make it easy for people to
use the app as it is.
>
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.
A binary would be ideal. I'll look into the freeze modules and
Pyinstaller. Even if they don't handle huge things like Qt it would be a
step in the right direction if it handles smaller third part modules.
And maybe the smartest thing to do would be to dump PyQt and just go for
tkinter, however ugly it is :/

Anyways, thanks for the help people
Tina
May 16 '07 #6

P: n/a
Kevin Walzer a écrit :
Bruno Desthuilliers wrote:
>>What platform are you doing this on? On the Linux platform,
"dependency hell" of this sort is pretty much unavoidable,

Yes it is. EasyInstall works just fine.

You can install a beast like PyQt with easy_install? Meaning, that it
will download and build/install not just the PyQt bits, but also Qt
itself, sip, and all the other foundational components?
Are these components packaged in such a way to support easy_install ?-)

No, of course, easy_install doesn't *actually* support this (while
AFAICT, it technically *could* do the job). I was talking about
dependencies between Python packages.

If you want support for such external dependencies, emerge
(Gentoo-Linux) is your friend - and believe me, it's really impressive.

Note that if you go that way, neither Windows nor MacOS X are actually
able to cleanly manage such dependencies (which is why the usual
solution on these platforms - or at least on Windows - is to just bundle
everything in a single big package). FWIW, I sure had much more trouble
with "DLHell" on Windows than on Gentoo or Ubuntu.
If easy_install
handles all that, I'm impressed.
I'm already impressed by the whole setuptools package.

May 16 '07 #7

P: n/a
On May 16, 7:44 am, Tina I <tina...@bestemselv.comwrote:
A binary would be ideal. I'll look into the freeze modules and
Pyinstaller. Even if they don't handle huge things like Qt it would be a
step in the right direction if it handles smaller third part modules.
And maybe the smartest thing to do would be to dump PyQt and just
go for tkinter, however ugly it is :/
It's may be worth reading this message before making such a drastic
decision:

http://www.riverbankcomputing.com/pi...ay/016092.html

David ;-)

May 16 '07 #8

P: n/a
David Boddie wrote:
On May 16, 7:44 am, Tina I <tina...@bestemselv.comwrote:
>A binary would be ideal. I'll look into the freeze modules and
Pyinstaller. Even if they don't handle huge things like Qt it would be a
step in the right direction if it handles smaller third part modules.
And maybe the smartest thing to do would be to dump PyQt and just
go for tkinter, however ugly it is :/

It's may be worth reading this message before making such a drastic
decision:

http://www.riverbankcomputing.com/pi...ay/016092.html

David ;-)
Oh... now I feel stupid... I'm on the PyQt list but somehow missed that
topic.
Thanks!

Tina
May 16 '07 #9

P: n/a
Bruno Desthuilliers wrote:
Kevin Walzer a écrit :

Note that if you go that way, neither Windows nor MacOS X are actually
able to cleanly manage such dependencies (which is why the usual
solution on these platforms - or at least on Windows - is to just bundle
everything in a single big package). FWIW, I sure had much more trouble
with "DLHell" on Windows than on Gentoo or Ubuntu.
I target Mac OS X only with my Python application. py2app wraps up
Python, Tcl/Tk, and the related items into a single application bundle,
which the user can then install via drag-and-drop. The resulting package
is big, but hard drive space is cheap these days.
>
I'm already impressed by the whole setuptools package.
In general, I agree with this statement. It's very simple to do sudo
easy_install mypythonextension--even easier than grabbing a tarball
myself and doing python setup.py, because it downloads the bits for you.

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
May 16 '07 #10

P: n/a
Tina I wrote:
Kevin Walzer wrote:
And maybe the smartest thing to do would be to dump PyQt and just go for
tkinter, however ugly it is :/
Tkinter doesn't have to be ugly.

I sell a proprietary Tkinter app commercially on OS X:

http://www.codebykevin.com/phynchronicity-running.png

It takes some work to get Tkinter looking polished. You have to use
extension packages for things like table views, tree views,
platform-specific theming, and so on. Fortunately, all that stuff is
available in Tkinter:

Tile for Tkinter: http://tkinter.unpythonic.net/wiki/TileWrapper

Tabelist for Tkinter (with Tile support):
http://tkinter.unpythonic.net/wiki/TableListTileWrapper

pyBwidgets: http://tkinter.unpythonic.net/bwidget/

Tile, Tablelist and BWidgets are my extension packages of choice. There
are others as well.

Here's a sample application that uses some of the packages outlined above:

http://tkinter.unpythonic.net/wiki/PyLocateTile (includes Mac and
X11-based screen shots)

It may not be worth your time to port from PyQt to Tkinter, but I did
want to show a bit how you can create a polished GUI with Tkinter.

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
May 16 '07 #11

P: n/a
Kevin Walzer wrote:
Tina I wrote:
>Kevin Walzer wrote:

>And maybe the smartest thing to do would be to dump PyQt and just go
for tkinter, however ugly it is :/

Tkinter doesn't have to be ugly.

I sell a proprietary Tkinter app commercially on OS X:

http://www.codebykevin.com/phynchronicity-running.png
Thanks, looks very nice :)
I'll play around with Tkinter a little and maybe try it out for my next
project just for fun.

Tina
May 17 '07 #12

This discussion thread is closed

Replies have been disabled for this discussion.