[gtk-mac-bundler: 1/3] Try all prefixes



commit 997e1af0bab5dde1dfdccc329bf2355712e092ed
Author: Andrea Curtoni <andrea curtoni nice-software com>
Date:   Wed Sep 12 15:09:00 2012 +0200

    Try all prefixes

 bundler/bundler.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/bundler/bundler.py b/bundler/bundler.py
index c8cc852..d53313a 100644
--- a/bundler/bundler.py
+++ b/bundler/bundler.py
@@ -335,8 +335,11 @@ class Bundler:
 
             def relative_path_map(line):
                 if not os.path.isabs(line):
-                    # FIXME: Try all prefixes here.
-                    return os.path.join(self.project.get_prefix(), "lib", line)
+                    for prefix in prefixes.values():
+                        path = os.path.join(prefix, "lib", line)
+                        if os.path.exists(path):
+                            return path
+                    print "Cannot find a matching prefix for %s" % (line)
                 return line
 
             def prefix_filter(line):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]