spack/lib/spack/external/spack_astunparse/__init__.py
Todd Gamblin b324fe5d95 externals: add astunparse
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.
2022-01-12 06:14:18 -08:00

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()