Here's a possible fix for the pythoncom27 and pywintypes27 appearing twice
in the archive and thus the warnings no longer occur.
Bill
Date: Thu, 14 Mar 2013 14:36:31 -0400
Subject: [PATCH] Ensure pywintypes and pythoncom dlls don't get included
twice by adding the dll as a BINARY instead of as a data.
---
PyInstaller/hooks/hook-pythoncom.py | 9 ++++++---
PyInstaller/hooks/hook-pywintypes.py | 9 ++++++---
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/PyInstaller/hooks/hook-pythoncom.py
b/PyInstaller/hooks/hook-pythoncom.py
index 2fff576..3121d30 100644
--- a/PyInstaller/hooks/hook-pythoncom.py
+++ b/PyInstaller/hooks/hook-pythoncom.py
@@ -15,8 +15,11 @@ as a data file. The path to this dll is contained in
__file__
attribute.
"""
-
+import os.path
from PyInstaller.hooks.hookutils import get_module_file_attribute
-
-datas = [(get_module_file_attribute('pythoncom'), '.')]
+def hook(mod):
+ pth = get_module_file_attribute('pythoncom')
+ name = os.path.basename(pth)
+ mod.binaries.extend([(name, pth, 'BINARY')])
+ return mod
diff --git a/PyInstaller/hooks/hook-pywintypes.py
b/PyInstaller/hooks/hook-pywintypes.py
index 0c099c3..053a050 100644
--- a/PyInstaller/hooks/hook-pywintypes.py
+++ b/PyInstaller/hooks/hook-pywintypes.py
@@ -15,8 +15,11 @@ as a data file. The path to this dll is contained in
__file__
attribute.
"""
-
+import os.path
from PyInstaller.hooks.hookutils import get_module_file_attribute
-
-datas = [(get_module_file_attribute('pywintypes'), '.')]
+def hook(mod):
+ pth = get_module_file_attribute('pythoncom')
+ name = os.path.basename(pth)
+ mod.binaries.extend([(name, pth, 'BINARY')])
+ return mod
--
1.7.6.msysgit.0
--
You received this message because you are subscribed to the Google Groups
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.