]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/blob - misc/find-dep-eggs.py
f0caf56782733afd07cb897d22f00591392c8ca1
[tahoe-lafs/tahoe-lafs.git] / misc / find-dep-eggs.py
1 #! /usr/bin/python
2
3 import os.path, sys
4
5 path = []
6 if sys.platform == 'win32':
7     support_lib = "support/Lib/site-packages"
8 else:
9     pyver = "python%d.%d" % (sys.version_info[:2])
10     support_lib = "support/lib/%s/site-packages" % pyver
11
12 if os.path.exists(support_lib):
13     for fn in os.listdir(support_lib):
14         if fn.endswith(".egg"):
15             path.append(os.path.abspath(os.path.join(support_lib, fn)))
16
17 # We also need to include .egg's in the CWD, because those are placed there by
18 # libraries that we've installed if *they* require them.
19 for fn in os.listdir("."):
20     if fn.endswith(".egg"):
21         path.append(os.path.abspath(os.path.join(os.getcwd(), fn)))
22
23 print os.pathsep.join(path)