aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command
diff options
context:
space:
mode:
authorStefan H. Holek <stefan@epy.co.at>2012-11-10 17:22:59 +0100
committerStefan H. Holek <stefan@epy.co.at>2012-11-10 17:22:59 +0100
commitb7c5bd34a32f20e54100fd88ede20c136571b1cf (patch)
treeda58c0fed31944d176c90c262501a268b9362245 /setuptools/command
parent98c3a5e71e558a80dafce9b5bb7baf8da9da7ec6 (diff)
downloadexternal_python_setuptools-b7c5bd34a32f20e54100fd88ede20c136571b1cf.tar.gz
external_python_setuptools-b7c5bd34a32f20e54100fd88ede20c136571b1cf.tar.bz2
external_python_setuptools-b7c5bd34a32f20e54100fd88ede20c136571b1cf.zip
Windows can store UTF-8 bytes as is.
--HG-- branch : distribute extra : rebase_source : 99e089901a7dac003a53d53e85b0c08480c86e27
Diffstat (limited to 'setuptools/command')
-rwxr-xr-xsetuptools/command/egg_info.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py
index 8b29e672..9695627b 100755
--- a/setuptools/command/egg_info.py
+++ b/setuptools/command/egg_info.py
@@ -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())
-