[PATCH] import-checker: exclude dist-packages tree from stdlib as well

Yuya Nishihara yuya at tcha.org
Fri Jul 3 10:24:07 CDT 2015


On Fri, 3 Jul 2015 11:00:50 -0400, Augie Fackler wrote:
> > On Jul 3, 2015, at 9:48 AM, Yuya Nishihara <yuya at tcha.org> wrote:
> > # HG changeset patch
> > # User Yuya Nishihara <yuya at tcha.org>
> > # Date 1435929436 -32400
> > #      Fri Jul 03 22:17:16 2015 +0900
> > # Node ID 506956b94ca90eec47dfd7d9746e129bc3ccf884
> > # Parent  d3d2ba265e17af1d9700e3e99de4d012b1b31ab8
> > import-checker: exclude dist-packages tree from stdlib as well
> > 
> > On Debian, packaged modules are installed into dist-packages, not to
> > site-packages. Because of this, if we have mercurial installed, the test
> > failed as 'mercurial.node' was listed in stdlib_modules:
> 
> Hmm. I think this means that the import-checker is running with too many
> things on its sys.path - does that make sense to you?

import-checker.py does list too much packages with the system Python:

  print len(stdlib_modules)

  % /usr/bin/python contrib/import-checker.py
  8841
  % /home/yuya/opt/python-2.7.8/bin/python contrib/import-checker.py
  1491

> I’m not sure what we should do about it, but it definitely seems a bit
> undesirable to pick things up from diet-packages when we’re trying to
> analyze a working tree. Thoughts?

I have no idea about the clean way to list only the standard modules, but I
think this patch is the easiest fix for the buildbot failure, running on Ubuntu.

http://hgbuildbot.kublai.com/builders/hg%20tests/builds/592/steps/run-tests.py%20%28python2.7%29/logs/stdio


More information about the Mercurial-devel mailing list