
Add `astunparse` as `spack_astunparse`. This library unparses Python ASTs and we're adding it under our own name so that we can make modifications to it. Ultimately this will be used to make `package_hash` consistent across Python versions.
14 lines
234 B
Python
14 lines
234 B
Python
# coding: utf-8
|
|
from __future__ import absolute_import
|
|
from six.moves import cStringIO
|
|
from .unparser import Unparser
|
|
|
|
|
|
__version__ = '1.6.3'
|
|
|
|
|
|
def unparse(tree):
|
|
v = cStringIO()
|
|
Unparser(tree, file=v)
|
|
return v.getvalue()
|