[Pkg-privacy-commits] [tails-installer] 89/210: Acceptable spec file for Windows PyInstaller packages
Intrigeri
intrigeri at moszumanska.debian.org
Wed May 24 15:26:31 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 806d1615cf6b816733939fabc8f5bfa1ef1add70
Author: Martin Briza <mbriza at redhat.com>
Date: Tue May 12 16:31:34 2015 +0200
Acceptable spec file for Windows PyInstaller packages
---
liveusb-creator.spec | 75 +++++++++++++++++++++++-----------------------------
1 file changed, 33 insertions(+), 42 deletions(-)
diff --git a/liveusb-creator.spec b/liveusb-creator.spec
index e36ce4e..9018d1e 100644
--- a/liveusb-creator.spec
+++ b/liveusb-creator.spec
@@ -1,64 +1,55 @@
+
# -*- mode: python -*-
from PyInstaller.hooks.hookutils import qt5_qml_data
+
+def stripDebug(list):
+ 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)
+ break
+
a = Analysis(['liveusb-creator'],
pathex=['Z:\\home\\mbriza\\upstream\\liveusb-creator'],
hiddenimports=[],
hookspath=None,
runtime_hooks=None)
pyz = PYZ(a.pure)
-#a.datas += [('liveusb.qml', 'liveusb/liveusb.qml', 'DATA')]
-#print(qt5_qml_data("QtQuick"))
-
-
#first get rid of the old qml files
-newdatas = []
for data in a.datas:
- if not data[0].startswith("qml"):
- newdatas.append(data)
-a.datas = newdatas
-
-a.datas = Tree("C:\\Qt\\Qt5.4.1\\5.4\\mingw491_32\\qml\\QtQuick", prefix = 'QtQuick')
-a.datas += Tree("C:\\Qt\\Qt5.4.1\\5.4\\mingw491_32\\qml\\QtQuick.2", prefix = 'QtQuick.2')
-a.datas += Tree("C:\\Qt\\Qt5.4.1\\5.4\\mingw491_32\\qml\\QtQml", prefix = 'QtQml')
-
-#then find and remove all debug dlls
-newbinaries = a.binaries
-for dll in a.binaries:
- if dll[0].endswith("d.dll"):
- for dll2 in a.binaries:
- if dll2[0].endswith(".dll") and dll[0][:-5] == dll2[0][:-4]:
- print("Removing " + dll[0])
- newbinaries.remove(dll)
- break
-a.binaries = newbinaries
-newdatas = a.datas
-for dll in a.datas:
- if dll[0].endswith("d.dll"):
- for dll2 in a.datas:
- if dll2[0].endswith(".dll") and dll[0][:-5] == dll2[0][:-4]:
- newdatas.remove(dll)
- break
-a.datas = newdatas
-
-print(newdatas)
-print(newbinaries)
-
-
+ if data[0].startswith("qml"):
+ a.datas.remove(data)
+
+newqml = []
+newqml += Tree("C:\\Qt\\Qt5.4.1\\5.4\\mingw491_32\\qml\\QtQuick", prefix = 'QtQuick')
+newqml += Tree("C:\\Qt\\Qt5.4.1\\5.4\\mingw491_32\\qml\\QtQuick.2", prefix = 'QtQuick.2')
+newqml += Tree("C:\\Qt\\Qt5.4.1\\5.4\\mingw491_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)
+stripDebug(a.binaries)
+stripDebug(a.datas)
+stripDebug(newqml)
exe = EXE(pyz,
a.scripts,
exclude_binaries=True,
name='liveusb-creator.exe',
debug=False,
- strip=None,
+ strip=True,
upx=True,
console=True )
coll = COLLECT(exe,
- newbinaries,
- newdatas,
+ a.binaries,
a.datas,
- strip=None,
+ newqml,
+ strip=True,
upx=True,
- name='liveusb-creator')
-print(exe)
\ No newline at end of file
+ name='liveusb-creator')
\ No newline at end of file
--
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