[issue13193] test_packaging and test_distutils failures under Windows

Paul Moore report at bugs.python.org
Mon Oct 17 22:07:53 CEST 2011


Paul Moore <p.f.moore at gmail.com> added the comment:

First one - the problem is in packaging.manifest._translate_pattern, which uses os.path.join on regex parts. That won't work on Windows where os.sep is a backslash, as the backslash is a RE metacharacter.

Actually, the file list seems to only use '/' as a path separator, so you can just use

    pattern_re = "^" + prefix_re + '/' + ".*" + pattern_re

Whether this is right or not depends on whether the test is correctly supplying the expected file list as always /-separated. I don't know enough to be certain on that. An alternative would be to use '[/\\]' in the above, to catch both / and \ separators. Technically wrong, but robust enough to do for now if needed.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13193>
_______________________________________


More information about the Python-bugs-list mailing list