Author: dmeyer
Date: Fri Feb 16 14:52:25 2007
New Revision: 9219

Modified:
   trunk/setup.py

Log:
try to find python path

Modified: trunk/setup.py
==============================================================================
--- trunk/setup.py      (original)
+++ trunk/setup.py      Fri Feb 16 14:52:25 2007
@@ -43,6 +43,19 @@
         distutils.core.setup(name="freevo", version="2.0")
         sys.exit(0)
 
+# try to be clever and add the install prefix to the path
+# to be sure kaa.base and freevo.core can be found
+for pos, arg in enumerate(sys.argv[1:]):
+    if arg.startswith('--prefix='):
+        prefix=arg[9:]
+    elif arg.startswith('--prefix') and pos + 2 < len(sys.argv):
+        prefix=sys.argv[pos+2]
+    else:
+        continue
+    libdir = 'lib/python%s.%s/site-packages' % sys.version_info[:2]
+    sys.path.insert(0, os.path.join(prefix, libdir))
+
+
 # Adding base/build/lib to the python path so that all freevo modules
 # can find the distribution file of freevo.core
 # sys.path.insert(0, '../base/build/lib')

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to