security/generate_certdata.py
author Mike Hommey <mh+mozilla@glandium.org>
Mon, 14 Jan 2019 18:41:07 +0000
changeset 513857 2809c756574d28c25d031eecd41779d3392c44d4
parent 478273 f9a66e05d90ea6e12616e97b1cc52f9727c4ddc7
permissions -rw-r--r--
Bug 1519603 - Remove the File class in subconfigure.py. r=nalexander The File class is now used only in one place, only for its mtime property, which can be replaced with os.path.getmtime. Depends on D16402 Differential Revision: https://phabricator.services.mozilla.com/D16403

#!/usr/bin/env python
#
# This exists to paper over differences between gyp's `action` definitions
# and moz.build `GENERATED_FILES` semantics.

import buildconfig
import os
import subprocess


def main(output, *inputs):
    env = dict(os.environ)
    env['PERL'] = str(buildconfig.substs['PERL'])
    output.write(subprocess.check_output([buildconfig.substs['PYTHON'],
                                          inputs[0], inputs[2]], env=env))
    return None