cmake for python projects (was: KDE/kdegames)

Andreas Pakulat apaku at
Sun Sep 26 19:29:49 BST 2010

On 26.09.10 20:06:29, Wolfgang Rohdewald wrote:
> On Sonntag 26 September 2010, Alexander Neundorf wrote:
> > On Sunday 26 September 2010, Wolfgang Rohdewald wrote:
> > > There should be clear guidelines defined for python
> > > projects somewhere in the wiki IMHO. I am not a cmake
> > > export nor a packager and would really prefer to stay
> > > out of this discussion. Anyway I would volunteer to
> > > write up a new small chapter "CMake and Python projects"
> > > at
> > > if nobody else does.
> > 
> > This would be really *great*.
> > I can help with any cmake issues, but I'm no python expert.
> > Just start it, I'll give comments :-)
> Before starting, I do have a fundamental question about cmake
> and python:
> Who uses cmake? Only the distribution packagers?
> Or also developers?
> Or even end users?
> I can see only one switch in kajongg/CMakeLists.txt:
> if that is set, both make (aka compiling) and make install
> (aka installing) do something in the build directory.
> If it is not set, both do nothing.
> but if cmake cannot distinguish between dependencies for
> compiling and for installing, I do not see how all of
> the three user groups can get satisfying results.
> I do not think developers are a problem. If kajongg cannot
> import needed modules at execution time, they will get
> an error message and know what to do. Kajongg will even
> tell them what they need to install in a nice KDialog
> (although that is rather unpythonic, citing Sebastian
> K├╝gler on kde-core-devel)
> If an end user uses cmake for installation, I would expect
> the same from her.
> So only packagers are of concern. And they do not care
> about dependencies if they do not need them for compiling,
> they might even patch them out for simplifying and 
> speeding up their build system (as stated by Sune Vuorela
> and Johannes Obermeyer, distribution packagers 
> for Debian and Suse).
> So kajongg/CMakeLists.txt and kdegames/CMakeLists.txt
> should not enforce runtime dependencies and probably
> not even check for them at all.
> Am I right so far? And if yes, how do packagers ensure
> correct install dependencies for their packages? By
> testing kajongg or by believing what the authors tell
> them informally? Or should there be a required file
> like "kajongg/RuntimeDepencencies" for python projects?

This has all been discussed recently on the kde-buildsystem list,
basically runtime dependencies should _not_ be checked via cmake and
instead should be listed in a README.packagers file (if I recall the
name correctly). Thats how packagers will know the dependencies. And the
app in question should of course notify the user in some way if a
runtime dep is missing.


You have a reputation for being thoroughly reliable and trustworthy.
A pity that it's totally undeserved.

More information about the kde-core-devel mailing list