New submission from Nadeem Vawda <[email protected]>:
As I understand it, a MANIFEST.in directive:
recursive-include foo bar.*
is meant to match files under foo for with names beginning with "bar.".
However, the actual regex that is generated for this line is:
r'^foo/.*bar\.[^/]*\Z(?ms)'
which matches any filename under foo that contains "bar." anywhere in the
base filename. For example, if foo contains files bar.py and test_bar.py,
then the pattern will match both filenames. Is this the intended
behaviour? I would have expected it to only match bar.py.
If the desired behavior is what I expected (and not how it currently
works), then the desired regex is:
r'^foo/(.*/)?bar\.[^/]*\Z(?ms)'
The attached patch (against 2.7) implements this change. It is dependent
on the fix for issue 6884. I have tested it on both Linux and Windows.
----------
files: recursive-include.diff
keywords: patch
messages: 154137
nosy: eric.araujo, nadeem.vawda, tarek
priority: normal
severity: normal
stage: needs patch
status: open
title: Distutils manifest: recursive-(include|exclude) matches suffix instead
of full filename
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file24628/recursive-include.diff
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue14106>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com