autoconf-archive-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

API changes for stringtemplate and required python version


From: Filippo Giunchedi
Subject: API changes for stringtemplate and required python version
Date: Sat, 18 Jul 2009 12:58:09 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

Hi,
I was trying to build something out of maint branch either via make or scons but
I've encountered a few difficulties:

stringtemplate3-3.1-py2.5.egg seems to have changed api and now wants a "file"
kwarg fileobject instead of fileName:

--- a/SConstruct
+++ b/SConstruct
@@ -5,8 +5,8 @@ import os.path as path
 from macro import Macro, writeFile
 from stringtemplate3 import StringTemplateGroup, StringTemplate
 
-__formatters = { "canon.st"    : StringTemplateGroup(fileName = "canon.st")
-               , "markdown.st" : StringTemplateGroup(fileName = "markdown.st")
+__formatters = { "canon.st"    : StringTemplateGroup(file = open("canon.st"))
+               , "markdown.st" : StringTemplateGroup(file = 
open("markdown.st"))
                }
 
 def formatMacro(target, source, env):
--- a/macro.py
+++ b/macro.py
@@ -123,7 +123,7 @@ if __name__ == "__main__":
   opts.add_option('', "--output-suffix", dest = "suffix", default = ".m4")
   (options, args) = opts.parse_args()
   stFile = args.pop(0)
-  formatter = StringTemplateGroup(fileName = stFile, lexer = options.lexer)
+  formatter = StringTemplateGroup(file = open(stFile), lexer = options.lexer)
   for m4File in args:
     (stem,suff) = path.splitext(path.basename(m4File))
     assert suff == ".m4"


moreover, python's textwrap is got break_on_hyphens only on 2.6 thus:

--- a/NOTES
+++ b/NOTES
@@ -18,7 +18,7 @@
 
     - Git (1.6.x.x or later)
 
-    - Python (2.5 or later)
+    - Python (2.6 or later)
 
     - Python StringTemplate Library: http://www.stringtemplate.org/
 

that's unfortunate as debian unstable is got 2.5, that's debian fault though and
I should be able to have 2.6 installed.

filippo
-- 
Filippo Giunchedi - http://esaurito.net - 0x6B79D401

Gretchen: Donnie Darko? What the hell kind of name is that? It's like
          some sort of superhero or something.
  Donnie: What makes you think I'm not?
-- from Donnie Darko (2001)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]