homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nadeem.vawda
Recipients eric.araujo, jaraco, nadeem.vawda, tarek
Date 2012年02月14日.21:32:30
SpamBayes Score 7.7666984e-11
Marked as misclassified No
Message-id <1329255151.6.0.029053984933.issue14004@psf.upfronthosting.co.za>
In-reply-to
Content
I've been able to reproduce this on current builds of 2.7, 3.2 and 3.3.
The problem seems to be that distutils.filelist pathnames using the OS
directory separator, but the regexps used for matching paths are written
to always assume "/"-based paths.
I've been able to get the correct behaviour in this case by making the
module build paths using "/" regardless of the OS directory separator:
 --- a/Lib/distutils/filelist.py
 +++ b/Lib/distutils/filelist.py
 @@ -55,10 +55,10 @@
 def sort(self):
 # Not a strict lexical sort!
 - sortable_files = sorted(map(os.path.split, self.files))
 + sortable_files = sorted(f.split("/") for f in self.files)
 self.files = []
 for sort_tuple in sortable_files:
 - self.files.append(os.path.join(*sort_tuple))
 + self.files.append("/".join(sort_tuple))
 # -- Other miscellaneous utility methods ---------------------------
 @@ -258,7 +258,7 @@
 for name in names:
 if dir != os.curdir: # avoid the dreaded "./" syndrome
 - fullname = os.path.join(dir, name)
 + fullname = dir + "/" + name
 else:
 fullname = name
I'm not entirely comfortable with this fix, though - it seems like it
would be better to produce paths using the OS directory separator at the
end of the process. Maybe it's possible to add a translation step after
the file list is built and de-duplicated? I don't know much about how
the rest of distutils uses this module.
(Random aside: do we support any platforms that don't support "/" as a
directory separator (even if it isn't the preferred one)? Hmm...)
History
Date User Action Args
2012年02月14日 21:32:31nadeem.vawdasetrecipients: + nadeem.vawda, jaraco, tarek, eric.araujo
2012年02月14日 21:32:31nadeem.vawdasetmessageid: <1329255151.6.0.029053984933.issue14004@psf.upfronthosting.co.za>
2012年02月14日 21:32:31nadeem.vawdalinkissue14004 messages
2012年02月14日 21:32:30nadeem.vawdacreate

AltStyle によって変換されたページ (->オリジナル) /