Jason Tackaberry wrote: > On Wed, 2008-03-26 at 13:27 +0100, Dirk Meyer wrote: > >> So you read stuff in the .svn dir. I had the same idea, but that would >> mean that you must have the .svn dir if you want to create the >> version.py file. >> > > Just parse the output of 'svn info'. If the output contains 'Revision: > foo' you can use it, otherwise you know it's not being built from an svn > checkout. >
Well for a svn version this is okay, parsing the output is easy, I use: Popen(["sed", "-n", "/Revision:/s/Revision: *\([0-9]*\)/\\1/p"], stdin=p1.stdout, stdout=PIPE) But the releases I create the file before building the distribution. Duncan ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel