[Kde-games-devel] kajongg in kdereview since 1 month

Sebastian Kügler sebas at kde.org
Thu Mar 18 08:38:37 GMT 2010


On Wednesday 17 March 2010 17:43:40 Sune Vuorela wrote:
> On 2010-03-17, Parker Coates <parker.coates at kdemail.net> wrote:
> > On Wed, Mar 17, 2010 at 03:29, Wolfgang Rohdewald wrote:
> >> On Mittwoch 17 März 2010, Parker Coates wrote:
> >>> ImportError: No module named zope.interface
> >>> 
> >>> Is this a missing dependency check?
> >> 
> >> Yes.
> >> 
> >> Kajongg needs python-twisted-core
> >> (on my kubuntu), and python-twisted-core
> >> needs python-zope.interface.
> >> 
> >> That is not the whole Zope, just one
> >> small part which defines a class interface
> >> mechanism.
> > 
> > So I guess we have 2 options:
> > 
> > 1. Check for the presence of these libraries at configure-time with
> > CMake and skip building Kajonng if they are not found.
> > 
> > 2. Add a runtime check for these libraries by trying to import them
> > and catching any ImportErrors raised, then showing a nice friendly
> > dialog explaining why Kajonng is about to gracefully shut down.
> > 
> > I honestly don't know which one makes more sense, but I know uncaught
> > ImportErrors are not an acceptable means of notifying the user that
> > some dependencies are missing.
> 
> As a distribution packager, I really hate build time checks for runtime
> needs, and normally we patch those checks out. (and sometimes forget to
> add runtime dependencies, but that's a different issue)

Maybe I'm nitpicking here, but it really *is* a build-time problem (only the build 
happens when you first start it). But of course that's debatable, so let's not ;-)

An issue I see is that it's way easier to add to the CMakeLists a piece that says 
"python-twisted is a hard dependency of kajongg, so you may want to install it" 
(because it really is). Doing that in the python code itself is very ... 
inpythonic.

And yes, the same applies to any Python program that has dependencies.
-- 
sebas

http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9




More information about the kde-core-devel mailing list