#NEWLINE# def make_legacy_pyc( source ) : #NEWLINE# #INDENT# 'Move a PEP 3147 pyc/pyo file to its legacy pyc/pyo location.\n\n    The choice of .pyc or .pyo extension is done based on the __debug__ flag\n    value.\n\n    :param source: The file system path to the source file.  The source file\n        does not need to exist, however the PEP 3147 pyc file must exist.\n    :return: The file system path to the legacy pyc file.\n    ' #NEWLINE# pyc_file = imp . cache_from_source ( source ) #NEWLINE# up_one = os . path . dirname ( os . path . abspath ( source ) ) #NEWLINE# legacy_pyc = os . path . join ( up_one , ( source + ( 'c' if __debug__ else 'o' ) ) ) #NEWLINE# os . rename ( pyc_file , legacy_pyc ) #NEWLINE# return up_one