diff options
| author | Stefan H. Holek <stefan@epy.co.at> | 2012-11-10 17:22:59 +0100 |
|---|---|---|
| committer | Stefan H. Holek <stefan@epy.co.at> | 2012-11-10 17:22:59 +0100 |
| commit | 546b04d99cded7410baa2c59427620b3bc2fb450 (patch) | |
| tree | e180f52f8e120b412e298c44e8c386f7710af4ce /setuptools/command | |
| parent | 317e325aff42024066e158207697238850285263 (diff) | |
| download | python-setuptools-bitbucket-546b04d99cded7410baa2c59427620b3bc2fb450.tar.gz | |
Windows can store UTF-8 bytes as is.
Diffstat (limited to 'setuptools/command')
| -rwxr-xr-x | setuptools/command/egg_info.py | 18 |
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()) - |
