summaryrefslogtreecommitdiff
path: root/setuptools/command/easy_install.py
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2006-05-30 17:58:47 +0000
committerPJ Eby <distutils-sig@python.org>2006-05-30 17:58:47 +0000
commitc7c35ee8e1bb2eb9076d64ec1b40c37314cfe1ae (patch)
treee5bff4075f506599bc2f1a19835dc595e70c6a8b /setuptools/command/easy_install.py
parent893a3b57681828194d116ab26d2388bd065ceba2 (diff)
downloadpython-setuptools-git-c7c35ee8e1bb2eb9076d64ec1b40c37314cfe1ae.tar.gz
Construct ``.pth`` file paths in such a way that installing an egg whose
name begins with ``import`` doesn't cause a syntax error. --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4046564
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-xsetuptools/command/easy_install.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index d6c02b9e..1bbe7b5c 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -1355,7 +1355,7 @@ class PthDistributions(Environment):
"""Write changed .pth file back to disk"""
if not self.dirty:
return
-
+
data = '\n'.join(map(self.make_relative,self.paths))
if data:
log.debug("Saving %s", self.filename)
@@ -1394,7 +1394,7 @@ class PthDistributions(Environment):
def make_relative(self,path):
if normalize_path(os.path.dirname(path))==self.basedir:
- return os.path.basename(path)
+ return os.path.join(os.curdir, os.path.basename(path))
return path
@@ -1432,7 +1432,7 @@ def uncache_zipdir(path):
del zdc[p]
return
-
+
def get_script_args(dist, executable=sys_executable):
"""Yield write_script() argument tuples for a distribution's entrypoints"""
spec = str(dist.as_requirement())