diff options
Diffstat (limited to 'setuptools')
-rwxr-xr-x | setuptools/command/egg_info.py | 3 | ||||
-rwxr-xr-x | setuptools/command/sdist.py | 20 |
2 files changed, 11 insertions, 12 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index ec09209a..b73d42ee 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -7,7 +7,7 @@ import os, re from setuptools import Command from distutils.errors import * from distutils import log -from distutils.command.sdist import sdist +from setuptools.command.sdist import sdist from distutils import file_util from distutils.util import convert_path from distutils.filelist import FileList @@ -203,7 +203,6 @@ class FileList(FileList): - class manifest_maker(sdist): template = "MANIFEST.in" diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 41798b60..9a0ea032 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -1,6 +1,6 @@ from distutils.command.sdist import sdist as _sdist from distutils.util import convert_path -import os,re +import os, re, sys entities = [ ("<","<"), (">", ">"), (""", '"'), ("'", "'"), @@ -152,13 +152,13 @@ class sdist(_sdist): if data not in dist_files: dist_files.append(data) - - - - - - - - - + def read_template(self): + try: + _sdist.read_template(self) + except: + # grody hack to close the template file (MANIFEST.in) + # this prevents easy_install's attempt at deleting the file from + # dying and thus masking the real error + sys.exc_info()[2].tb_next.tb_frame.f_locals['template'].close() + raise |