[Catalog-sig] RFC: pypan - a Python package manager

Thomas Heller thomas.heller@ion-tof.com
25 Oct 2002 21:55:57 +0200


Suchandra Thapa <s-thapa-11@alumni.uchicago.edu> writes:

> On Fri, 2002-10-25 at 12:48, Thomas Heller wrote:
> 
> 
>     Shouldn't we take this thread to the catalog-sig, or at least
>     parts of it? The discussion pypan vs. ciphon?
>     I have the impression that some discussion also lets other people
>     jump in... They see that something is happing.
>     
> 
> Sure, I've cc'ed the message to the catalog-sig list.
> 
>     And also I'm still hacking on pypan, and would be interested in
>     comments ;-)
> 
> That's the rub.  There have been several attempts to get this
> functionality for python, but my impression is that most of died because
> the authors didn't get much feedback and therefore gradually lost
> interest in continuing.

The chicken and egg issue. It's difficult to reach the critical mass
where the system is actually used.

Question for other readers of this list (David, maybe): How's pyppm
going? I don't hear much from it.

> 
>     > I'm still not sure what the best approach is however.  I don't
>     > really want to have functionality that is available only in
>     > some cases but trying to offer a remove or uninstall command
>     > on all platforms would require changes to distutils to track
>     > what files are being installed (I think).
>     
>     IMO we should try to avoid requiring changes to distutils, and
>     this seems also what the withdrawn PEP 262 was about.
>     
> 
> I agree.  However, I'm not sure how else to make an uninstall
> command available without modifying the distutils source.  Windows
> and rpm based systems are fine since we can use the uninstaller or
> the rpm command to remove modules.  Providing a reliable method on
> other systems seems to be a more difficult problem.  I originally
> considered just removing the appropriate directory in
> /usr/lib/pythonx.x/site-packages but that doesn't catch everything
> and may not even work.

Right - this cannot work.

IMO we should concentrate first on those systems where a 'native
package manager' is used. At least this is the approach I will
continue in pypan (Hm, really a strange name. Think I'll change it to
'pypit' or PythonPit, PythonTrove.  Difficult for a non-native english
speaker ;-).

Since I only use Windows - except sometimes, when managing my starship
area - this is my main interest.

But a 'remove' feature is really needed for a package manager, I
think.

>     Another suggestion: sending bug reports via email doesn't work
>     per default on windows - it's very uncommon to have an smtp
>     server running on the machine you work on. If this feature is to
>     stay, there should probably be a config option 'smtpserver'.
> 
> I forgot to ask about how well that worked on Windows.

It works on windows if you change 'localhost' to a real smtp server.

> I'll change the configuration files and the ciphon config command to
> allow the smtp server to be set.  I think I'll keep it around since
> it seems like it would be useful for developers to be able to get an
> automated bug report with a stack trace emailed to the bugs mailing
> list.  I'm planning on extending it a little further so that users
> can send a bug report manually and to give better reporting of
> errors.

This is only useful if ciphon is in active use by real users.
IMO for the developers it would be better to see the traceback
directly. Maybe a CIPHON_DEBUG environment var or something like that?

My usual work style is to catch exceptions in a sys.excepthook installed
in my sitecustomize file - this recipe is in the Python Cookbook.
This excepthook starts the debugger (pdb), and lets me inspect
the state of the program immediately.

By the way, there are a lot of unqualified try/except clauses in
ciphon.py, which make debugging a pain IMO, and also sometimes mask
programming errors.

Thomas