aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstefan@epy <stefan@epy>2012-11-05 01:35:25 +0100
committerstefan@epy <stefan@epy>2012-11-05 01:35:25 +0100
commit19a723890b724f92b8c42b162cea2a4052a746f2 (patch)
tree2c97d493fa9279f88160aa288488b82a1ccbfc94
parent739d56cdb4f18829de123379488a78cf52e0a6d1 (diff)
downloadexternal_python_setuptools-19a723890b724f92b8c42b162cea2a4052a746f2.tar.gz
external_python_setuptools-19a723890b724f92b8c42b162cea2a4052a746f2.tar.bz2
external_python_setuptools-19a723890b724f92b8c42b162cea2a4052a746f2.zip
Warn if filenames cannot be added to the filelist.
--HG-- branch : distribute extra : rebase_source : 9fdc3c28b097e191db384cd81319c7a4edccf52b
-rwxr-xr-xsetuptools/command/egg_info.py10
-rw-r--r--setuptools/tests/test_sdist.py2
2 files changed, 10 insertions, 2 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py
index 6e3d67af..cf6ef63c 100755
--- a/setuptools/command/egg_info.py
+++ b/setuptools/command/egg_info.py
@@ -281,8 +281,14 @@ class FileList(_FileList):
if item.endswith('\r'): # Fix older sdists built on Windows
item = item[:-1]
path = convert_path(item)
- if os.path.exists(path):
- self.files.append(path)
+ try:
+ if os.path.exists(path):
+ self.files.append(path)
+ else:
+ log.warn("%r not found -- skipping", path)
+ except UnicodeEncodeError:
+ log.warn("%r not %s encodable -- skipping", path,
+ sys.getfilesystemencoding())
diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py
index cb601d8c..a9d5d6e5 100644
--- a/setuptools/tests/test_sdist.py
+++ b/setuptools/tests/test_sdist.py
@@ -262,6 +262,7 @@ class TestSdistTest(unittest.TestCase):
open(filename, 'w').close()
# Re-read manifest
+ cmd.filelist.files = []
quiet()
try:
cmd.read_manifest()
@@ -301,6 +302,7 @@ class TestSdistTest(unittest.TestCase):
open(filename, 'w').close()
# Re-read manifest
+ cmd.filelist.files = []
quiet()
try:
try: