[gtk-mac-bundler] Move cleaning up dupes in Bundler::copy_binaries out of loop.



commit 7d6fc00dc4d8397a31805b473b865b7f59da35db
Author: John Ralls <jralls ceridwen us>
Date:   Sat Dec 31 15:56:06 2016 -0800

    Move cleaning up dupes in Bundler::copy_binaries out of loop.

 bundler/bundler.py |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/bundler/bundler.py b/bundler/bundler.py
index c27d2c0..785e079 100644
--- a/bundler/bundler.py
+++ b/bundler/bundler.py
@@ -224,18 +224,17 @@ class Bundler:
             if os.path.islink(path.source):
                 continue
             dest = path.copy_target(self.project)
-
             self.binary_paths.append(dest)
-
-            # Clean up duplicates
-            self.binary_paths = list(set(self.binary_paths))
-
             # Clean out any libtool (*.la) files and static libraries
             if os.path.isdir(dest):
                 for root, dirs, files in os.walk(dest):
-                    for name in [l for l in files if l.endswith(".la") or l.endswith(".a")]:
+                    for name in [l for l in files if l.endswith(".la")
+                                 or l.endswith(".a")]:
                         os.remove(os.path.join(root, name))
 
+        # Clean up duplicates
+        self.binary_paths = list(set(self.binary_paths))
+
     # Lists all the binaries copied in so far. Used in the library
     # dependency resolution and icon theme lookup.
     def list_copied_binaries(self):


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