Page MenuHomeWildfire Games

Don't mix locally installed python libs when building

Authored by baco on Aug 28 2022, 6:56 PM.



When building the project, specifically when building SpiderMonkey bundle, the python script doesn't correctly isolates the virtualenvironment and read dependencies installed outside it (for instance the User site packages). Having the wrong version of the dependencies on those other locations can end up in SpiderMonkey crashing at build.

The documentation for the environtment variable PYTHONNOUSERSITE can be found here: Basically, setting the env var to a non-empty value makes Python to avoid using packages installed within the user-site packages, having to rely on the packages installed within the system-site packages, or the ones installed within the virtual environment.

Setting things this way, avoids conflicts with python dependencies installed by the users in their home directories, and makes the installation script to download the correct versions of it's dependencies.

Test Plan
  • Install setuptools locally (python3 -mpip install --user setuptools)
  • Build SpiderMonkey

When the patch is not applied python within the virtual environment finds packages installed in the user-site packages path. If the version there doesn't match with the versions needed within the virtualenv (the latest version of setuptools is enough) the building of SpiderMonkey crashes.

Diff Detail

rP 0 A.D. Public Repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

baco created this revision.Aug 28 2022, 6:56 PM
Owners added a subscriber: Restricted Owners Package.Aug 28 2022, 6:56 PM
baco requested review of this revision.Aug 28 2022, 6:56 PM
baco edited the summary of this revision. (Show Details)Aug 28 2022, 7:22 PM
baco edited the test plan for this revision. (Show Details)
This revision was not accepted when it landed; it landed in state Needs Review.Sep 1 2022, 10:49 PM
This revision was automatically updated to reflect the committed changes.
Owners added a subscriber: Restricted Owners Package.Sep 1 2022, 10:49 PM