Files
Jeremy Andrews 0c61ee391c Issue #2974 - Part 14: Moved libraries and imports.
reduce is moved to functools, urllib reogranized.

2to3 . --fix urllib -wpn
2to3 . --fix reduce -wpn
2to3 . --fix import -wpn
2to3 . --fix imports -wpn
2to3 . --fix imports2 -wpn

Ref: PEP 3108, PEP 3100
https://peps.python.org/pep-3108/
https://peps.python.org/pep-3100/
2026-03-04 20:24:12 -06:00

21 lines
426 B
Python
Executable File

#!/usr/bin/env python2.7
from __future__ import print_function
import sys
import os
import json
import subprocess
from io import StringIO
gecko_dir = sys.argv[1]
os.chdir(gecko_dir)
result = subprocess.check_output(["./mach", "environment", "--format", "json"])
environment = json.load(StringIO(result))
topobjdir = environment["mozconfig"]["topobjdir"]
if topobjdir is None:
topobjdir = sys.argv[2]
print(topobjdir)