Permalink
Browse files

Support __version__ attribute in pure compiled mode.

  • Loading branch information...
1 parent 3e8fe97 commit d810e8b2942f8c52a2e366ce1bda0cfa2d37bd6f @robertwb robertwb committed Oct 4, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 Cython/Compiler/ParseTreeTransforms.py
@@ -2413,6 +2413,9 @@ def visit_cython_attribute(self, node):
if attribute:
if attribute == u'compiled':
node = ExprNodes.BoolNode(node.pos, value=True)
+ if attribute == u'__version__':
+ import Cython
+ node = ExprNodes.StringNode(node.pos, value=EncodedString(Cython.__version__))
elif attribute == u'NULL':
node = ExprNodes.NullNode(node.pos)
elif attribute in (u'set', u'frozenset'):

0 comments on commit d810e8b

Please sign in to comment.