Closed Bug 1641962 Opened 5 years ago Closed 5 years ago

|mach bootstrap| fails to bootstrap if "python3-distutils" isn't installed

Categories

(Firefox Build System :: Mach Core, defect)

defect

Tracking

(firefox78 fixed)

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: mhentges, Assigned: mhentges)

Details

Attachments

(1 file)

mitch@debian:~/dev/mozilla-central$ ./mach bootstrap
Traceback (most recent call last):
  File "./mach", line 225, in <module>
    main(sys.argv[1:])
  File "./mach", line 217, in main
    mach = get_mach()
  File "./mach", line 206, in get_mach
    mach = check_and_get_mach(dir_path)
  File "./mach", line 162, in check_and_get_mach
    return load_mach(dir_path, mach_path)
  File "./mach", line 150, in load_mach
    return mach_bootstrap.bootstrap(dir_path)
  File "/home/mitch/dev/mozilla-central/build/mach_bootstrap.py", line 443, in bootstrap
    driver.load_commands_from_file(os.path.join(mozilla_dir, path))
  File "/home/mitch/dev/mozilla-central/python/mach/mach/main.py", line 267, in load_commands_from_file
    imp.load_source(module_name, path)
  File "/usr/lib/python3.8/imp.py", line 171, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 702, in _load
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/mitch/dev/mozilla-central/taskcluster/mach_commands.py", line 18, in <module>
    from distutils import util
ImportError: cannot import name 'util' from 'distutils' (/usr/lib/python3.8/distutils/__init__.py)

Talked to Ricky, sounds like the solution here is to move from distutils import util into the function(s) that need it, deferring the import.

Assignee: nobody → mhentges
Status: NEW → ASSIGNED
Pushed by mhentges@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2050484c1868 Defer imports of distutils.util to ensure bootstrap can run r=rstewart,perftest-reviewers,sparky
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: