Closed Bug 1590745 Opened 4 months ago Closed 2 months ago

[mozbuild] Make the $PYTHON3 build var use a venv instead of a raw python binary

Categories

(Firefox Build System :: General, task)

task
Not set

Tracking

(firefox73 fixed)

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: mars, Assigned: mars)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

To port the build process and all of it's related scripts to Python 3 the $PYTHON3 build var should point to a Python binary inside a virtualenv just like the $PYTHON build var does.

Once this is done build tasks that rely on libraries installed in the Python virtualenv can be switched to Python 3 by configuring them to use $PYTHON3 in instead of $PYTHON.

See virtualenv_python() in build/moz.configure/init.configure for how the $PYTHON build var and its virtualenv are created.

See python3() in build/moz.configure/init.configure for how the $PYTHON3 build var is set. It points to the raw python binary and carries no virtualenv with it.

Status: NEW → ASSIGNED

Make the $PYTHON3 build var point to a full virtualenv bootstrapped with
the same libraries as the $PYTHON Python 2 build var. This allows us to
upgrade build tasks from $PYTHON to $PYTHON3.

The new virtualenv is given a name unique to the build process and
unique to the Python version so future upgrades of the build process
interpreter are decoupled from upgrades to the Python used to run mach.

This patch also adds some debug logging and documentation to the Python
2 virtualenv so that it is easier to diagnose issues that may arise
from running two different Python interpreters in re-entrant
multiprocess routines.

Attachment #9104656 - Attachment description: Bug 1590745 - Make the $PYTHON3 build var use a virtualenv → Bug 1590745 - Make the $PYTHON3 build var use a virtualenv r?mshal
Pushed by mfogels@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3034ec8681ac
Make the $PYTHON3 build var use a virtualenv r=mshal
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
Blocks: 1599648
Regressions: 1599744
Regressions: 1600720
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: mozilla72 → ---

Landing this is blocked until we fix bug 1464038.

Depends on: 1464038
Pushed by mfogels@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a439caeaa0e1
Make the $PYTHON3 build var use a virtualenv r=mshal
Status: REOPENED → RESOLVED
Closed: 3 months ago2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
You need to log in before you can comment on or make changes to this bug.