diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2013-06-18 14:08:20 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2013-06-18 14:08:20 -0500 |
commit | a85aa143f971ebfbb31ccaf58cb82a311f9315c6 (patch) | |
tree | eeae1529ae15884aca3301fefae768fc2e531a18 /setuptools/command/sdist.py | |
parent | 94fc39cb62df19e85b07658f2fa5d0b4a7bf9303 (diff) | |
parent | 641eac6550896506fa939205f249bcfb8f057d57 (diff) | |
download | external_python_setuptools-a85aa143f971ebfbb31ccaf58cb82a311f9315c6.tar.gz external_python_setuptools-a85aa143f971ebfbb31ccaf58cb82a311f9315c6.tar.bz2 external_python_setuptools-a85aa143f971ebfbb31ccaf58cb82a311f9315c6.zip |
Merge Vinay Sajip's unified Python 2/3 support from distribute 3
--HG--
branch : distribute
Diffstat (limited to 'setuptools/command/sdist.py')
-rwxr-xr-x | setuptools/command/sdist.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 56ef8a66..6f3f48c8 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -282,8 +282,13 @@ class sdist(_sdist): log.info("reading manifest file '%s'", self.manifest) manifest = open(self.manifest, 'rbU') for line in manifest: + # The manifest must contain UTF-8. See #303. if sys.version_info >= (3,): - line = line.decode('UTF-8') + try: + line = line.decode('UTF-8') + except UnicodeDecodeError: + log.warn("%r not UTF-8 decodable -- skipping" % line) + continue # ignore comments and blank lines line = line.strip() if line.startswith('#') or not line: |