Closed Bug 1703055 Opened 7 months ago Closed 6 months ago

Remove user/system site-packages from import path when running nativecmds

Categories

(Firefox Build System :: Mach Core, enhancement, P2)

enhancement

Tracking

(firefox90 fixed)

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: mhentges, Assigned: mhentges)

References

(Regressed 1 open bug)

Details

Attachments

(1 file)

Including user/system site-packages allows failures when incompatible packages with the wrong versions are on the import path, such as for bug 1702377.

This only affects mach nativecmds, because regular mach commands only have access to their associated virtualenv.

See Also: → 1702377
Priority: -- → P2

To avoid erroneously importing a package from the system, we remove
system site package.
This is another positive step towards further insulating the Firefox
build from the state of the environment.

This may cause failures if some mach commands have been sneakily
importing system packages instead of properly vendoring them.

Assignee: nobody → mhentges
Status: NEW → ASSIGNED
Attachment #9213635 - Attachment description: Bug 1703055: Don't include global site packages in python path → WIP: Bug 1703055: Don't include global site packages in python path
Attachment #9213635 - Attachment description: WIP: Bug 1703055: Don't include global site packages in python path → Bug 1703055: Don't include global site packages in python path
Pushed by mhentges@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/189b85571855
Don't include global site packages in python path r=firefox-build-system-reviewers,glandium,sheehan
Regressions: 1704838
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
Status: RESOLVED → REOPENED
Flags: needinfo?(mhentges)
Resolution: FIXED → ---
Target Milestone: 89 Branch → ---

Patch to resolve this is ready in Phabricator.
I'll land this again after the code freeze.

Flags: needinfo?(mhentges)
Pushed by mhentges@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d4d3ba582763
Don't include global site packages in python path r=firefox-build-system-reviewers,glandium,sheehan
Status: REOPENED → RESOLVED
Closed: 6 months ago6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
Regressions: 1717884
You need to log in before you can comment on or make changes to this bug.