Closed Bug 1671424 Opened 4 years ago Closed 4 years ago

Set the `PYTHON3` environment variable where appropriate for the build

Categories

(Firefox Build System :: General, defect)

defect

Tracking

(firefox84 fixed)

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: rstewart, Assigned: glandium)

References

Details

Attachments

(1 file, 1 obsolete file)

No description provided.

This is necessary because at various points we cross over between Python and shell scripts (because the migration in bug 1247781 isn't complete yet). The shell scripts generally use the PYTHON3 environment variable to determine which Python to use. In the absence of this environment variable, it will generally use the Python at the head of the PATH, which is usually the incorrect behavior.

Assignee: nobody → rstewart
Status: NEW → ASSIGNED

mach configure currently runs the equivalent to make -f client.mk.
This is history, and essentially does the following:

  • Create configure and js/src/configure from configure.in and
    js/src/configure.in respectively.
  • Create the objdir.
  • Run configure from the objdir.

The configure script is, nowadays, only really used as a means to set
OLD_CONFIGURE (and also for people who want to run configure,
literally, as in the configure; make workflow). mach configure
actually doesn't need it. Neither does recursing into js/src require
js/src/configure, since bug 1520340 (and now as of bug 1669633, we
don't even recurse).

Because configure.py can actually derive OLD_CONFIGURE on its own
(except for js/src/configure, but mach configure doesn't run that),
we don't really need configure for mach configure.

So all in all, we're at a point in history where it's straightforward to
just initiate configure.py from mach configure, so we just do that.

And in the hypothetical case where the mach configure code is somehow
running in python2, we get the mach virtualenv python3 and use it to
execute configure.py.

Assignee: rstewart → mh+mozilla
Attachment #9181799 - Attachment is obsolete: true
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/e34634758f51 Move configure execution from client.mk to `mach configure`. r=firefox-build-system-reviewers,rstewart
Flags: needinfo?(mh+mozilla)
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/8af2e5440a95 Move configure execution from client.mk to `mach configure`. r=firefox-build-system-reviewers,rstewart
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
Regressions: 1677797
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: