[Pkg-privacy-commits] [tails-installer] 150/210: Clean up the PyI spec

Intrigeri intrigeri at moszumanska.debian.org
Wed May 24 15:26:39 UTC 2017


This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to tag 3.90.0
in repository tails-installer.

commit 418aeaa1b68c19b4d72c5551eff91fed74abba02
Author: Martin Briza <mbriza at redhat.com>
Date:   Wed Sep 2 16:08:12 2015 +0200

    Clean up the PyI spec
---
 liveusb-creator.pyi.spec | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/liveusb-creator.pyi.spec b/liveusb-creator.pyi.spec
index a4c4990..0502bb5 100644
--- a/liveusb-creator.pyi.spec
+++ b/liveusb-creator.pyi.spec
@@ -3,41 +3,42 @@
 # -*- mode: python -*-
 from PyInstaller.hooks.hookutils import qt5_qml_data
 
+# removes all debug dll variants from the archive, comparing them to their regular counterparts (*d.dll vs *.dll)
 def stripDebug(list):
+    toRemove = []
     for dll in list:
         if dll[0].endswith("d.dll"):
             for dll2 in list:
                 if dll2 != dll and dll2[0].endswith(".dll") and dll[0][:-5] == dll2[0][:-4]:
-                    list.remove(dll)
+                    toRemove.append(dll)
                     break
+    for dll in toRemove:
+        list.remove(dll)
+
+def stripQml(list):
+    toRemove = []
+    for data in list:
+        if data[0].startswith("qml"):
+            toRemove.append(data)
+    for data in toRemove:
+        list.remove(data)
 
 a = Analysis(['liveusb-creator'],
-             pathex=['Z:\\home\\mbriza\\upstream\\liveusb-creator'],
              hiddenimports=['pyquery'],
              hookspath=None,
              runtime_hooks=None)
 pyz = PYZ(a.pure)
 
-#first get rid of the old qml files
-for data in a.datas:
-    if data[0].startswith("qml"):
-        a.datas.remove(data)
-
 newqml = []
 newqml += Tree("C:\\Qt\\5.5\\mingw492_32\\qml\\QtQuick", prefix = 'QtQuick')
 newqml += Tree("C:\\Qt\\5.5\\mingw492_32\\qml\\QtQuick.2", prefix = 'QtQuick.2')
 newqml += Tree("C:\\Qt\\5.5\\mingw492_32\\qml\\QtQml", prefix = 'QtQml')
 
-# there seems to be a bug somewhere leaving a bunch of libraries in the lists nevertheless, so let's run the cleanup thrice o\
-stripDebug(a.binaries)
-stripDebug(a.datas)
-stripDebug(newqml)
-stripDebug(a.binaries)
-stripDebug(a.datas)
-stripDebug(newqml)
+
+stripQml(a.binaries)
 stripDebug(a.binaries)
-stripDebug(a.datas)
 stripDebug(newqml)
+print a.binaries
 
 exe = EXE(pyz,
           a.scripts,
@@ -49,7 +50,6 @@ exe = EXE(pyz,
           console=True )
 coll = COLLECT(exe,
                a.binaries,
-               a.datas,
                newqml,
                strip=False,
                upx=True,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/tails-installer.git



More information about the Pkg-privacy-commits mailing list