Commit b7c5bd34 authored by Stefan H. Holek's avatar Stefan H. Holek

Windows can store UTF-8 bytes as is.

--HG--
branch : distribute
extra : rebase_source : 99e089901a7dac003a53d53e85b0c08480c86e27
parent 98c3a5e7
......@@ -281,15 +281,19 @@ class FileList(_FileList):
if item.endswith('\r'): # Fix older sdists built on Windows
item = item[:-1]
path = convert_path(item)
try:
if sys.version_info >= (3,):
try:
if os.path.exists(path):
self.files.append(path)
elif sys.platform == 'win32':
if os.path.exists(path.encode('utf-8')):
self.files.append(path)
except UnicodeEncodeError:
log.warn("%r not %s encodable -- skipping", path,
sys.getfilesystemencoding())
else:
if os.path.exists(path):
self.files.append(path)
elif path != manifest_maker.template:
log.debug("%r not found -- skipping", path)
except UnicodeEncodeError:
log.warn("%r not %s encodable -- skipping", path,
sys.getfilesystemencoding())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment