pymake native commands can't easily use e.g. mozbuild modules

RESOLVED FIXED in mozilla27

Status

defect
RESOLVED FIXED
6 years ago
2 years ago

People

(Reporter: glandium, Assigned: glandium)

Tracking

Trunk
mozilla27
x86_64
Linux

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

There are really two problems:
- As we essentially have two different top directories (/ and js/src), we can't easily give a path to e.g. mozbuild without some conditionals.
- With bug 784910, pymake can get modules in the same directory as the module used for the native command, but not from other directories in the PYCOMMANDPATH.

That prevents using commands that require modules from under python/ to be used as native commands, which is a bummer.
We either need to augment pymake to fully search through PYCOMMANDPATH when it receives an ImportError, or make it re-run itself with $(PYTHON) if it's not the python it's using. I actually kind of like the latter.
(In reply to Mike Hommey [:glandium] from comment #0)
> I actually kind of like the latter.

Meh, maybe not. It would require to only do it at MAKELEVEL=0, and unless client.mk is made to define PYTHON with the virtualenv one, it's not going to be possible.
These are things we can do easily with build wrappers like mach. We can easily change run_make() to invoke make.py with the virtualenv python. If we installed things in the virtualenv properly, we would rewrite the shebang of make.py to be the virtualenv's Python.
Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED
Comment on attachment 810376 [details] [diff] [review]
Use PYCOMMANDPATH paths as site packages in pymake, and set it to the virtualenv site packages instead of $(topsrcdir)/config

Review of attachment 810376 [details] [diff] [review]:
-----------------------------------------------------------------

Nice hack.
Attachment #810376 - Flags: review?(gps) → review+
https://hg.mozilla.org/mozilla-central/rev/0c459362695e
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.