mach should fail if running on Python 3

RESOLVED FIXED in mozilla21

Status

enhancement
RESOLVED FIXED
6 years ago
a year ago

People

(Reporter: alex_y_xu, Assigned: gps)

Tracking

Trunk
mozilla21
x86_64
Linux

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Reporter

Description

6 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0
Build ID: 20130126165632

Steps to reproduce:

hg clone .../mozilla-central
cd mozilla-central
./mach build

Using Python 3.2.3 on Gentoo.


Actual results:

Traceback (most recent call last):
  File "mach", line 53, in <module>
    import mach.main
ImportError: No module named mach.main

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "mach", line 57, in <module>
    import mach.main
  File "/home/alex/mozilla/python/mach/mach/main.py", line 29, in <module>
    from .logging import LoggingManager
  File "/home/alex/mozilla/python/mach/mach/logging.py", line 12, in <module>
    import blessings
  File "/home/alex/mozilla/python/blessings/blessings/__init__.py", line 275
    u''.join(self._resolve_formatter(s) for s in formatters))
      ^
SyntaxError: invalid syntax
Assignee

Comment 1

6 years ago
We don't support building on Python 3. We should catch this.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: mach build fails with "ImportError: No module named mach.main" (Python 3) → mach should fail if running on Python 3
Assignee

Comment 2

6 years ago
Assignee: nobody → gps
Status: NEW → ASSIGNED
Attachment #708743 - Flags: review?(ted)

Comment 3

6 years ago
f+, though I'd make the error message more like: "Mach requires python 2.7.x to run"..., perhaps refering o the bug for getting our **** on python 3
Attachment #708743 - Flags: review?(ted) → review+
Assignee

Comment 4

6 years ago
https://hg.mozilla.org/mozilla-central/rev/95bec0e5a600
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21

Updated

a year ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.