Commits

Mark Hammond committed bb81eda

work around FileList() bugfix in Python 2.7+, thanks to clues from Tim Golden

Comments (0)

Files changed (1)

         if file.find("*") >= 0:
             flist = FileList()
             flist.findall(os.path.dirname(file))
-            flist.include_pattern(os.path.basename(file))
+            flist.include_pattern(os.path.basename(file), anchor=0)
             # We never want CVS
-            flist.exclude_pattern(re.compile(".*\\\\CVS\\\\"), is_regex=1)
-            flist.exclude_pattern("*.pyc")
-            flist.exclude_pattern("*.pyo")
+            flist.exclude_pattern(re.compile(".*\\\\CVS\\\\"), is_regex=1, anchor=0)
+            flist.exclude_pattern("*.pyc", anchor=0)
+            flist.exclude_pattern("*.pyo", anchor=0)
             # files with a leading dot upset bdist_msi, and '.*' doesn't
             # work - it matches from the start of the string and we have
             # dir names.  So any '\.' gets the boot.
-            flist.exclude_pattern(re.compile(".*\\\\\."), is_regex=1)
+            flist.exclude_pattern(re.compile(".*\\\\\."), is_regex=1, anchor=0)
             if not flist.files:
                 raise RuntimeError("No files match '%s'" % file)
             files_use = flist.files