From 9687331698c2d6a7646c046012b4a19182de8b6e Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Thu, 10 May 2012 07:49:51 +0200 Subject: [PATCH] Install missing Python modules for py2exe. --- doc/changelog.txt | 2 ++ setup.py | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/doc/changelog.txt b/doc/changelog.txt index 093e16cb..699b4869 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -5,6 +5,8 @@ Fixes: is broken. Closes: SF bug #3522710 - installer: Install correct MSVC++ runtime DLL version for Windows. +- installer: Install missing Python modules for twill, cssutils and + HTMLTidy. Changes: - documentation: Made the --ignore-url documentation more clear. diff --git a/setup.py b/setup.py index 2fa7f233..406cd3f5 100644 --- a/setup.py +++ b/setup.py @@ -86,7 +86,10 @@ MSVCP90Version = '9.0.21022.8' MSVCP90Token = '1fc8b3b9a1e18e3b' # basic includes for py2exe and py2app -py_includes = ['dns.rdtypes.IN.*', 'dns.rdtypes.ANY.*'] +py_includes = ['dns.rdtypes.IN.*', 'dns.rdtypes.ANY.*', + 'twill.extensions.*', 'twill.extensions.match_parse.*', + 'twill.other_packages.*', 'twill.other_packages._mechanize_dist.*', + 'cssutils.scripts.*'] # basic excludes for py2exe and py2app py_excludes = ['doctest', 'unittest', 'optcomplete', 'Tkinter', 'PyQt4.QtDesigner', 'PyQt4.QtNetwork', 'PyQt4.QtOpenGL', @@ -226,6 +229,15 @@ def fix_qt_plugins_py2app (dist_dir): args = ['install_name_tool', '-change', oldpath, newpath, library] subprocess.check_call(args) +def add_tidy_files (files): + """Add C tidy library used with ctypes.""" + libname = "cygtidy" + libver = "0-99-0" + lib = "%s-%s.dll" % (libname, libver) + import tidy + filename = os.path.join(os.path.dirname(tidy.__file__), lib) + files.append(('', [filename])) + def add_msvc_files (files): """Add needed MSVC++ runtime files. Only Version 9.0.21022.8 is tested @@ -591,6 +603,7 @@ elif 'py2exe' in sys.argv[1:]: raise SystemExit("py2exe module could not be imported") add_qt_plugin_files(data_files) add_msvc_files(data_files) + add_tidy_files(data_files) class InnoScript: