Catapult Presubmit seems to be having PYTHONPATH sadness |
||||
Issue descriptionThis is very likely related to pruning sys.path out of PYTHONPATH ( issue 825290 ). https://build.chromium.org/p/tryserver.client.catapult/builders/Catapult%20Presubmit/ The remedy is likely to add additional `extra_paths_list` entries to the various PRESUBMIT.py files.
,
Mar 28 2018
Poked at this a bit (https://chromium-review.googlesource.com/c/catapult/+/984721), and it looks like: * There are lots of existing errors in the PRESUBMITs for this repo ( :'C ) * VirtualENV screws with distutils in a way that the current pylint doesn't know how to deal with (meaning that under vpython, pylint thinks that distutils is ~empty). The first one I think will take someone more familiar with catapult to fully fix (possibly taking inspiration from the CL I uploaded). The second one will take some additional work. There are a couple ways to fix the second problem. The first way would be to screw (more?) with distutils when installed via vpython. Instead of using virtualenv's... "creative" patch to distutils/__init__ (https://pastebin.com/ecF8Kuzj), vpython would actually copy the underlying system's distutils python bits into the virtualenv. Currently vpython adds a distutils/__init__.py which adjusts its __path__ value so that the sub-modules in distutils get chain-loaded when doing an import. Pylint (at least the version in depot_tools) has no idea how to follow this, and so it just assumes that distutils has no files in it (*facepalm*). The other way to fix the problem (assuming newer pylints know how to deal with this, which I haven't verified) is to upgrade pylint in depot_tools. This may have further-reaching implications, and we may want to make such an upgrade contingent on the resolution of issue 825426.
,
Mar 28 2018
Cross-filed this at https://github.com/catapult-project/catapult/issues/4365
,
Mar 28 2018
+dtu in case he's more familiar with this.
,
Nov 12
|
||||
►
Sign in to add a comment |
||||
Comment 1 by iannucci@chromium.org
, Mar 28 2018