diff options
Diffstat (limited to 'setuptools/command')
-rwxr-xr-x | setuptools/command/easy_install.py | 2 | ||||
-rwxr-xr-x | setuptools/command/egg_info.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index c8ad0e50..513586d6 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -499,7 +499,7 @@ class easy_install(Command): # Anything else, try to extract and build setup_base = tmpdir - if os.path.isfile(dist_filename): + if os.path.isfile(dist_filename) and not dist_filename.endswith('.py'): unpack_archive(dist_filename, tmpdir, self.unpack_progress) elif os.path.isdir(dist_filename): setup_base = os.path.abspath(dist_filename) diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index e5f95d4f..ec09209a 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -12,7 +12,7 @@ from distutils import file_util from distutils.util import convert_path from distutils.filelist import FileList from pkg_resources import parse_requirements, safe_name, parse_version, \ - safe_version, yield_lines, EntryPoint, iter_entry_points + safe_version, yield_lines, EntryPoint, iter_entry_points, to_filename from sdist import walk_revctrl class egg_info(Command): @@ -58,7 +58,7 @@ class egg_info(Command): self.egg_base = (dirs or {}).get('',os.curdir) self.ensure_dirname('egg_base') - self.egg_info = self.egg_name.replace('-','_')+'.egg-info' + self.egg_info = to_filename(self.egg_name)+'.egg-info' if self.egg_base != os.curdir: self.egg_info = os.path.join(self.egg_base, self.egg_info) if '-' in self.egg_name: self.check_broken_egg_info() |