aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2006-01-10 04:00:54 +0000
committerPJ Eby <distutils-sig@python.org>2006-01-10 04:00:54 +0000
commitabed75c8f1a0b6a449b5411caf3d9581fabae3df (patch)
tree55e9d0739895972920b6992d3bf4b01f78229bc5 /setuptools/command
parent51d68aa576cd63dab44ed6f9578211a0e90def9a (diff)
downloadexternal_python_setuptools-abed75c8f1a0b6a449b5411caf3d9581fabae3df.tar.gz
external_python_setuptools-abed75c8f1a0b6a449b5411caf3d9581fabae3df.tar.bz2
external_python_setuptools-abed75c8f1a0b6a449b5411caf3d9581fabae3df.zip
EasyInstall can now download bare ``.py`` files and wrap them in an egg,
as long as you include an ``#egg=name-version`` suffix on the URL, or if the ``.py`` file is listed as the "Download URL" on the project's PyPI page. This allows third parties to "package" trivial Python modules just by linking to them (e.g. from within their own PyPI page or download links page). --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041995
Diffstat (limited to 'setuptools/command')
-rwxr-xr-xsetuptools/command/easy_install.py2
-rwxr-xr-xsetuptools/command/egg_info.py4
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()