]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
setup: fix bin/tahoe to include .egg's from the source tree root dir as well
authorZooko O'Whielacronx <zooko@zooko.com>
Tue, 1 Jan 2008 08:51:28 +0000 (01:51 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Tue, 1 Jan 2008 08:51:28 +0000 (01:51 -0700)
This is necessary, as we can't prevent setuptools from respecting any such eggs, therefore we need to respect them in order to maintain consistency.  However, we don't normally install any "install_requires" eggs into the source tree root dir.

bin/tahoe
misc/find-dep-eggs.py

index e18c8a81f60c3f0e047ac34ebd7b9b50cca933ef..20f4879942b483617be9e705552cb73701d1bf3d 100644 (file)
--- a/bin/tahoe
+++ b/bin/tahoe
@@ -30,6 +30,13 @@ if len(where) >= 2 and where[-2] == "bin":
                 if fn.endswith(".egg"):
                     support_eggs.append(os.path.join(supportdir, fn))
 
+        # We also need to include .egg's in the base dir, because if there is an
+        # .egg there then "make build-deps" will take that as satisfying its
+        # requirements.
+        for fn in os.listdir(base):
+            if fn.endswith(".egg"):
+                support_eggs.append(os.path.abspath(os.path.join(base, fn)))
+
         sys.path.extend(support_eggs)
 
         # also update PYTHONPATH so that child processes (like twistd) will
index f0caf56782733afd07cb897d22f00591392c8ca1..97bfc3d8bf45abb57906a4eb038e9ec011e25944 100644 (file)
@@ -14,10 +14,4 @@ if os.path.exists(support_lib):
         if fn.endswith(".egg"):
             path.append(os.path.abspath(os.path.join(support_lib, fn)))
 
-# We also need to include .egg's in the CWD, because those are placed there by
-# libraries that we've installed if *they* require them.
-for fn in os.listdir("."):
-    if fn.endswith(".egg"):
-        path.append(os.path.abspath(os.path.join(os.getcwd(), fn)))
-
 print os.pathsep.join(path)