summaryrefslogtreecommitdiff
path: root/pkg_resources.py
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2005-06-12 21:47:34 +0000
committerPJ Eby <distutils-sig@python.org>2005-06-12 21:47:34 +0000
commit26a5ebfbad61a20d1011dd14585f86bde34211bb (patch)
tree55e3f2f04d74ebfc0cd187be3035f74eb7b1618c /pkg_resources.py
parent5bf51fa29ddefee5ff82a52b9c14420f70401779 (diff)
downloadpython-setuptools-git-26a5ebfbad61a20d1011dd14585f86bde34211bb.tar.gz
Add 'ez_setup' bootstrap installer. Prep for 0.4a2 release.
--HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041054
Diffstat (limited to 'pkg_resources.py')
-rw-r--r--pkg_resources.py43
1 files changed, 42 insertions, 1 deletions
diff --git a/pkg_resources.py b/pkg_resources.py
index c9270325..e3d106ca 100644
--- a/pkg_resources.py
+++ b/pkg_resources.py
@@ -1307,7 +1307,7 @@ class Distribution(object):
)
version = property(version)
-
+
#@property
@@ -1351,6 +1351,47 @@ class Distribution(object):
fixup_namespace_packages(self.path)
map(declare_namespace, self._get_metadata('namespace_packages.txt'))
+ def egg_name(self):
+ """Return what this distribution's standard .egg filename should be"""
+ filename = "%s-%s-py%s" % (
+ self.name.replace('-','_'), self.version.replace('-','_'),
+ self.py_version or PY_MAJOR
+ )
+
+ if self.platform:
+ filename += '-'+self.platform
+
+ return filename
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
def parse_requirements(strs):
"""Yield ``Requirement`` objects for each specification in `strs`