[Checkins] SVN: z3c.recipe.sphinxdoc/trunk/ - fix python 2.4 support
Roger Ineichen
roger at projekt01.ch
Sat Feb 14 11:32:23 EST 2009
Log message for revision 96541:
- fix python 2.4 support
- fix broken srcDir path generation for windows
Changed:
U z3c.recipe.sphinxdoc/trunk/CHANGES.txt
U z3c.recipe.sphinxdoc/trunk/src/z3c/recipe/sphinxdoc/__init__.py
-=-
Modified: z3c.recipe.sphinxdoc/trunk/CHANGES.txt
===================================================================
--- z3c.recipe.sphinxdoc/trunk/CHANGES.txt 2009-02-14 15:22:50 UTC (rev 96540)
+++ z3c.recipe.sphinxdoc/trunk/CHANGES.txt 2009-02-14 16:32:23 UTC (rev 96541)
@@ -5,8 +5,10 @@
0.0.6 (unreleased)
------------------
-- ...
+- Bug: fix python 2.4 support
+- Bug: fix broken srcDir path generation for windows
+
0.0.6 (2009-01-19)
------------------
Modified: z3c.recipe.sphinxdoc/trunk/src/z3c/recipe/sphinxdoc/__init__.py
===================================================================
--- z3c.recipe.sphinxdoc/trunk/src/z3c/recipe/sphinxdoc/__init__.py 2009-02-14 15:22:50 UTC (rev 96540)
+++ z3c.recipe.sphinxdoc/trunk/src/z3c/recipe/sphinxdoc/__init__.py 2009-02-14 16:32:23 UTC (rev 96541)
@@ -15,8 +15,8 @@
import urllib2
import sys
import os
-from os.path import join, dirname, isdir
-from email import parser
+from os.path import join, dirname, isdir, normpath
+from email import message_from_string
import shutil
import zc.recipe.egg
@@ -106,19 +106,21 @@
open(join(staticDir,'layout.html'), 'w').write(f.read())
installed.append(join(staticDir, 'layout.html'))
- metadata = dict(parser.Parser().parsestr('\n'.join(doc._get_metadata('PKG-INFO'))).items())
+ metadata = dict(message_from_string('\n'.join(
+ doc._get_metadata('PKG-INFO'))).items())
#create conf.py
confPyPath = join(partDir, 'conf.py')
confPy = open(confPyPath, 'w')
- confPy.write(confPyTemplate % dict(project=metadata.get('Name', doc.project_name),
- copyright=metadata.get('Author', 'Zope Community'),
- version=metadata.get('Version', doc.version),
- release=metadata.get('Version', doc.version),
- staticDir=staticDir,
- templatesDir=templatesDir,
- indexDoc=self.options.get('index-doc','index')
- ))
+ confPy.write(confPyTemplate % dict(
+ project=metadata.get('Name', doc.project_name),
+ copyright=metadata.get('Author', 'Zope Community'),
+ version=metadata.get('Version', doc.version),
+ release=metadata.get('Version', doc.version),
+ staticDir=staticDir,
+ templatesDir=templatesDir,
+ indexDoc=self.options.get('index-doc','index')
+ ))
confPy.close()
installed.append(confPyPath)
@@ -127,10 +129,10 @@
if not isdir(buildDir):
os.mkdir(buildDir)
- srcDir = join(doc.location,
- srcDirs.get(doc.project_name,
- self.options.get('src-dir',
- doc.project_name.replace('.','/'))))
+ srcDir = join(doc.location, srcDirs.get(doc.project_name,
+ self.options.get('src-dir', doc.project_name.replace('.','/'))))
+ # fix bad path on windows (e.g. //foo\bar)
+ srcDir = normpath(srcDir)
projectsData[doc.project_name] = ['-q','-c',partDir,
srcDir, buildDir]
More information about the Checkins
mailing list