[Dicson] Add gui extension point for groupchat control creation. Fixes #5975
[gajim.git] / setup_win32.py
blob4f742bade1d82fdc2079dfd8af4d5349be04aabf
1 ## setup_win32.py (run me as python setup_win32.py py2exe -O2)
2 ##
3 ## Copyright (C) 2003-2010 Yann Leboulanger <asterix AT lagaule.org>
4 ## Copyright (C) 2005-2006 Nikos Kouremenos <kourem AT gmail.com>
5 ## Copyright (C) 2008 Jonathan Schleifer <js-gajim AT webkeks.org>
6 ##
7 ## This file is part of Gajim.
8 ##
9 ## Gajim is free software; you can redistribute it and/or modify
10 ## it under the terms of the GNU General Public License as published
11 ## by the Free Software Foundation; version 3 only.
13 ## Gajim is distributed in the hope that it will be useful,
14 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ## GNU General Public License for more details.
18 ## You should have received a copy of the GNU General Public License
19 ## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
22 from distutils.core import setup
23 import py2exe
24 import glob
25 import sys
26 import os
28 docutils_files = []
29 def fill_docutils_files(folder, base=u'docutils'):
30 docutils_files.append((base, glob.glob(os.path.join(folder, base, '*.pyc'))))
31 for path in os.listdir(os.path.join(folder, base)):
32 if os.path.isdir(os.path.join(folder, base, path)):
33 fill_docutils_files(folder, base=os.path.join(base, path))
35 try:
36 import docutils.readers
37 import docutils.writers.html4css1
38 import docutils.languages
39 except ImportError:
40 pass
41 else:
42 fill_docutils_files(os.path.join(sys.prefix, 'Lib', 'site-packages'))
43 docutils_files.append((os.path.join('docutils', 'writers', 'html4css1'),
44 glob.glob(os.path.join(sys.prefix, 'Lib', 'site-packages', 'docutils',
45 'writers', 'html4css1', '*.css'))))
47 sys.path.append('src')
48 # Use local gtk folder instead of the one in PATH that is not latest gtk
49 if 'gtk' in os.listdir('.'):
50 sys.path.append('gtk/bin')
52 opts = {
53 'py2exe': {
54 # ConfigParser,UserString,roman are needed for docutils
55 'includes': ('pango,atk,gobject,cairo,pangocairo,gtk.keysyms,'
56 'encodings,encodings.*,ConfigParser,UserString'),
57 'dll_excludes': [
58 'iconv.dll', 'intl.dll', 'libatk-1.0-0.dll',
59 'libgdk_pixbuf-2.0-0.dll', 'libgdk-win32-2.0-0.dll',
60 'libglib-2.0-0.dll', 'libgmodule-2.0-0.dll',
61 'libgobject-2.0-0.dll', 'libgthread-2.0-0.dll',
62 'libgtk-win32-2.0-0.dll', 'libpango-1.0-0.dll',
63 'libpangowin32-1.0-0.dll', 'libcairo-2.dll',
64 'libpangocairo-1.0-0.dll', 'libpangoft2-1.0-0.dll',
66 'excludes': [
67 'docutils'
69 'optimize': 2,
74 setup(
75 name='Gajim',
76 version='0.12.1',
77 description='A full featured Jabber client',
78 author='Gajim Development Team',
79 url='http://www.gajim.org/',
80 download_url='http://www.gajim.org/downloads.php',
81 license='GPL',
82 windows=[{'script': 'src/gajim.py',
83 'icon_resources': [(1, 'data/pixmaps/gajim.ico')]},
84 {'script': 'src/history_manager.py',
85 'icon_resources': [(1, 'data/pixmaps/gajim.ico')]}],
86 options=opts,
87 data_files=docutils_files,