]> git.saurik.com Git - wxWidgets.git/blame - wxPython/setup.py
Copy Solaris note from 2.4's setup.py
[wxWidgets.git] / wxPython / setup.py
CommitLineData
c368d904
RD
1#!/usr/bin/env python
2#----------------------------------------------------------------------
3
b0640a71 4import sys, os, glob, fnmatch, tempfile
c368d904
RD
5from distutils.core import setup, Extension
6from distutils.file_util import copy_file
7from distutils.dir_util import mkpath
8from distutils.dep_util import newer
1e4a197e
RD
9from distutils.spawn import spawn
10from distutils.command.install_data import install_data
c368d904
RD
11
12#----------------------------------------------------------------------
13# flags and values that affect this script
14#----------------------------------------------------------------------
15
1fded56b
RD
16VER_MAJOR = 2 # The first three must match wxWindows
17VER_MINOR = 5
4326f7b7 18VER_RELEASE = 1
1fded56b 19VER_SUBREL = 0 # wxPython release num for x.y.z release of wxWindows
c6281ceb 20VER_FLAGS = "p6" # release flags, such as prerelease num, unicode, etc.
1fded56b 21
c368d904
RD
22DESCRIPTION = "Cross platform GUI toolkit for Python"
23AUTHOR = "Robin Dunn"
b166c703 24AUTHOR_EMAIL = "Robin Dunn <robin@alldunn.com>"
c368d904 25URL = "http://wxPython.org/"
851d4ac7
RD
26DOWNLOAD_URL = "http://wxPython.org/download.php"
27LICENSE = "wxWindows Library License (LGPL derivative)"
28PLATFORMS = "WIN32,OSX,POSIX"
29KEYWORDS = "GUI,wx,wxWindows,cross-platform"
30
c368d904
RD
31LONG_DESCRIPTION = """\
32wxPython is a GUI toolkit for Python that is a wrapper around the
33wxWindows C++ GUI library. wxPython provides a large variety of
1b62f00d 34window types and controls, all implemented with a native look and
1e4a197e 35feel (by using the native widgets) on the platforms it is supported
c368d904
RD
36on.
37"""
38
851d4ac7
RD
39CLASSIFIERS = """\
40Development Status :: 6 - Mature
41Environment :: MacOS X :: Carbon
42Environment :: Win32 (MS Windows)
43Environment :: X11 Applications :: GTK
44Intended Audience :: Developers
45License :: OSI Approved
46Operating System :: MacOS :: MacOS X
47Operating System :: Microsoft :: Windows :: Windows 95/98/2000
48Operating System :: POSIX
49Programming Language :: Python
50Topic :: Software Development :: User Interfaces
51"""
52
53## License :: OSI Approved :: wxWindows Library Licence
54
c368d904 55
1e4a197e
RD
56# Config values below this point can be reset on the setup.py command line.
57
f221f8eb 58BUILD_GLCANVAS = 1 # If true, build the contrib/glcanvas extension module
c368d904
RD
59BUILD_OGL = 1 # If true, build the contrib/ogl extension module
60BUILD_STC = 1 # If true, build the contrib/stc extension module
d56cebe7 61BUILD_XRC = 1 # XML based resource system
ebf4302c 62BUILD_GIZMOS = 1 # Build a module for the gizmos contrib library
1e4a197e 63BUILD_DLLWIDGET = 0# Build a module that enables unknown wx widgets
37bd51c0 64 # to be loaded from a DLL and to be used from Python.
d56cebe7 65
c731eb47 66 # Internet Explorer wrapper (experimental)
d14a1e28 67BUILD_IEWIN = 0 #(os.name == 'nt')
78e8819c 68
1e4a197e 69
c368d904 70CORE_ONLY = 0 # if true, don't build any of the above
4a61305d 71
1e4a197e 72PREP_ONLY = 0 # Only run the prepatory steps, not the actual build.
c368d904
RD
73
74USE_SWIG = 0 # Should we actually execute SWIG, or just use the
75 # files already in the distribution?
76
d14a1e28
RD
77SWIG = "swig" # The swig executable to use.
78
79BUILD_RENAMERS = 1 # Should we build the renamer modules too?
80
a541c325
RD
81UNICODE = 0 # This will pass the 'wxUSE_UNICODE' flag to SWIG and
82 # will ensure that the right headers are found and the
83 # right libs are linked.
c8bc7bb8 84
5c8e1089
RD
85UNDEF_NDEBUG = 1 # Python 2.2 on Unix/Linux by default defines NDEBUG,
86 # and distutils will pick this up and use it on the
87 # compile command-line for the extensions. This could
88 # conflict with how wxWindows was built. If NDEBUG is
89 # set then wxWindows' __WXDEBUG__ setting will be turned
90 # off. If wxWindows was actually built with it turned
91 # on then you end up with mismatched class structures,
92 # and wxPython will crash.
93
2eb31f8b
RD
94NO_SCRIPTS = 0 # Don't install the tool scripts
95
1e4a197e
RD
96WX_CONFIG = None # Usually you shouldn't need to touch this, but you can set
97 # it to pass an alternate version of wx-config or alternate
98 # flags, eg. as required by the .deb in-tree build. By
99 # default a wx-config command will be assembled based on
100 # version, port, etc. and it will be looked for on the
101 # default $PATH.
102
103WXPORT = 'gtk' # On Linux/Unix there are several ports of wxWindows available.
104 # Setting this value lets you select which will be used for
105 # the wxPython build. Possibilites are 'gtk', 'gtk2' and
106 # 'x11'. Curently only gtk and gtk2 works.
107
108BUILD_BASE = "build" # Directory to use for temporary build files.
2eb31f8b 109
c368d904 110
a541c325 111
c368d904
RD
112# Some MSW build settings
113
d440a0e7 114FINAL = 0 # Mirrors use of same flag in wx makefiles,
c368d904
RD
115 # (0 or 1 only) should probably find a way to
116 # autodetect this...
117
d440a0e7 118HYBRID = 1 # If set and not debug or FINAL, then build a
c368d904
RD
119 # hybrid extension that can be used by the
120 # non-debug version of python, but contains
121 # debugging symbols for wxWindows and wxPython.
122 # wxWindows must have been built with /MD, not /MDd
123 # (using FINAL=hybrid will do it.)
124
3e46a8e6
RD
125 # Version part of wxWindows LIB/DLL names
126WXDLLVER = '%d%d' % (VER_MAJOR, VER_MINOR)
c368d904
RD
127
128
cfe766c3
RD
129#----------------------------------------------------------------------
130
131def msg(text):
132 if __name__ == "__main__":
133 print text
134
a541c325 135
55c020cf
RD
136def opj(*args):
137 path = apply(os.path.join, args)
138 return os.path.normpath(path)
cfe766c3 139
a541c325 140
a4fbdd76
RD
141def libFlag():
142 if FINAL:
c8bc7bb8 143 rv = ''
a4fbdd76 144 elif HYBRID:
c8bc7bb8 145 rv = 'h'
a4fbdd76 146 else:
c8bc7bb8 147 rv = 'd'
a541c325 148 if UNICODE:
c8bc7bb8
RD
149 rv = 'u' + rv
150 return rv
a4fbdd76
RD
151
152
c368d904
RD
153#----------------------------------------------------------------------
154# Some other globals
155#----------------------------------------------------------------------
156
d14a1e28 157PKGDIR = 'wx'
c368d904 158wxpExtensions = []
1e4a197e 159DATA_FILES = []
c368d904
RD
160
161force = '--force' in sys.argv or '-f' in sys.argv
162debug = '--debug' in sys.argv or '-g' in sys.argv
ce8f00f3
RD
163cleaning = 'clean' in sys.argv
164
c368d904 165
1e4a197e
RD
166# change the PORT default for wxMac
167if sys.platform[:6] == "darwin":
168 WXPORT = 'mac'
22d08289 169
1e4a197e
RD
170# and do the same for wxMSW, just for consistency
171if os.name == 'nt':
172 WXPORT = 'msw'
22d08289 173
c368d904
RD
174
175#----------------------------------------------------------------------
176# Check for build flags on the command line
177#----------------------------------------------------------------------
178
5c8e1089 179# Boolean (int) flags
b166c703 180for flag in ['BUILD_GLCANVAS', 'BUILD_OGL', 'BUILD_STC', 'BUILD_XRC',
c731eb47 181 'BUILD_GIZMOS', 'BUILD_DLLWIDGET', 'BUILD_IEWIN',
d14a1e28
RD
182 'CORE_ONLY', 'PREP_ONLY', 'USE_SWIG', 'UNICODE',
183 'UNDEF_NDEBUG', 'NO_SCRIPTS', 'BUILD_RENAMERS',
b166c703 184 'FINAL', 'HYBRID', ]:
c368d904 185 for x in range(len(sys.argv)):
1e4a197e
RD
186 if sys.argv[x].find(flag) == 0:
187 pos = sys.argv[x].find('=') + 1
c368d904
RD
188 if pos > 0:
189 vars()[flag] = eval(sys.argv[x][pos:])
190 sys.argv[x] = ''
191
5c8e1089 192# String options
d14a1e28 193for option in ['WX_CONFIG', 'WXDLLVER', 'BUILD_BASE', 'WXPORT', 'SWIG']:
afa3e1ed 194 for x in range(len(sys.argv)):
1e4a197e
RD
195 if sys.argv[x].find(option) == 0:
196 pos = sys.argv[x].find('=') + 1
afa3e1ed
RL
197 if pos > 0:
198 vars()[option] = sys.argv[x][pos:]
199 sys.argv[x] = ''
200
c368d904
RD
201sys.argv = filter(None, sys.argv)
202
203
1e4a197e
RD
204#----------------------------------------------------------------------
205# some helper functions
206#----------------------------------------------------------------------
207
208def Verify_WX_CONFIG():
209 """ Called below for the builds that need wx-config,
210 if WX_CONFIG is not set then tries to select the specific
211 wx*-config script based on build options. If not found
212 then it defaults to 'wx-config'.
213 """
214 # if WX_CONFIG hasn't been set to an explicit value then construct one.
215 global WX_CONFIG
216 if WX_CONFIG is None:
217 if debug: # TODO: Fix this. wxPython's --debug shouldn't be tied to wxWindows...
218 df = 'd'
219 else:
220 df = ''
221 if UNICODE:
222 uf = 'u'
223 else:
224 uf = ''
1fded56b 225 ver2 = "%s.%s" % (VER_MAJOR, VER_MINOR)
1e4a197e
RD
226 WX_CONFIG = 'wx%s%s%s-%s-config' % (WXPORT, uf, df, ver2)
227
228 searchpath = os.environ["PATH"]
229 for p in searchpath.split(':'):
230 fp = os.path.join(p, WX_CONFIG)
231 if os.path.exists(fp) and os.access(fp, os.X_OK):
232 # success
233 msg("Found wx-config: " + fp)
234 WX_CONFIG = fp
235 break
236 else:
237 msg("WX_CONFIG not specified and %s not found on $PATH "
238 "defaulting to \"wx-config\"" % WX_CONFIG)
239 WX_CONFIG = 'wx-config'
240
241
242
243def run_swig(files, dir, gendir, package, USE_SWIG, force, swig_args, swig_deps=[]):
244 """Run SWIG the way I want it done"""
d14a1e28 245
1e4a197e
RD
246 if not os.path.exists(os.path.join(dir, gendir)):
247 os.mkdir(os.path.join(dir, gendir))
248
8994c3c2
RD
249 if not os.path.exists(os.path.join("docs", "xml-raw")):
250 os.mkdir(os.path.join("docs", "xml-raw"))
251
1e4a197e
RD
252 sources = []
253
254 for file in files:
255 basefile = os.path.splitext(file)[0]
256 i_file = os.path.join(dir, file)
257 py_file = os.path.join(dir, gendir, basefile+'.py')
d14a1e28 258 cpp_file = os.path.join(dir, gendir, basefile+'_wrap.cpp')
8994c3c2 259 xml_file = os.path.join("docs", "xml-raw", basefile+'_swig.xml')
1e4a197e
RD
260
261 sources.append(cpp_file)
262
ce8f00f3 263 if not cleaning and USE_SWIG:
1e4a197e
RD
264 for dep in swig_deps:
265 if newer(dep, py_file) or newer(dep, cpp_file):
266 force = 1
267 break
268
269 if force or newer(i_file, py_file) or newer(i_file, cpp_file):
d14a1e28
RD
270 ## we need forward slashes here even on win32
271 #cpp_file = opj(cpp_file) #'/'.join(cpp_file.split('\\'))
272 #i_file = opj(i_file) #'/'.join(i_file.split('\\'))
273
274 if BUILD_RENAMERS:
b0640a71
RD
275 #tempfile.tempdir = sourcePath
276 xmltemp = tempfile.mktemp('.xml')
277
8994c3c2
RD
278 # First run swig to produce the XML file, adding
279 # an extra -D that prevents the old rename
280 # directives from being used
281 cmd = [ swig_cmd ] + swig_args + \
b0640a71 282 [ '-DBUILDING_RENAMERS', '-xmlout', xmltemp ] + \
8994c3c2
RD
283 ['-I'+dir, '-o', cpp_file, i_file]
284 msg(' '.join(cmd))
285 spawn(cmd)
286
287 # Next run build_renamers to process the XML
d14a1e28 288 cmd = [ sys.executable, '-u',
b0640a71 289 './distrib/build_renamers.py', dir, basefile, xmltemp]
d14a1e28
RD
290 msg(' '.join(cmd))
291 spawn(cmd)
b0640a71 292 os.remove(xmltemp)
d14a1e28
RD
293
294 # Then run swig for real
b0640a71
RD
295 cmd = [ swig_cmd ] + swig_args + ['-I'+dir, '-o', cpp_file,
296 '-xmlout', xml_file, i_file]
1e4a197e
RD
297 msg(' '.join(cmd))
298 spawn(cmd)
299
d14a1e28 300
1e4a197e
RD
301 # copy the generated python file to the package directory
302 copy_file(py_file, package, update=not force, verbose=0)
303
304 return sources
305
306
307
308def contrib_copy_tree(src, dest, verbose=0):
309 """Update local copies of wxWindows contrib files"""
310 from distutils.dir_util import mkpath, copy_tree
311
312 mkpath(dest, verbose=verbose)
313 copy_tree(src, dest, update=1, verbose=verbose)
314
315
316
317class smart_install_data(install_data):
318 def run(self):
319 #need to change self.install_dir to the actual library dir
320 install_cmd = self.get_finalized_command('install')
321 self.install_dir = getattr(install_cmd, 'install_lib')
322 return install_data.run(self)
323
324
325def build_locale_dir(destdir, verbose=1):
326 """Build a locale dir under the wxPython package for MSW"""
327 moFiles = glob.glob(opj(WXDIR, 'locale', '*.mo'))
328 for src in moFiles:
329 lang = os.path.splitext(os.path.basename(src))[0]
330 dest = opj(destdir, lang, 'LC_MESSAGES')
331 mkpath(dest, verbose=verbose)
332 copy_file(src, opj(dest, 'wxstd.mo'), update=1, verbose=verbose)
333
334
335def build_locale_list(srcdir):
336 # get a list of all files under the srcdir, to be used for install_data
337 def walk_helper(lst, dirname, files):
338 for f in files:
339 filename = opj(dirname, f)
340 if not os.path.isdir(filename):
341 lst.append( (dirname, [filename]) )
342 file_list = []
343 os.path.walk(srcdir, walk_helper, file_list)
344 return file_list
345
346
1fded56b
RD
347def find_data_files(srcdir, *wildcards):
348 # get a list of all files under the srcdir matching wildcards,
349 # returned in a format to be used for install_data
350
351 def walk_helper(arg, dirname, files):
352 names = []
353 lst, wildcards = arg
354 for wc in wildcards:
355 for f in files:
356 filename = opj(dirname, f)
357 if fnmatch.fnmatch(filename, wc) and not os.path.isdir(filename):
358 names.append(filename)
359 if names:
360 lst.append( (dirname, names ) )
361
362 file_list = []
363 os.path.walk(srcdir, walk_helper, (file_list, wildcards))
364 return file_list
1e4a197e
RD
365
366
3ef86e32
RD
367def makeLibName(name):
368 if os.name == 'posix':
369 libname = '%s_%s-%s' % (WXBASENAME, name, WXRELEASE)
370 else:
3e46a8e6 371 libname = 'wxmsw%s%s_%s' % (WXDLLVER, libFlag(), name)
3ef86e32
RD
372
373 return [libname]
374
375
376
377def adjustCFLAGS(cflags, defines, includes):
d14a1e28 378 '''Extrace the raw -I, -D, and -U flags and put them into
3ef86e32
RD
379 defines and includes as needed.'''
380 newCFLAGS = []
381 for flag in cflags:
382 if flag[:2] == '-I':
383 includes.append(flag[2:])
384 elif flag[:2] == '-D':
385 flag = flag[2:]
386 if flag.find('=') == -1:
387 defines.append( (flag, None) )
388 else:
389 defines.append( tuple(flag.split('=')) )
390 elif flag[:2] == '-U':
391 defines.append( (flag[2:], ) )
392 else:
393 newCFLAGS.append(flag)
394 return newCFLAGS
395
396
397
398def adjustLFLAGS(lfags, libdirs, libs):
d14a1e28 399 '''Extrace the -L and -l flags and put them in libdirs and libs as needed'''
3ef86e32
RD
400 newLFLAGS = []
401 for flag in lflags:
402 if flag[:2] == '-L':
403 libdirs.append(flag[2:])
404 elif flag[:2] == '-l':
405 libs.append(flag[2:])
406 else:
407 newLFLAGS.append(flag)
408
409 return newLFLAGS
c8bc7bb8
RD
410
411#----------------------------------------------------------------------
412# sanity checks
413
c368d904 414if CORE_ONLY:
f221f8eb 415 BUILD_GLCANVAS = 0
c368d904
RD
416 BUILD_OGL = 0
417 BUILD_STC = 0
b166c703 418 BUILD_XRC = 0
ff5f1aba
RD
419 BUILD_GIZMOS = 0
420 BUILD_DLLWIDGET = 0
c731eb47 421 BUILD_IEWIN = 0
ff5f1aba 422
1e4a197e
RD
423if debug:
424 FINAL = 0
425 HYBRID = 0
c368d904 426
1e4a197e
RD
427if FINAL:
428 HYBRID = 0
c8bc7bb8 429
1e4a197e
RD
430if UNICODE and WXPORT not in ['msw', 'gtk2']:
431 raise SystemExit, "UNICODE mode not currently supported on this WXPORT: "+WXPORT
a541c325
RD
432
433
c368d904
RD
434#----------------------------------------------------------------------
435# Setup some platform specific stuff
436#----------------------------------------------------------------------
437
438if os.name == 'nt':
439 # Set compile flags and such for MSVC. These values are derived
a541c325
RD
440 # from the wxWindows makefiles for MSVC, other compilers settings
441 # will probably vary...
442 if os.environ.has_key('WXWIN'):
443 WXDIR = os.environ['WXWIN']
444 else:
445 msg("WARNING: WXWIN not set in environment.")
446 WXDIR = '..' # assumes in CVS tree
c368d904
RD
447 WXPLAT = '__WXMSW__'
448 GENDIR = 'msw'
449
d14a1e28
RD
450 includes = ['include', 'src',
451 opj(WXDIR, 'lib', 'vc_dll', 'msw' + libFlag()),
55c020cf 452 opj(WXDIR, 'include'),
5a2a9da2 453 opj(WXDIR, 'contrib', 'include'),
c368d904
RD
454 ]
455
1e4a197e 456 defines = [ ('WIN32', None),
c368d904 457 ('_WINDOWS', None),
c368d904
RD
458
459 (WXPLAT, None),
460 ('WXUSINGDLL', '1'),
461
462 ('SWIG_GLOBAL', None),
c368d904
RD
463 ('WXP_USE_THREAD', '1'),
464 ]
465
1e4a197e
RD
466 if UNDEF_NDEBUG:
467 defines.append( ('NDEBUG',) ) # using a 1-tuple makes it do an undef
22d08289
RD
468
469
c368d904
RD
470 if not FINAL or HYBRID:
471 defines.append( ('__WXDEBUG__', None) )
472
1e521887 473 libdirs = [ opj(WXDIR, 'lib', 'vc_dll') ]
0a67b751
RD
474 libs = [ 'wxbase' + WXDLLVER + libFlag(), # TODO: trim this down to what is really needed for the core
475 'wxbase' + WXDLLVER + libFlag() + '_net',
476 'wxbase' + WXDLLVER + libFlag() + '_xml',
477 makeLibName('core')[0],
478 makeLibName('adv')[0],
479 makeLibName('html')[0],
480 ]
a4fbdd76 481
22d08289 482 libs = libs + ['kernel32', 'user32', 'gdi32', 'comdlg32',
c368d904 483 'winspool', 'winmm', 'shell32', 'oldnames', 'comctl32',
1e4a197e 484 'odbc32', 'ole32', 'oleaut32', 'uuid', 'rpcrt4',
c368d904
RD
485 'advapi32', 'wsock32']
486
22d08289 487
d440a0e7 488 cflags = [ '/Gy',
ad07d019
RD
489 # '/GX-' # workaround for internal compiler error in MSVC on some machines
490 ]
c368d904
RD
491 lflags = None
492
1e4a197e 493 # Other MSVC flags...
1fded56b 494 # Too bad I don't remember why I was playing with these, can they be removed?
1e4a197e
RD
495 if FINAL:
496 pass #cflags = cflags + ['/O1']
497 elif HYBRID :
498 pass #cflags = cflags + ['/Ox']
499 else:
500 pass # cflags = cflags + ['/Od', '/Z7']
501 # lflags = ['/DEBUG', ]
22d08289
RD
502
503
22d08289 504
1e4a197e 505#----------------------------------------------------------------------
c368d904 506
3ef86e32 507elif os.name == 'posix':
d14a1e28
RD
508 WXDIR = '..'
509 includes = ['include', 'src']
e6056257
RD
510 defines = [('SWIG_GLOBAL', None),
511 ('HAVE_CONFIG_H', None),
512 ('WXP_USE_THREAD', '1'),
513 ]
1e4a197e
RD
514 if UNDEF_NDEBUG:
515 defines.append( ('NDEBUG',) ) # using a 1-tuple makes it do an undef
1e4a197e
RD
516
517 Verify_WX_CONFIG()
e6056257 518
3ef86e32
RD
519 libdirs = []
520 libs = []
521
f9b46bcb
RD
522 # If you get unresolved symbol errors on Solaris and are using gcc, then
523 # uncomment this block to add the right flags to the link step and build
524 # again.
525 ## if os.uname()[0] == 'SunOS':
526 ## libs.append('gcc')
527 ## libdirs.append(commands.getoutput("gcc -print-search-dirs | grep '^install' | awk '{print $2}'")[:-1])
528
e6056257 529 cflags = os.popen(WX_CONFIG + ' --cxxflags', 'r').read()[:-1]
1e4a197e 530 cflags = cflags.split()
ba201fa4
RD
531 if debug:
532 cflags.append('-g')
533 cflags.append('-O0')
8b9a4190
RD
534 else:
535 cflags.append('-O3')
e6056257
RD
536
537 lflags = os.popen(WX_CONFIG + ' --libs', 'r').read()[:-1]
1e4a197e 538 lflags = lflags.split()
e6056257 539
3ef86e32
RD
540 WXBASENAME = os.popen(WX_CONFIG + ' --basename').read()[:-1]
541 WXRELEASE = os.popen(WX_CONFIG + ' --release').read()[:-1]
542 WXPREFIX = os.popen(WX_CONFIG + ' --prefix').read()[:-1]
e6056257
RD
543
544
3ef86e32
RD
545 if sys.platform[:6] == "darwin":
546 # Flags and such for a Darwin (Max OS X) build of Python
547 WXPLAT = '__WXMAC__'
548 GENDIR = 'mac'
549 libs = ['stdc++']
550 NO_SCRIPTS = 1
c368d904 551
1e4a197e 552
3ef86e32
RD
553 else:
554 # Set flags for other Unix type platforms
555 GENDIR = WXPORT
556
557 if WXPORT == 'gtk':
558 WXPLAT = '__WXGTK__'
559 portcfg = os.popen('gtk-config --cflags', 'r').read()[:-1]
560 elif WXPORT == 'gtk2':
561 WXPLAT = '__WXGTK__'
562 GENDIR = 'gtk' # no code differences so use the same generated sources
563 portcfg = os.popen('pkg-config gtk+-2.0 --cflags', 'r').read()[:-1]
564 BUILD_BASE = BUILD_BASE + '-' + WXPORT
565 elif WXPORT == 'x11':
566 WXPLAT = '__WXX11__'
567 portcfg = ''
568 BUILD_BASE = BUILD_BASE + '-' + WXPORT
569 else:
570 raise SystemExit, "Unknown WXPORT value: " + WXPORT
1e4a197e 571
3ef86e32 572 cflags += portcfg.split()
1e4a197e 573
d14a1e28
RD
574 # Some distros (e.g. Mandrake) put libGLU in /usr/X11R6/lib, but
575 # wx-config doesn't output that for some reason. For now, just
576 # add it unconditionally but we should really check if the lib is
577 # really found there or wx-config should be fixed.
578 libdirs.append("/usr/X11R6/lib")
c368d904 579
1e4a197e 580
3ef86e32
RD
581 # Move the various -I, -D, etc. flags we got from the *config scripts
582 # into the distutils lists.
583 cflags = adjustCFLAGS(cflags, defines, includes)
584 lflags = adjustLFLAGS(lflags, libdirs, libs)
c368d904
RD
585
586
1e4a197e 587#----------------------------------------------------------------------
c368d904 588else:
1e4a197e
RD
589 raise 'Sorry Charlie, platform not supported...'
590
591
592#----------------------------------------------------------------------
1fded56b 593# post platform setup checks and tweaks, create the full version string
1e4a197e
RD
594#----------------------------------------------------------------------
595
596if UNICODE:
597 BUILD_BASE = BUILD_BASE + '.unicode'
1fded56b 598 VER_FLAGS += 'u'
c368d904
RD
599
600
1fded56b
RD
601VERSION = "%s.%s.%s.%s%s" % (VER_MAJOR, VER_MINOR, VER_RELEASE,
602 VER_SUBREL, VER_FLAGS)
603
c368d904 604#----------------------------------------------------------------------
1fded56b 605# Update the version file
c368d904
RD
606#----------------------------------------------------------------------
607
1fded56b
RD
608# Unconditionally updated since the version string can change based
609# on the UNICODE flag
610open('src/__version__.py', 'w').write("""\
611# This file was generated by setup.py...
612
d14a1e28
RD
613VERSION_STRING = '%(VERSION)s'
614MAJOR_VERSION = %(VER_MAJOR)s
615MINOR_VERSION = %(VER_MINOR)s
616RELEASE_VERSION = %(VER_RELEASE)s
617SUBREL_VERSION = %(VER_SUBREL)s
1fded56b 618
d14a1e28
RD
619VERSION = (MAJOR_VERSION, MINOR_VERSION, RELEASE_VERSION,
620 SUBREL_VERSION, '%(VER_FLAGS)s')
1fded56b 621
d14a1e28 622RELEASE_NUMBER = RELEASE_VERSION # for compatibility
1fded56b 623""" % globals())
1e4a197e 624
c368d904 625
1b62f00d
RD
626
627
c368d904 628#----------------------------------------------------------------------
1b62f00d 629# SWIG defaults
c368d904
RD
630#----------------------------------------------------------------------
631
d14a1e28 632swig_cmd = SWIG
c368d904 633swig_force = force
d14a1e28
RD
634swig_args = ['-c++',
635 '-Wall',
636 '-nodefault',
637
638## '-xml',
639
640 '-python',
641 '-keyword',
642 '-new_repr',
643 '-modern',
644
645 '-I./src',
646 '-D'+WXPLAT,
98fb9b71 647 '-noruntime'
e6056257 648 ]
a541c325 649if UNICODE:
c8bc7bb8
RD
650 swig_args.append('-DwxUSE_UNICODE')
651
d14a1e28
RD
652swig_deps = [ 'src/my_typemaps.i',
653 'src/common.swg',
654 'src/pyrun.swg',
655 ]
656
657depends = [ #'include/wx/wxPython/wxPython.h',
658 #'include/wx/wxPython/wxPython_int.h',
659 #'src/pyclasses.h',
660 ]
c368d904 661
c368d904 662
1b62f00d
RD
663#----------------------------------------------------------------------
664# Define the CORE extension module
665#----------------------------------------------------------------------
666
1e4a197e 667msg('Preparing CORE...')
d14a1e28
RD
668swig_sources = run_swig(['core.i'], 'src', GENDIR, PKGDIR,
669 USE_SWIG, swig_force, swig_args, swig_deps +
1e0c8722
RD
670 [ 'src/_accel.i',
671 'src/_app.i',
d14a1e28
RD
672 'src/_app_ex.py',
673 'src/_constraints.i',
674 'src/_core_api.i',
675 'src/_core_ex.py',
676 'src/_core_rename.i',
677 'src/_core_reverse.txt',
678 'src/_defs.i',
679 'src/_event.i',
680 'src/_event_ex.py',
681 'src/_evthandler.i',
682 'src/_filesys.i',
683 'src/_gdicmn.i',
684 'src/_image.i',
685 'src/_menu.i',
686 'src/_obj.i',
687 'src/_sizers.i',
688 'src/_gbsizer.i',
689 'src/_streams.i',
690 'src/_validator.i',
691 'src/_window.i',
692 ])
1b62f00d 693
1e4a197e
RD
694copy_file('src/__init__.py', PKGDIR, update=1, verbose=0)
695copy_file('src/__version__.py', PKGDIR, update=1, verbose=0)
1b62f00d
RD
696
697
d14a1e28
RD
698# update the license files
699mkpath('licence')
700for file in ['preamble.txt', 'licence.txt', 'licendoc.txt', 'lgpl.txt']:
701 copy_file(opj(WXDIR, 'docs', file), opj('licence',file), update=1, verbose=0)
c368d904 702
c368d904 703
1e4a197e
RD
704if os.name == 'nt':
705 build_locale_dir(opj(PKGDIR, 'locale'))
706 DATA_FILES += build_locale_list(opj(PKGDIR, 'locale'))
4f3449b4
RD
707
708
1e4a197e
RD
709if os.name == 'nt':
710 rc_file = ['src/wxc.rc']
711else:
712 rc_file = []
713
714
d14a1e28
RD
715ext = Extension('_core', ['src/helpers.cpp',
716 'src/libpy.c',
1e4a197e
RD
717 ] + rc_file + swig_sources,
718
719 include_dirs = includes,
720 define_macros = defines,
721
722 library_dirs = libdirs,
723 libraries = libs,
724
725 extra_compile_args = cflags,
726 extra_link_args = lflags,
d14a1e28
RD
727
728 depends = depends
1e4a197e
RD
729 )
730wxpExtensions.append(ext)
731
732
d14a1e28
RD
733
734
735
736# Extension for the GDI module
737swig_sources = run_swig(['gdi.i'], 'src', GENDIR, PKGDIR,
738 USE_SWIG, swig_force, swig_args, swig_deps +
739 ['src/_gdi_rename.i',
740 'src/_bitmap.i', 'src/_brush.i',
741 'src/_colour.i', 'src/_cursor.i',
742 'src/_dc.i', 'src/_font.i',
743 'src/_gdiobj.i', 'src/_icon.i',
744 'src/_imaglist.i', 'src/_pen.i',
745 'src/_region.i', 'src/_palette.i',
dd9f7fea 746 'src/_stockobjs.i',
d14a1e28
RD
747 'src/_effects.i',
748 'src/_intl.i',
749 'src/_intl_ex.py',
750 ])
751ext = Extension('_gdi', ['src/drawlist.cpp'] + swig_sources,
1e4a197e
RD
752 include_dirs = includes,
753 define_macros = defines,
754 library_dirs = libdirs,
755 libraries = libs,
756 extra_compile_args = cflags,
757 extra_link_args = lflags,
d14a1e28 758 depends = depends
1e4a197e
RD
759 )
760wxpExtensions.append(ext)
761
762
d14a1e28
RD
763
764
765
766
767# Extension for the windows module
768swig_sources = run_swig(['windows.i'], 'src', GENDIR, PKGDIR,
769 USE_SWIG, swig_force, swig_args, swig_deps +
770 ['src/_windows_rename.i', 'src/_windows_reverse.txt',
771 'src/_panel.i',
d14a1e28
RD
772 'src/_toplvl.i', 'src/_statusbar.i',
773 'src/_splitter.i', 'src/_sashwin.i',
774 'src/_popupwin.i', 'src/_tipwin.i',
775 'src/_vscroll.i', 'src/_taskbar.i',
776 'src/_cmndlgs.i', 'src/_mdi.i',
777 'src/_pywindows.i', 'src/_printfw.i',
778 ])
779ext = Extension('_windows', swig_sources,
1e4a197e
RD
780 include_dirs = includes,
781 define_macros = defines,
782 library_dirs = libdirs,
783 libraries = libs,
784 extra_compile_args = cflags,
785 extra_link_args = lflags,
d14a1e28 786 depends = depends
1e4a197e
RD
787 )
788wxpExtensions.append(ext)
789
790
d14a1e28
RD
791
792
793# Extension for the controls module
794swig_sources = run_swig(['controls.i'], 'src', GENDIR, PKGDIR,
795 USE_SWIG, swig_force, swig_args, swig_deps +
796 [ 'src/_controls_rename.i', 'src/_controls_reverse.txt',
797 'src/_control.i', 'src/_toolbar.i',
798 'src/_button.i', 'src/_checkbox.i',
799 'src/_choice.i', 'src/_combobox.i',
800 'src/_gauge.i', 'src/_statctrls.i',
801 'src/_listbox.i', 'src/_textctrl.i',
802 'src/_scrolbar.i', 'src/_spin.i',
803 'src/_radio.i', 'src/_slider.i',
804 'src/_tglbtn.i', 'src/_notebook.i',
805 'src/_listctrl.i', 'src/_treectrl.i',
806 'src/_dirctrl.i', 'src/_pycontrol.i',
dd9f7fea 807 'src/_cshelp.i', 'src/_dragimg.i',
d14a1e28
RD
808 ])
809ext = Extension('_controls', swig_sources,
810 include_dirs = includes,
811 define_macros = defines,
812 library_dirs = libdirs,
813 libraries = libs,
814 extra_compile_args = cflags,
815 extra_link_args = lflags,
816 depends = depends
817 )
818wxpExtensions.append(ext)
819
820
821
822
823# Extension for the misc module
824swig_sources = run_swig(['misc.i'], 'src', GENDIR, PKGDIR,
825 USE_SWIG, swig_force, swig_args, swig_deps +
826 [ 'src/_settings.i', 'src/_functions.i',
827 'src/_misc.i', 'src/_tipdlg.i',
828 'src/_timer.i', 'src/_log.i',
829 'src/_process.i', 'src/_joystick.i',
830 'src/_wave.i', 'src/_mimetype.i',
831 'src/_artprov.i', 'src/_config.i',
832 'src/_datetime.i', 'src/_dataobj.i',
833 'src/_dnd.i',
834 'src/_clipbrd.i',
835 ])
836ext = Extension('_misc', swig_sources,
837 include_dirs = includes,
838 define_macros = defines,
839 library_dirs = libdirs,
840 libraries = libs,
841 extra_compile_args = cflags,
842 extra_link_args = lflags,
843 depends = depends
844 )
845wxpExtensions.append(ext)
846
847
848
849##
850## Core modules that are not in the "core" namespace start here
851##
852
1e4a197e
RD
853swig_sources = run_swig(['calendar.i'], 'src', GENDIR, PKGDIR,
854 USE_SWIG, swig_force, swig_args, swig_deps)
d14a1e28
RD
855ext = Extension('_calendar', swig_sources,
856 include_dirs = includes,
857 define_macros = defines,
858 library_dirs = libdirs,
859 libraries = libs,
860 extra_compile_args = cflags,
861 extra_link_args = lflags,
862 depends = depends
863 )
864wxpExtensions.append(ext)
865
866
867swig_sources = run_swig(['grid.i'], 'src', GENDIR, PKGDIR,
868 USE_SWIG, swig_force, swig_args, swig_deps)
869ext = Extension('_grid', swig_sources,
1e4a197e
RD
870 include_dirs = includes,
871 define_macros = defines,
872 library_dirs = libdirs,
873 libraries = libs,
874 extra_compile_args = cflags,
875 extra_link_args = lflags,
d14a1e28 876 depends = depends
1e4a197e
RD
877 )
878wxpExtensions.append(ext)
879
880
d14a1e28
RD
881
882swig_sources = run_swig(['html.i'], 'src', GENDIR, PKGDIR,
1e4a197e 883 USE_SWIG, swig_force, swig_args, swig_deps)
d14a1e28 884ext = Extension('_html', swig_sources,
1e4a197e
RD
885 include_dirs = includes,
886 define_macros = defines,
887 library_dirs = libdirs,
888 libraries = libs,
889 extra_compile_args = cflags,
890 extra_link_args = lflags,
d14a1e28 891 depends = depends
1e4a197e
RD
892 )
893wxpExtensions.append(ext)
894
895
d14a1e28 896
1e4a197e
RD
897swig_sources = run_swig(['wizard.i'], 'src', GENDIR, PKGDIR,
898 USE_SWIG, swig_force, swig_args, swig_deps)
d14a1e28 899ext = Extension('_wizard', swig_sources,
1e4a197e
RD
900 include_dirs = includes,
901 define_macros = defines,
902 library_dirs = libdirs,
903 libraries = libs,
904 extra_compile_args = cflags,
905 extra_link_args = lflags,
d14a1e28 906 depends = depends
1e4a197e
RD
907 )
908wxpExtensions.append(ext)
af83019e
RD
909
910
d14a1e28
RD
911
912
913
c368d904
RD
914#----------------------------------------------------------------------
915# Define the GLCanvas extension module
916#----------------------------------------------------------------------
917
1e4a197e 918if BUILD_GLCANVAS:
cfe766c3 919 msg('Preparing GLCANVAS...')
c368d904 920 location = 'contrib/glcanvas'
c368d904 921
d14a1e28 922 swig_sources = run_swig(['glcanvas.i'], location, GENDIR, PKGDIR,
10ef30eb 923 USE_SWIG, swig_force, swig_args, swig_deps)
c368d904
RD
924
925 gl_libs = []
926 if os.name == 'posix':
f32afe1c 927 gl_config = os.popen(WX_CONFIG + ' --gl-libs', 'r').read()[:-1]
1e4a197e 928 gl_lflags = gl_config.split() + lflags
f32afe1c 929 gl_libs = libs
19cf4f80 930 else:
3e46a8e6 931 gl_libs = libs + ['opengl32', 'glu32'] + makeLibName('gl')
f32afe1c 932 gl_lflags = lflags
c368d904 933
d14a1e28 934 ext = Extension('_glcanvas',
3e46a8e6 935 swig_sources,
1e7ecb7b
RD
936
937 include_dirs = includes,
938 define_macros = defines,
939
940 library_dirs = libdirs,
f32afe1c 941 libraries = gl_libs,
1e7ecb7b
RD
942
943 extra_compile_args = cflags,
f32afe1c 944 extra_link_args = gl_lflags,
1e7ecb7b
RD
945 )
946
947 wxpExtensions.append(ext)
c368d904
RD
948
949
950#----------------------------------------------------------------------
951# Define the OGL extension module
952#----------------------------------------------------------------------
953
1e4a197e 954if BUILD_OGL:
cfe766c3 955 msg('Preparing OGL...')
c368d904 956 location = 'contrib/ogl'
c368d904 957
a32360e0 958 swig_sources = run_swig(['ogl.i'], location, GENDIR, PKGDIR,
d14a1e28
RD
959 USE_SWIG, swig_force, swig_args, swig_deps +
960 [ '%s/_oglbasic.i' % location,
961 '%s/_oglshapes.i' % location,
962 '%s/_oglshapes2.i' % location,
963 '%s/_oglcanvas.i' % location,
964 '%s/_ogldefs.i' % location,
965 ])
c368d904 966
d14a1e28 967 ext = Extension('_ogl',
3ef86e32 968 swig_sources,
1e7ecb7b 969
a32360e0 970 include_dirs = includes + [ location ],
dd116e73 971 define_macros = defines + [('wxUSE_DEPRECATED', '0')],
1e7ecb7b
RD
972
973 library_dirs = libdirs,
3ef86e32 974 libraries = libs + makeLibName('ogl'),
1e7ecb7b
RD
975
976 extra_compile_args = cflags,
977 extra_link_args = lflags,
978 )
979
980 wxpExtensions.append(ext)
981
982
c368d904
RD
983
984#----------------------------------------------------------------------
985# Define the STC extension module
986#----------------------------------------------------------------------
987
1e4a197e 988if BUILD_STC:
cfe766c3 989 msg('Preparing STC...')
c368d904 990 location = 'contrib/stc'
5a2a9da2
RD
991 if os.name == 'nt':
992 STC_H = opj(WXDIR, 'contrib', 'include/wx/stc')
993 else:
994 STC_H = opj(WXPREFIX, 'include/wx/stc')
55c020cf 995
3ef86e32 996## NOTE: need to add this to the stc.bkl...
55c020cf 997
3ef86e32
RD
998## # Check if gen_iface needs to be run for the wxSTC sources
999## if (newer(opj(CTRB_SRC, 'stc/stc.h.in'), opj(CTRB_INC, 'stc/stc.h' )) or
1000## newer(opj(CTRB_SRC, 'stc/stc.cpp.in'), opj(CTRB_SRC, 'stc/stc.cpp')) or
1001## newer(opj(CTRB_SRC, 'stc/gen_iface.py'), opj(CTRB_SRC, 'stc/stc.cpp'))):
55c020cf 1002
3ef86e32
RD
1003## msg('Running gen_iface.py, regenerating stc.h and stc.cpp...')
1004## cwd = os.getcwd()
1005## os.chdir(opj(CTRB_SRC, 'stc'))
1006## sys.path.insert(0, os.curdir)
1007## import gen_iface
1008## gen_iface.main([])
1009## os.chdir(cwd)
c368d904
RD
1010
1011
d14a1e28 1012 swig_sources = run_swig(['stc.i'], location, '', PKGDIR,
c368d904
RD
1013 USE_SWIG, swig_force,
1014 swig_args + ['-I'+STC_H, '-I'+location],
10ef30eb 1015 [opj(STC_H, 'stc.h')] + swig_deps)
c368d904 1016
d14a1e28 1017 ext = Extension('_stc',
3ef86e32
RD
1018 swig_sources,
1019
1020 include_dirs = includes,
1021 define_macros = defines,
1e7ecb7b
RD
1022
1023 library_dirs = libdirs,
3ef86e32 1024 libraries = libs + makeLibName('stc'),
c368d904 1025
1e7ecb7b
RD
1026 extra_compile_args = cflags,
1027 extra_link_args = lflags,
1028 )
1029
1030 wxpExtensions.append(ext)
c368d904
RD
1031
1032
1033
926bb76c
RD
1034#----------------------------------------------------------------------
1035# Define the IEWIN extension module (experimental)
1036#----------------------------------------------------------------------
1037
1e4a197e 1038if BUILD_IEWIN:
cfe766c3 1039 msg('Preparing IEWIN...')
926bb76c
RD
1040 location = 'contrib/iewin'
1041
1042 swig_files = ['iewin.i', ]
1043
1044 swig_sources = run_swig(swig_files, location, '', PKGDIR,
10ef30eb 1045 USE_SWIG, swig_force, swig_args, swig_deps)
926bb76c
RD
1046
1047
1048 ext = Extension('iewinc', ['%s/IEHtmlWin.cpp' % location,
c731eb47 1049 '%s/wxactivex.cpp' % location,
926bb76c
RD
1050 ] + swig_sources,
1051
1052 include_dirs = includes,
1053 define_macros = defines,
1054
1055 library_dirs = libdirs,
1056 libraries = libs,
1057
1058 extra_compile_args = cflags,
1059 extra_link_args = lflags,
1060 )
1061
1062 wxpExtensions.append(ext)
1063
1064
d56cebe7
RD
1065#----------------------------------------------------------------------
1066# Define the XRC extension module
1067#----------------------------------------------------------------------
1068
1e4a197e 1069if BUILD_XRC:
cfe766c3 1070 msg('Preparing XRC...')
d56cebe7 1071 location = 'contrib/xrc'
d56cebe7 1072
d14a1e28
RD
1073 swig_sources = run_swig(['xrc.i'], location, '', PKGDIR,
1074 USE_SWIG, swig_force, swig_args, swig_deps +
1075 [ '%s/_xrc_rename.i' % location,
1076 '%s/_xrc_ex.py' % location,
1077 '%s/_xmlres.i' % location,
1078 '%s/_xmlsub.i' % location,
1079 '%s/_xml.i' % location,
1080 '%s/_xmlhandler.i' % location,
1081 ])
1082
1083 ext = Extension('_xrc',
3ef86e32 1084 swig_sources,
1fded56b 1085
3ef86e32 1086 include_dirs = includes,
d56cebe7
RD
1087 define_macros = defines,
1088
1089 library_dirs = libdirs,
3ef86e32 1090 libraries = libs + makeLibName('xrc'),
d56cebe7
RD
1091
1092 extra_compile_args = cflags,
1093 extra_link_args = lflags,
1094 )
1095
1096 wxpExtensions.append(ext)
1097
1098
1099
ebf4302c
RD
1100#----------------------------------------------------------------------
1101# Define the GIZMOS extension module
1102#----------------------------------------------------------------------
1103
1e4a197e 1104if BUILD_GIZMOS:
ebf4302c
RD
1105 msg('Preparing GIZMOS...')
1106 location = 'contrib/gizmos'
ebf4302c 1107
a32360e0 1108 swig_sources = run_swig(['gizmos.i'], location, GENDIR, PKGDIR,
10ef30eb 1109 USE_SWIG, swig_force, swig_args, swig_deps)
ebf4302c 1110
d14a1e28 1111 ext = Extension('_gizmos',
d84a9306 1112 [ '%s/treelistctrl.cpp' % location ] + swig_sources,
ebf4302c 1113
a32360e0 1114 include_dirs = includes + [ location ],
ebf4302c
RD
1115 define_macros = defines,
1116
1117 library_dirs = libdirs,
3ef86e32 1118 libraries = libs + makeLibName('gizmos'),
ebf4302c
RD
1119
1120 extra_compile_args = cflags,
1121 extra_link_args = lflags,
1122 )
1123
1124 wxpExtensions.append(ext)
1125
1126
1127
4a61305d
RD
1128#----------------------------------------------------------------------
1129# Define the DLLWIDGET extension module
1130#----------------------------------------------------------------------
1131
1e4a197e 1132if BUILD_DLLWIDGET:
4a61305d
RD
1133 msg('Preparing DLLWIDGET...')
1134 location = 'contrib/dllwidget'
1135 swig_files = ['dllwidget_.i']
1136
1137 swig_sources = run_swig(swig_files, location, '', PKGDIR,
10ef30eb 1138 USE_SWIG, swig_force, swig_args, swig_deps)
4a61305d
RD
1139
1140 # copy a contrib project specific py module to the main package dir
1141 copy_file(opj(location, 'dllwidget.py'), PKGDIR, update=1, verbose=0)
1142
1143 ext = Extension('dllwidget_c', [
1144 '%s/dllwidget.cpp' % location,
1145 ] + swig_sources,
1146
1147 include_dirs = includes,
1148 define_macros = defines,
1149
1150 library_dirs = libdirs,
1151 libraries = libs,
1152
1153 extra_compile_args = cflags,
1154 extra_link_args = lflags,
1155 )
1156
1157 wxpExtensions.append(ext)
1158
1159
1e4a197e
RD
1160
1161
1162#----------------------------------------------------------------------
1163# Tools and scripts
1164#----------------------------------------------------------------------
8916d007 1165
2eb31f8b
RD
1166if NO_SCRIPTS:
1167 SCRIPTS = None
1168else:
1e4a197e
RD
1169 SCRIPTS = [opj('scripts/helpviewer'),
1170 opj('scripts/img2png'),
2eb31f8b
RD
1171 opj('scripts/img2xpm'),
1172 opj('scripts/img2py'),
1173 opj('scripts/xrced'),
1174 opj('scripts/pyshell'),
1175 opj('scripts/pycrust'),
1fded56b
RD
1176 opj('scripts/pywrap'),
1177 opj('scripts/pywrap'),
1178 opj('scripts/pyalacarte'),
1179 opj('scripts/pyalamode'),
2eb31f8b 1180 ]
4a61305d 1181
926bb76c 1182
1fded56b
RD
1183DATA_FILES += find_data_files('wxPython/tools/XRCed', '*.txt', '*.xrc')
1184DATA_FILES += find_data_files('wxPython/py', '*.txt', '*.ico', '*.css', '*.html')
1185DATA_FILES += find_data_files('wx', '*.txt', '*.css', '*.html')
1e4a197e
RD
1186
1187
c368d904
RD
1188#----------------------------------------------------------------------
1189# Do the Setup/Build/Install/Whatever
1190#----------------------------------------------------------------------
1191
1b62f00d 1192if __name__ == "__main__":
1e4a197e 1193 if not PREP_ONLY:
d14a1e28 1194 setup(name = 'wxPython',
1b62f00d
RD
1195 version = VERSION,
1196 description = DESCRIPTION,
1197 long_description = LONG_DESCRIPTION,
1198 author = AUTHOR,
1199 author_email = AUTHOR_EMAIL,
1200 url = URL,
851d4ac7 1201 download_url = DOWNLOAD_URL,
e2e02194 1202 license = LICENSE,
851d4ac7
RD
1203 platforms = PLATFORMS,
1204 classifiers = filter(None, CLASSIFIERS.split("\n")),
1205 keywords = KEYWORDS,
d14a1e28 1206
1fded56b
RD
1207 packages = ['wxPython',
1208 'wxPython.lib',
1209 'wxPython.lib.colourchooser',
1210 'wxPython.lib.editor',
1211 'wxPython.lib.mixins',
1fded56b 1212 'wxPython.tools',
1fded56b
RD
1213
1214 'wx',
1215 'wx.lib',
1216 'wx.lib.colourchooser',
1217 'wx.lib.editor',
1218 'wx.lib.mixins',
1219 'wx.py',
d14a1e28 1220 'wx.py.wxd',
1fded56b
RD
1221 'wx.tools',
1222 'wx.tools.XRCed',
1b62f00d
RD
1223 ],
1224
1225 ext_package = PKGDIR,
1226 ext_modules = wxpExtensions,
8916d007 1227
f6f98ecc 1228 options = { 'build' : { 'build_base' : BUILD_BASE }},
a541c325 1229
b817523b 1230 scripts = SCRIPTS,
c368d904 1231
1e4a197e
RD
1232 cmdclass = { 'install_data': smart_install_data},
1233 data_files = DATA_FILES,
8916d007 1234
1b62f00d 1235 )
c368d904 1236
c368d904 1237
c368d904
RD
1238#----------------------------------------------------------------------
1239#----------------------------------------------------------------------