mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 06:35:42 +00:00
63c60857b5
The build system / mach currently has a very hacky virtualenv setup. Essentially, it resorts to sys.path munging instead of a proper, isolated environment. During initialization, mach installs python/psutil in sys.path. Later on, some code does an |import psutil|. This fails iff the psutil C extension can't be found. If there is a psutil C extension installed outside of mach and python/psutil, |import psutil| may load it. The version mismatch isn't detected until an extension-using psutil API is called. This has manifested inside |mach build| via the resource monitor as an |AttributeError: 'module' object has no attribute 'linux_sysinfo'| exception during psutil.virtual_memory(). The proper fix for this is for the Python environment to ensure the psutil C extension is built before attempting to import and use psutil. Arguably, psutil itself should perform some kind of version check when it imports the C extension to ensure things are in sync and fail at import time. Fixing mach and the build system Python environment to build psutil earlier/properly is a long outstanding bug. It needs to be addressed. But it is considerable effort. This patch continues the long history of wallpapering over psutil import/run failures because using a proper virutalenv from mach/build system is a lot of work. Sad panda. --HG-- extra : rebase_source : 5c449d69c0fd907ea8359ac721ef6287baa4f10e |
||
---|---|---|
.. | ||
docs | ||
manifestparser | ||
mozcrash | ||
mozdebug | ||
mozdevice | ||
mozfile | ||
mozhttpd | ||
mozinfo | ||
mozinstall | ||
mozlog | ||
moznetwork | ||
mozprocess | ||
mozprofile | ||
mozrunner | ||
mozsystemmonitor | ||
moztest | ||
mozversion | ||
Makefile.in | ||
moz.build | ||
packages.txt | ||
README.md | ||
setup_development.py | ||
test-manifest.ini | ||
test.py | ||
versioninfo.py |
Mozbase
Mozbase is a set of easy-to-use Python packages forming a supplemental standard library for Mozilla. It provides consistency and reduces redundancy in automation and other system-level software. All of Mozilla's test harnesses use mozbase to some degree, including Talos, mochitest, reftest, Autophone, and Eideticker.
Learn more about mozbase at the project page.
Read detailed docs online, or build them locally by running "make html" in the docs directory.