equal
deleted
inserted
replaced
276 if os.path.abspath(libpath).startswith(sourceroot) or not any( |
276 if os.path.abspath(libpath).startswith(sourceroot) or not any( |
277 libpath.startswith(p) for p in stdlib_prefixes |
277 libpath.startswith(p) for p in stdlib_prefixes |
278 ): |
278 ): |
279 continue |
279 continue |
280 for top, dirs, files in os.walk(libpath): |
280 for top, dirs, files in os.walk(libpath): |
|
281 if 'dist-packages' in top.split(os.path.sep): |
|
282 continue |
281 for i, d in reversed(list(enumerate(dirs))): |
283 for i, d in reversed(list(enumerate(dirs))): |
282 if ( |
284 if ( |
283 not os.path.exists(os.path.join(top, d, '__init__.py')) |
285 not os.path.exists(os.path.join(top, d, '__init__.py')) |
284 or top == libpath |
286 or top == libpath |
285 and d in ('hgdemandimport', 'hgext', 'mercurial') |
287 and d in ('hgdemandimport', 'hgext', 'mercurial') |