diff -r 6d278f426417 Lib/distutils/command/sdist.py --- a/Lib/distutils/command/sdist.py Fri Jul 05 18:05:29 2013 -1000 +++ b/Lib/distutils/command/sdist.py Sat Jul 06 14:21:31 2013 +0200 @@ -227,7 +227,7 @@ alts = fn got_it = False for fn in alts: - if os.path.exists(fn): + if os.path.exists(fn) or os.path.islink(fn): got_it = True self.filelist.append(fn) break @@ -236,7 +236,7 @@ self.warn("standard file not found: should have one of " + ', '.join(alts)) else: - if os.path.exists(fn): + if os.path.exists(fn) or os.path.islink(fn): self.filelist.append(fn) else: self.warn("standard file '%s' not found" % fn) diff -r 6d278f426417 Lib/distutils/filelist.py --- a/Lib/distutils/filelist.py Fri Jul 05 18:05:29 2013 -1000 +++ b/Lib/distutils/filelist.py Sat Jul 06 14:21:31 2013 +0200 @@ -264,12 +264,12 @@ fullname = name # Avoid excess stat calls -- just one will do, thank you! - stat = os.stat(fullname) + stat = os.lstat(fullname) mode = stat[ST_MODE] - if S_ISREG(mode): + if S_ISDIR(mode) and not S_ISLNK(mode): + push(fullname) + elif S_ISREG(mode) or S_ISLNK(mode): list.append(fullname) - elif S_ISDIR(mode) and not S_ISLNK(mode): - push(fullname) return list