Closed
Bug 1187302
Opened 9 years ago
Closed 9 years ago
[gui] python 'gui/build.py run' fails on mac
Categories
(Testing :: mozregression, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: sabergeass, Assigned: sabergeass)
Details
Attachments
(1 file)
When I want to run build.py on the OS X platform. It will tells me: > (mozr)MikeLings-MacBook-Pro:mozregression mikeling$ python gui/build.py run > Executing `/Users/mikeling/mozregression/mozr/bin/python mozregui/main.py` > Traceback (most recent call last): > File "mozregui/main.py", line 7, in <module> > from PyQt4.QtGui import QApplication, QMainWindow, QMessageBox > ImportError: No module named PyQt4.QtGui > ERROR: Command '('/Users/mikeling/mozregression/mozr/bin/python', 'mozregui/main.py')' returned non-zero exit status 1 > So, after discuss with :parkouss on irc, we found it's because mac uses PYTHONPATH to find the packages the mozregression need. But in the build.py, we just override it(https://github.com/mozilla/mozregression/blob/master/gui/build.py#L63). Therefore, we need to update the PYTHONPATH variable with '.' in build.py, and not override it. Due to I haven't meet this problem when running under the Ubuntu 12.04 and Windows7, I can't tell if it's a universally problem. So, I decide to treat it as a specially problem on Mac platform for now :).
Attachment #8638554 -
Flags: review?(j.parkouss)
Comment 2•9 years ago
|
||
Comment on attachment 8638554 [details] [review] PR for bug 1187302 Thanks for this! Well the test with env["PYTHONPATH"] could leave to a KeyError (in case the env var is not defined) so it should be fixed. I also noted some minor comments on the PR.
Attachment #8638554 -
Flags: review?(j.parkouss) → review+
Comment 3•9 years ago
|
||
Yup, thanks for the update - just one last thing to change (this is failing when PYTHONPATH is not defined for me), and after that I'll be happy to merge this in. :)
Comment 4•9 years ago
|
||
All good now, thanks! Merged in https://github.com/mozilla/mozregression/commit/eff6817cc35f76cb46fc7810a9e714eed439275d.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•