Éric Araujo <mer...@netwok.org> added the comment:

> - test_glob_to_re() was doing two levels of escaping (r'\' -> r'\\\\')
>   for its expected output when it should only do one (r'\' -> r'\\').
Fix merged.  I don’t fully understand why one place needs two escapes and the 
others just one.

> - test_process_template() was not converting some of its expected
>   results to use the native directory separator.
Overlooked paths fixed.

> I also took the liberty of changing the checks for whether the separator 
> needs to be escaped
> - it's better to escape everything except "/", just in case someone decides 
> to port Python to
> some platform using a weird directory separator that is neither "/" nor r"\".
I didn’t take that part.  If someone wants to port Python with a new style of 
os.sep or os.extsep, I’ll deal with it when they report that.

The buildout.cfg and VCS dirs issues are covered by unit tests for both 
filelist and sdist, but thanks for testing manually with a real setup.py too.  
The third problem you mention (inclusion of unwanted module in a subdir) is 
also covered by test_filelist.

On a related subject, the code in sdist that excludes VCS dirs uses r'/|\\'; I 
thought that os.altsep was an alternate *accepted* separator, but not actually 
produced by OS calls.  IOW, I’m asking if os.walk (used to create 
filelist.allfiles) can ever give paths with '/' on Windows.  If not, then the 
regex is redundant, and I can clean it in packaging.  My patch removes the 
redundancy, just for curiosity, but I won’t actually commit that part to 
distutils.

----------
Added file: http://bugs.python.org/file24633/filelist-regex-bugs-v3.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6884>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to