Add stripping
authorTomas Touceda <chiiph@riseup.net>
Tue, 2 Sep 2014 17:36:33 +0000 (13:36 -0400)
committerTomás Touceda <chiiph@leap.se>
Tue, 2 Sep 2014 18:36:47 +0000 (15:36 -0300)
bundler/actions.py

index 9b6b12a..30c86d3 100644 (file)
@@ -32,7 +32,7 @@ if IS_WIN:
     mv = pbs.Command("C:\\Program Files\\Git\\bin\\mv.exe")
 else:
     from sh import git, cd, python, mkdir, make, cp, glob, pip, rm
-    from sh import find, ln, tar, mv
+    from sh import find, ln, tar, mv, strip
 
 from depcollector import collect_deps
 
@@ -102,7 +102,7 @@ def get_version(repos, nightly):
     if not nightly:
         version = "unknown"
         with push_pop("bitmask_client"):
-            version = git("describe").strip()
+            version = git("describe", "--tags").strip()
         return version
 
     m = hashlib.sha256()
@@ -610,6 +610,13 @@ class PycRemover(Action):
         files = find(self._basedir, "-name", "*.pyc").strip().splitlines()
         for f in files:
             rm(f)
+        files = find(self._basedir, "-name", "*\\.so*").strip().splitlines()
+        for f in files:
+            print "Stripping", f
+            try:
+                strip(f)
+            except:
+                pass
         print "Done"