summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>2010-02-11 14:47:04 +0100
committerRonny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>2010-02-11 14:47:04 +0100
commitdcd1dd3857242fe3463d68cb19abfe431f520f92 (patch)
tree7a48f8842ac865d9b39c5cf25127aba68125bfd6
parent5c528f51ae4ce4dd5359c350af9f0b3cacee36ba (diff)
downloadpython-setuptools-git-dcd1dd3857242fe3463d68cb19abfe431f520f92.tar.gz
fix develop --user for having '.' in PYTHON_PATH
the pth file update wouldn't work if the distribution location is in the side dirs so we special-case for the location being the cwd --HG-- branch : distribute extra : rebase_source : 4c80082825c25f7f4692fcdd3580da5d1948ef89
-rwxr-xr-xsetuptools/command/easy_install.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 421d0c09..4b42a537 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -1420,8 +1420,12 @@ class PthDistributions(Environment):
def add(self,dist):
"""Add `dist` to the distribution map"""
- if dist.location not in self.paths and dist.location not in self.sitedirs:
- self.paths.append(dist.location); self.dirty = True
+ if (dist.location not in self.paths and (
+ dist.location not in self.sitedirs or
+ dist.location == os.getcwd() #account for '.' being in PYTHONPATH
+ )):
+ self.paths.append(dist.location)
+ self.dirty = True
Environment.add(self,dist)
def remove(self,dist):