473,466 Members | 1,377 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Distributing programs depending on third party modules.

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
11 3970
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
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
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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: NEWS | last post by:
Can I install Python on a networked server and have any user run Python programs without having to go through the 9Mb client install? What are my options for distributing Python programs to my...
1
by: David | last post by:
I have a database application running on my development machine and now want to distribute the application to a third party. Would someone mind please explaining how I can modify the Setup...
6
by: Jason | last post by:
A non-python programming friend of mine has said that any programs made with Python must be distributed with, or an alternative link, to the source of the program. Is this true?
2
by: RickMuller | last post by:
I really appreciate the ease that the distutils make distributing Python modules. However, I have a question about using them to distribute non-Python (i.e. text) data files that support Python...
5
by: MLH | last post by:
I have little or no knowledge as to how a runtime Access database application might be distributed from a website. I am sure that I'm about to find out. I do have one question for you wizards...
5
by: Hans [DiaGraphIT] | last post by:
Hi! I thought that I've already posted this question(s), but let me try again. I've developed a windows application for use in a medical environment. I now need to distribute this application...
1
by: jerry chapman | last post by:
I have written a program which I want to run on another PC that doesn't have C# installed. What files do I have to move to that PC for my program to run?
6
by: Funpolice | last post by:
Hello, I have written a program that requires some modules from pyxml to run. It will run fine on my pc but if I try to run it on another pc with python but without the pyxml modules, I will get...
9
by: eliben | last post by:
Hello, I'm getting into Python now after years of Perl, and as part of my research I must understand how to do some common tasks I need. I have a bunch of Windows PCs at work to which I want...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.