[pony-build] Making virtualenv Fail

C. Titus Brown ctb at msu.edu
Wed Feb 10 19:33:03 PST 2010


On Wed, Feb 10, 2010 at 11:25:07AM -0500, Rosangela Canino-Koning wrote:
> Backing up, how much of a failure do you want? Do you want this thing to
> messily grind to a halt, or do you want it to try to deal with the error
> somewhat gracefully?
> 
> If pip failing to install a dependency is a massive deal-breaker for the
> whole system, which, further, you never really expect to happen, but you
> don't want it to fail silently, use an assert.
> 
> If pip failing to install a dependency is a rare error, but you need to
> clean up after yourself at a higher level before shutting down, then throw
> an exception, and catch it upstream.
> 
> Finally, if pip failing is an expected part of the program flow, and there
> are ways to gracefully handle the error, and continue processing, then check
> pip's return status (or catch it if it's an exception), do whatever, and
> continue processing.
> 
> Any of these strategies can be implemented with either pip returning a
> status code, or with pip throwing an exception. It's what you do with it
> that really matters.

pip installs dependencies, so it depends on what dependencies are necessary
vs "good".  Most dependencies are hard dependencies, but not all.

For example, if some program uses psyco to do runtime optimization, but
psyco is not present, then it could still run most of the tests (just
not the ones testing psyco functionality).

How about giving VirtualenvContext a list of required dependencies and
a separate list of "wouldn't it be nice?" dependencies?

--titus



More information about the pony-build mailing list