[SCM] polybori: Polynomials over Boolean Rings branch, upstream-hg,	updated. b4a5cffaa908c53e1d958a42110f8c4dad853aa3
    Alexander Dreyer 
    adreyer at gmx.de
       
    Fri Mar 23 08:02:26 UTC 2012
    
    
  
The following commit has been merged in the upstream-hg branch:
commit 700aea8ebea8e03143b9080eb4317fe16c5c708f
Author: Alexander Dreyer <adreyer at gmx.de>
Date:   Wed Mar 14 00:07:07 2012 +0100
    FIX: import with_statement for doctests for python 2.5
diff --git a/ipbori/ipbori b/ipbori/ipbori
index b50d874..b615e80 100755
--- a/ipbori/ipbori
+++ b/ipbori/ipbori
@@ -63,6 +63,10 @@ def _test(args):
     try:
       module = new_module(file.replace('.','_'))
       content = open(file).read()
+      from distutils.sysconfig import get_python_version
+      if get_python_version() == '2.5':
+          content = 'from __future__ import with_statement\n' + content
+
       exec content in module.__dict__ 
 
       # Some PolyBoRi modules do have optional (possibly hidden) dependencies
-- 
polybori: Polynomials over Boolean Rings
    
    
More information about the debian-science-commits
mailing list