Closed
Bug 920781
Opened 13 years ago
Closed 13 years ago
Mach should use the python that called it when calling other things
Categories
(Firefox Build System :: General, defect)
Firefox Build System
General
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla27
People
(Reporter: mossop, Assigned: gps)
Details
Attachments
(1 file, 1 obsolete file)
|
2.22 KB,
patch
|
glandium
:
review+
|
Details | Diff | Splinter Review |
0:00.33 C:/mozilla-build/msys/bin/sh.exe -c c:/mozilla/source/trunk/build/pymake/make.py
-j4 -s install-tests
0:01.42 /usr/bin/sh: c:/Users/Dave: No such file or directory
0:01.42 c:\mozilla\build\nightly\Makefile:68:0: command 'MOZBUILD_BACKEND_CHECKED= c:/Users/Dave Townsend/python/Scripts/python.exe c:/mozilla/source/trunk/build/pymake/pymake/../make.py -C js/src backend.RecursiveMakeBackend.built' failed, return code 127
0:01.42 <install-tests>: Found error
Here mach has decided to use the python in the PATH to run pymake and fails because it can't handle spaces in the path. The python I used to run mach here was the one from mozilla-build and doesn't have spaces in the path. It should just use that one.
| Assignee | ||
Comment 1•13 years ago
|
||
Yeah, this is a real bug. base.py's run_make() will invoke make.py as a command. It's shebang is "#!/usr/bin/env python", which is not ideal.
Component: mach → Build Config
| Assignee | ||
Comment 2•13 years ago
|
||
Will need to test this before landing.
Attachment #810174 -
Flags: review?(mh+mozilla)
| Assignee | ||
Updated•13 years ago
|
Assignee: nobody → gps
| Assignee | ||
Comment 3•13 years ago
|
||
Comment on attachment 810174 [details] [diff] [review]
Invoke pymake with virtualenv or calling python, not $PATH python
Please report how this works.
Attachment #810174 -
Flags: feedback?(dtownsend+bugmail)
Comment 4•13 years ago
|
||
Comment on attachment 810174 [details] [diff] [review]
Invoke pymake with virtualenv or calling python, not $PATH python
Review of attachment 810174 [details] [diff] [review]:
-----------------------------------------------------------------
::: python/mozbuild/mozbuild/base.py
@@ +464,5 @@
> + ve_python = self.virtualenv_manager.python_path
> + if os.path.exists(ve_python):
> + return [ve_python, make_py]
> + else:
> + return [sys.executable, make_py]
That doesn't look like a great thing to do. Because if that runs before configure (in case of a clobber build), it's going to use system python for the entire build. Further builds will use the virtualenv one. The discrepancy is going to hurt.
Attachment #810174 -
Flags: review?(mh+mozilla) → review-
| Assignee | ||
Comment 5•13 years ago
|
||
So, the only way we can reliably use the virtualenv python is if the virtualenv python is guaranteed to exist. And that means moving virtualenv population out of configure and into client.mk or mach. That's something I've been wanting to do, but that's not something I'd like to block this bug.
Will you accept a patch that always uses sys.executable?
Comment 6•13 years ago
|
||
(In reply to Gregory Szorc [:gps] from comment #5)
> Will you accept a patch that always uses sys.executable?
yes
| Assignee | ||
Comment 7•13 years ago
|
||
I removed the virtualenv from the equation.
Attachment #810291 -
Flags: review?(mh+mozilla)
| Assignee | ||
Updated•13 years ago
|
Attachment #810174 -
Attachment is obsolete: true
Attachment #810174 -
Flags: feedback?(dtownsend+bugmail)
Comment 8•13 years ago
|
||
Comment on attachment 810291 [details] [diff] [review]
Invoke pymake with virtualenv or calling python, not $PATH python
Review of attachment 810291 [details] [diff] [review]:
-----------------------------------------------------------------
Don't forget to adjust the commit message.
Attachment #810291 -
Flags: review?(mh+mozilla) → review+
| Assignee | ||
Comment 9•13 years ago
|
||
Status: NEW → ASSIGNED
Flags: in-testsuite-
Comment 10•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Updated•8 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•