]> git.saurik.com Git - wxWidgets.git/blob - wxPython/setup.py
Update copyright year
[wxWidgets.git] / wxPython / setup.py
1 #!/usr/bin/env python
2 #----------------------------------------------------------------------
3 # Name: setup.py
4 # Purpose: Distutils script for building wxPython
5 #
6 # Author: Robin Dunn
7 #
8 # Created: 12-Oct-2000
9 # RCS-ID: $Id$
10 # Copyright: (c) 2000 by Total Control Software
11 # Licence: wxWindows license
12 #----------------------------------------------------------------------
13
14 import sys, os
15
16
17 # The full contents of the wx.build.config module used to be located
18 # here in setup.py. They were split into a separate module so it will
19 # be installed with wxPython and can then be used by the build scripts
20 # of other extension modules that wish to be wxPython compatible.
21 # The split is still fairly new and hasn't been tested by building
22 # third-party extensions yet, so expect some things to still shift
23 # back and forth, and also more stuff in config.py will get converted
24 # to functions, etc.
25
26 # This script imports it as just "config" because if wxPython doesn't
27 # exist yet, then it can't be imported from wx.build.config (since
28 # wx._core doesn't exist yet.) So instead we keep the main copy of
29 # config .py in the same place as setup.py, and then copy it to
30 # wx/build as needed below.
31
32 # To fully support external builds, we need to have a build options
33 # file that is created whenever a new wxPython build is performed.
34 # We happen to be doing that here in this script, so make sure to
35 # remove the build_options.py file, so that config.py will recreate it.
36
37 for bo_name in ["build_options.py", "build_options.pyc"]:
38 if os.path.exists(bo_name):
39 os.remove(bo_name)
40
41 sys.setup_is_main = __name__ == "__main__" # an icky hack!
42 from config import *
43
44
45 #----------------------------------------------------------------------
46 # Update the packaged config file.
47 #----------------------------------------------------------------------
48
49 copy_file('config.py', 'wx/build', update=1, verbose=1)
50 copy_file('build_options.py', 'wx/build', update=1, verbose=1)
51 CLEANUP.append('wx/build/config.py')
52 CLEANUP.append('wx/build/build_options.py')
53
54 #----------------------------------------------------------------------
55 # Update the version file
56 #----------------------------------------------------------------------
57
58 # The version file is unconditionally updated every time setup.py is
59 # run since the version string can change based on the UNICODE flag
60
61 open('wx/__version__.py', 'w').write("""\
62 # This file was generated by setup.py...
63
64 VERSION_STRING = '%(VERSION)s'
65 MAJOR_VERSION = %(VER_MAJOR)s
66 MINOR_VERSION = %(VER_MINOR)s
67 RELEASE_VERSION = %(VER_RELEASE)s
68 SUBREL_VERSION = %(VER_SUBREL)s
69
70 VERSION = (MAJOR_VERSION, MINOR_VERSION, RELEASE_VERSION,
71 SUBREL_VERSION, '%(VER_FLAGS)s')
72
73 RELEASE_NUMBER = RELEASE_VERSION # for compatibility
74 """ % globals())
75
76 CLEANUP.append('wx/__version__.py')
77
78
79 #----------------------------------------------------------------------
80 # patch distutils if it can't cope with the "classifiers" or
81 # "download_url" keywords
82 #----------------------------------------------------------------------
83
84 if sys.version < '2.2.3':
85 from distutils.dist import DistributionMetadata
86 DistributionMetadata.classifiers = None
87 DistributionMetadata.download_url = None
88 depends = {}
89 else:
90 depends = {'depends' : depends}
91
92
93 #----------------------------------------------------------------------
94 # Define the CORE extension module
95 #----------------------------------------------------------------------
96
97 msg('Preparing CORE...')
98 swig_sources = run_swig(['core.i'], 'src', GENDIR, PKGDIR,
99 USE_SWIG, swig_force, swig_args, swig_deps +
100 [ 'src/_accel.i',
101 'src/_app.i',
102 'src/_app_ex.py',
103 'src/_constraints.i',
104 'src/_core_api.i',
105 'src/_core_ex.py',
106 'src/__core_rename.i',
107 'src/__core_reverse.txt',
108 'src/_defs.i',
109 'src/_event.i',
110 'src/_event_ex.py',
111 'src/_evtloop.i',
112 'src/_evthandler.i',
113 'src/_filesys.i',
114 'src/_gdicmn.i',
115 'src/_image.i',
116 'src/_menu.i',
117 'src/_obj.i',
118 'src/_sizers.i',
119 'src/_gbsizer.i',
120 'src/_streams.i',
121 'src/_validator.i',
122 'src/_window.i',
123 'src/_control.i',
124 ],
125 True)
126
127 copy_file('src/__init__.py', PKGDIR, update=1, verbose=0)
128 CLEANUP.append(opj(PKGDIR, '__init__.py'))
129
130
131 # update the license files
132 mkpath('licence')
133 for file in ['preamble.txt', 'licence.txt', 'licendoc.txt', 'lgpl.txt']:
134 copy_file(opj(WXDIR, 'docs', file), opj('licence',file), update=1, verbose=0)
135 CLEANUP.append(opj('licence',file))
136 CLEANUP.append('licence')
137
138
139 if os.name == 'nt':
140 build_locale_dir(opj(PKGDIR, 'locale'))
141 DATA_FILES += build_locale_list(opj(PKGDIR, 'locale'))
142
143
144 if os.name == 'nt':
145 rc_file = ['src/wxc.rc']
146 else:
147 rc_file = []
148
149
150 ext = Extension('_core_', ['src/helpers.cpp',
151 ] + rc_file + swig_sources,
152
153 include_dirs = includes,
154 define_macros = defines,
155
156 library_dirs = libdirs,
157 libraries = libs,
158
159 extra_compile_args = cflags,
160 extra_link_args = lflags,
161
162 **depends
163 )
164 wxpExtensions.append(ext)
165
166
167
168
169
170 # Extension for the GDI module
171 swig_sources = run_swig(['gdi.i'], 'src', GENDIR, PKGDIR,
172 USE_SWIG, swig_force, swig_args, swig_deps +
173 ['src/__gdi_rename.i',
174 'src/_bitmap.i',
175 'src/_colour.i',
176 'src/_dc.i',
177 'src/_gdiobj.i',
178 'src/_imaglist.i',
179 'src/_region.i',
180 'src/_stockobjs.i',
181 'src/_effects.i',
182 'src/_intl.i',
183 'src/_intl_ex.py',
184 'src/_brush.i',
185 'src/_cursor.i',
186 'src/_font.i',
187 'src/_icon.i',
188 'src/_pen.i',
189 'src/_palette.i',
190 'src/_renderer.i',
191 ],
192 True)
193 ext = Extension('_gdi_', ['src/drawlist.cpp'] + swig_sources,
194 include_dirs = includes,
195 define_macros = defines,
196 library_dirs = libdirs,
197 libraries = libs,
198 extra_compile_args = cflags,
199 extra_link_args = lflags,
200 **depends
201 )
202 wxpExtensions.append(ext)
203
204
205
206
207
208
209 # Extension for the windows module
210 swig_sources = run_swig(['windows.i'], 'src', GENDIR, PKGDIR,
211 USE_SWIG, swig_force, swig_args, swig_deps +
212 ['src/__windows_rename.i',
213 'src/__windows_reverse.txt',
214 'src/_panel.i',
215 'src/_toplvl.i',
216 'src/_statusbar.i',
217 'src/_splitter.i',
218 'src/_sashwin.i',
219 'src/_popupwin.i',
220 'src/_tipwin.i',
221 'src/_vscroll.i',
222 'src/_taskbar.i',
223 'src/_cmndlgs.i',
224 'src/_mdi.i',
225 'src/_pywindows.i',
226 'src/_printfw.i',
227 ],
228 True)
229 ext = Extension('_windows_', swig_sources,
230 include_dirs = includes,
231 define_macros = defines,
232 library_dirs = libdirs,
233 libraries = libs,
234 extra_compile_args = cflags,
235 extra_link_args = lflags,
236 **depends
237 )
238 wxpExtensions.append(ext)
239
240
241
242
243 # Extension for the controls module
244 swig_sources = run_swig(['controls.i'], 'src', GENDIR, PKGDIR,
245 USE_SWIG, swig_force, swig_args, swig_deps +
246 [ 'src/__controls_rename.i',
247 'src/__controls_reverse.txt',
248 'src/_toolbar.i',
249 'src/_button.i',
250 'src/_checkbox.i',
251 'src/_choice.i',
252 'src/_combobox.i',
253 'src/_gauge.i',
254 'src/_statctrls.i',
255 'src/_listbox.i',
256 'src/_textctrl.i',
257 'src/_scrolbar.i',
258 'src/_spin.i',
259 'src/_radio.i',
260 'src/_slider.i',
261 'src/_tglbtn.i',
262 'src/_notebook.i',
263 'src/_listctrl.i',
264 'src/_treectrl.i',
265 'src/_dirctrl.i',
266 'src/_pycontrol.i',
267 'src/_cshelp.i',
268 'src/_dragimg.i',
269 'src/_datectrl.i',
270 ],
271 True)
272 ext = Extension('_controls_', swig_sources,
273 include_dirs = includes,
274 define_macros = defines,
275 library_dirs = libdirs,
276 libraries = libs,
277 extra_compile_args = cflags,
278 extra_link_args = lflags,
279 **depends
280 )
281 wxpExtensions.append(ext)
282
283
284
285
286 # Extension for the misc module
287 swig_sources = run_swig(['misc.i'], 'src', GENDIR, PKGDIR,
288 USE_SWIG, swig_force, swig_args, swig_deps +
289 [ 'src/__misc_rename.i',
290 'src/__misc_reverse.txt',
291 'src/_settings.i',
292 'src/_functions.i',
293 'src/_misc.i',
294 'src/_tipdlg.i',
295 'src/_timer.i',
296 'src/_log.i',
297 'src/_process.i',
298 'src/_joystick.i',
299 'src/_sound.i',
300 'src/_mimetype.i',
301 'src/_artprov.i',
302 'src/_config.i',
303 'src/_datetime.i',
304 'src/_dataobj.i',
305 'src/_dnd.i',
306 'src/_display.i',
307 'src/_clipbrd.i',
308 'src/_stdpaths.i',
309 ],
310 True)
311 ext = Extension('_misc_', swig_sources,
312 include_dirs = includes,
313 define_macros = defines,
314 library_dirs = libdirs,
315 libraries = libs,
316 extra_compile_args = cflags,
317 extra_link_args = lflags,
318 **depends
319 )
320 wxpExtensions.append(ext)
321
322
323
324 ##
325 ## Core modules that are not in the "core" namespace start here
326 ##
327
328 swig_sources = run_swig(['calendar.i'], 'src', GENDIR, PKGDIR,
329 USE_SWIG, swig_force, swig_args, swig_deps)
330 ext = Extension('_calendar', swig_sources,
331 include_dirs = includes,
332 define_macros = defines,
333 library_dirs = libdirs,
334 libraries = libs,
335 extra_compile_args = cflags,
336 extra_link_args = lflags,
337 **depends
338 )
339 wxpExtensions.append(ext)
340
341
342 swig_sources = run_swig(['grid.i'], 'src', GENDIR, PKGDIR,
343 USE_SWIG, swig_force, swig_args, swig_deps)
344 ext = Extension('_grid', swig_sources,
345 include_dirs = includes,
346 define_macros = defines,
347 library_dirs = libdirs,
348 libraries = libs,
349 extra_compile_args = cflags,
350 extra_link_args = lflags,
351 **depends
352 )
353 wxpExtensions.append(ext)
354
355
356
357 swig_sources = run_swig(['html.i'], 'src', GENDIR, PKGDIR,
358 USE_SWIG, swig_force, swig_args, swig_deps)
359 ext = Extension('_html', swig_sources,
360 include_dirs = includes,
361 define_macros = defines,
362 library_dirs = libdirs,
363 libraries = libs,
364 extra_compile_args = cflags,
365 extra_link_args = lflags,
366 **depends
367 )
368 wxpExtensions.append(ext)
369
370
371 mediaLibs = libs[:]
372 if not MONOLITHIC and os.name == 'nt':
373 mediaLibs.append(makeLibName('media')[0])
374 swig_sources = run_swig(['media.i'], 'src', GENDIR, PKGDIR,
375 USE_SWIG, swig_force, swig_args, swig_deps)
376 ext = Extension('_media', swig_sources,
377 include_dirs = includes,
378 define_macros = defines,
379 library_dirs = libdirs,
380 libraries = mediaLibs,
381 extra_compile_args = cflags,
382 extra_link_args = lflags,
383 **depends
384 )
385 wxpExtensions.append(ext)
386
387
388 swig_sources = run_swig(['webkit.i'], 'src', GENDIR, PKGDIR,
389 USE_SWIG, swig_force, swig_args, swig_deps)
390 ext = Extension('_webkit', swig_sources,
391 include_dirs = includes,
392 define_macros = defines,
393 library_dirs = libdirs,
394 libraries = libs,
395 extra_compile_args = cflags,
396 extra_link_args = lflags,
397 **depends
398 )
399 wxpExtensions.append(ext)
400
401
402
403 swig_sources = run_swig(['wizard.i'], 'src', GENDIR, PKGDIR,
404 USE_SWIG, swig_force, swig_args, swig_deps)
405 ext = Extension('_wizard', swig_sources,
406 include_dirs = includes,
407 define_macros = defines,
408 library_dirs = libdirs,
409 libraries = libs,
410 extra_compile_args = cflags,
411 extra_link_args = lflags,
412 **depends
413 )
414 wxpExtensions.append(ext)
415
416
417
418 swig_sources = run_swig(['xrc.i'], 'src', GENDIR, PKGDIR,
419 USE_SWIG, swig_force, swig_args, swig_deps +
420 [ 'src/_xrc_rename.i',
421 'src/_xrc_ex.py',
422 'src/_xmlres.i',
423 'src/_xmlsub.i',
424 'src/_xml.i',
425 'src/_xmlhandler.i',
426 ])
427 ext = Extension('_xrc',
428 swig_sources,
429
430 include_dirs = includes + CONTRIBS_INC,
431 define_macros = defines,
432
433 library_dirs = libdirs,
434 libraries = libs,
435
436 extra_compile_args = cflags,
437 extra_link_args = lflags,
438 )
439 wxpExtensions.append(ext)
440
441
442 #----------------------------------------------------------------------
443 # Define the GLCanvas extension module
444 #----------------------------------------------------------------------
445
446 if BUILD_GLCANVAS:
447 msg('Preparing GLCANVAS...')
448 location = 'contrib/glcanvas'
449
450 swig_sources = run_swig(['glcanvas.i'], location, GENDIR, PKGDIR,
451 USE_SWIG, swig_force, swig_args, swig_deps)
452
453 gl_libs = []
454 if os.name == 'posix':
455 gl_config = os.popen(WX_CONFIG + ' --libs gl', 'r').read()[:-1]
456 gl_lflags = gl_config.split() + lflags
457 gl_libs = libs
458 else:
459 gl_libs = libs + ['opengl32', 'glu32'] + makeLibName('gl')
460 gl_lflags = lflags
461
462 ext = Extension('_glcanvas',
463 swig_sources,
464
465 include_dirs = includes + CONTRIBS_INC,
466 define_macros = defines,
467
468 library_dirs = libdirs,
469 libraries = gl_libs,
470
471 extra_compile_args = cflags,
472 extra_link_args = gl_lflags,
473 )
474
475 wxpExtensions.append(ext)
476
477
478 #----------------------------------------------------------------------
479 # Define the OGL extension module
480 #----------------------------------------------------------------------
481
482 if BUILD_OGL:
483 msg('Preparing OGL...')
484 location = 'contrib/ogl'
485
486 swig_sources = run_swig(['ogl.i'], location, GENDIR, PKGDIR,
487 USE_SWIG, swig_force, swig_args, swig_deps +
488 [ '%s/_oglbasic.i' % location,
489 '%s/_oglshapes.i' % location,
490 '%s/_oglshapes2.i' % location,
491 '%s/_oglcanvas.i' % location,
492 '%s/_ogldefs.i' % location,
493 ])
494
495 ext = Extension('_ogl',
496 swig_sources,
497
498 include_dirs = includes + [ location ] + CONTRIBS_INC,
499 define_macros = defines + [('wxUSE_DEPRECATED', '0')],
500
501 library_dirs = libdirs,
502 libraries = libs + makeLibName('ogl'),
503
504 extra_compile_args = cflags,
505 extra_link_args = lflags,
506 )
507
508 wxpExtensions.append(ext)
509
510
511
512 #----------------------------------------------------------------------
513 # Define the STC extension module
514 #----------------------------------------------------------------------
515
516 if BUILD_STC:
517 msg('Preparing STC...')
518 location = 'contrib/stc'
519 #if os.name == 'nt':
520 STC_H = opj(WXDIR, 'contrib', 'include/wx/stc')
521 #else:
522 # STC_H = opj(WXPREFIX, 'include/wx-%d.%d/wx/stc' % (VER_MAJOR, VER_MINOR))
523
524 ## NOTE: need to add something like this to the stc.bkl...
525
526 ## # Check if gen_iface needs to be run for the wxSTC sources
527 ## if (newer(opj(CTRB_SRC, 'stc/stc.h.in'), opj(CTRB_INC, 'stc/stc.h' )) or
528 ## newer(opj(CTRB_SRC, 'stc/stc.cpp.in'), opj(CTRB_SRC, 'stc/stc.cpp')) or
529 ## newer(opj(CTRB_SRC, 'stc/gen_iface.py'), opj(CTRB_SRC, 'stc/stc.cpp'))):
530
531 ## msg('Running gen_iface.py, regenerating stc.h and stc.cpp...')
532 ## cwd = os.getcwd()
533 ## os.chdir(opj(CTRB_SRC, 'stc'))
534 ## sys.path.insert(0, os.curdir)
535 ## import gen_iface
536 ## gen_iface.main([])
537 ## os.chdir(cwd)
538
539
540 swig_sources = run_swig(['stc.i'], location, GENDIR, PKGDIR,
541 USE_SWIG, swig_force,
542 swig_args + ['-I'+STC_H, '-I'+location],
543 [opj(STC_H, 'stc.h'),
544 opj(location, "_stc_utf8_methods.py"),
545 opj(location, "_stc_docstrings.i"),
546 opj(location, "_stc_gendocs.i"),
547 ] + swig_deps)
548
549 ext = Extension('_stc',
550 swig_sources,
551
552 include_dirs = includes + CONTRIBS_INC,
553 define_macros = defines,
554
555 library_dirs = libdirs,
556 libraries = libs + makeLibName('stc'),
557
558 extra_compile_args = cflags,
559 extra_link_args = lflags,
560 )
561
562 wxpExtensions.append(ext)
563
564
565 #----------------------------------------------------------------------
566 # Define the ACTIVEX extension module (experimental)
567 #----------------------------------------------------------------------
568
569 if BUILD_ACTIVEX:
570 msg('Preparing ACTIVEX...')
571 location = 'contrib/activex'
572 axloc = opj(location, "wxie")
573
574 swig_files = ['activex.i', ]
575
576 swig_sources = run_swig(swig_files, location, '', PKGDIR,
577 USE_SWIG, swig_force, swig_args, swig_deps +
578 [ '%s/_activex_ex.py' % location])
579
580
581 ext = Extension('_activex', ['%s/IEHtmlWin.cpp' % axloc,
582 '%s/wxactivex.cpp' % axloc,
583 ] + swig_sources,
584
585 include_dirs = includes + [ axloc ],
586 define_macros = defines,
587
588 library_dirs = libdirs,
589 libraries = libs,
590
591 extra_compile_args = cflags,
592 extra_link_args = lflags,
593 )
594
595 wxpExtensions.append(ext)
596
597
598 #----------------------------------------------------------------------
599 # Define the GIZMOS extension module
600 #----------------------------------------------------------------------
601
602 if BUILD_GIZMOS:
603 msg('Preparing GIZMOS...')
604 location = 'contrib/gizmos'
605
606 swig_sources = run_swig(['gizmos.i'], location, GENDIR, PKGDIR,
607 USE_SWIG, swig_force, swig_args, swig_deps)
608
609 ext = Extension('_gizmos',
610 [ '%s/treelistctrl.cpp' % opj(location, 'wxCode/src') ] + swig_sources,
611
612 include_dirs = includes + [ location, opj(location, 'wxCode/include') ] + CONTRIBS_INC,
613 define_macros = defines,
614
615 library_dirs = libdirs,
616 libraries = libs + makeLibName('gizmos'),
617
618 extra_compile_args = cflags,
619 extra_link_args = lflags,
620 )
621
622 wxpExtensions.append(ext)
623
624
625 #----------------------------------------------------------------------
626 # Define the ANIMATE extension module
627 #----------------------------------------------------------------------
628
629 if BUILD_ANIMATE:
630 msg('Preparing ANIMATE...')
631 location = 'contrib/animate'
632
633 swig_sources = run_swig(['animate.i'], location, GENDIR, PKGDIR,
634 USE_SWIG, swig_force, swig_args, swig_deps)
635
636 ext = Extension('_animate',
637 swig_sources,
638
639 include_dirs = includes + CONTRIBS_INC,
640 define_macros = defines,
641
642 library_dirs = libdirs,
643 libraries = libs + makeLibName('animate'),
644
645 extra_compile_args = cflags,
646 extra_link_args = lflags,
647 )
648
649 wxpExtensions.append(ext)
650
651
652
653 #----------------------------------------------------------------------
654 # Define the DLLWIDGET extension module
655 #----------------------------------------------------------------------
656
657 if BUILD_DLLWIDGET:
658 msg('Preparing DLLWIDGET...')
659 location = 'contrib/dllwidget'
660 swig_files = ['dllwidget_.i']
661
662 swig_sources = run_swig(swig_files, location, '', PKGDIR,
663 USE_SWIG, swig_force, swig_args, swig_deps)
664
665 # copy a contrib project specific py module to the main package dir
666 copy_file(opj(location, 'dllwidget.py'), PKGDIR, update=1, verbose=0)
667 CLEANUP.append(opj(PKGDIR, 'dllwidget.py'))
668
669 ext = Extension('dllwidget_c', [
670 '%s/dllwidget.cpp' % location,
671 ] + swig_sources,
672
673 include_dirs = includes + CONTRIBS_INC,
674 define_macros = defines,
675
676 library_dirs = libdirs,
677 libraries = libs,
678
679 extra_compile_args = cflags,
680 extra_link_args = lflags,
681 )
682
683 wxpExtensions.append(ext)
684
685
686
687
688 #----------------------------------------------------------------------
689 # Tools, scripts data files, etc.
690 #----------------------------------------------------------------------
691
692 if NO_SCRIPTS:
693 SCRIPTS = None
694 else:
695 SCRIPTS = [opj('scripts/helpviewer'),
696 opj('scripts/img2png'),
697 opj('scripts/img2py'),
698 opj('scripts/img2xpm'),
699 opj('scripts/pyalacarte'),
700 opj('scripts/pyalamode'),
701 opj('scripts/pycrust'),
702 opj('scripts/pyshell'),
703 opj('scripts/pywrap'),
704 opj('scripts/pywrap'),
705 opj('scripts/pywxrc'),
706 opj('scripts/xrced'),
707 ]
708
709
710
711 DATA_FILES += find_data_files('wx/tools/XRCed', '*.txt', '*.xrc')
712 DATA_FILES += find_data_files('wx/py', '*.txt', '*.ico', '*.css', '*.html')
713 DATA_FILES += find_data_files('wx', '*.txt', '*.css', '*.html')
714
715
716 if NO_HEADERS:
717 HEADERS = None
718 else:
719 h_files = glob.glob(opj("include/wx/wxPython/*.h"))
720 i_files = glob.glob(opj("src/*.i")) + \
721 glob.glob(opj("src/_*.py")) + \
722 glob.glob(opj("src/*.swg"))
723
724 HEADERS = zip(h_files, ["/wxPython"]*len(h_files)) + \
725 zip(i_files, ["/wxPython/i_files"]*len(i_files))
726
727
728
729 if INSTALL_MULTIVERSION:
730 EXTRA_PATH = getExtraPath(addOpts=EP_ADD_OPTS)
731 open("src/wx.pth", "w").write(EXTRA_PATH)
732 CLEANUP.append("src/wx.pth")
733 else:
734 EXTRA_PATH = None
735
736
737
738 #----------------------------------------------------------------------
739 # Do the Setup/Build/Install/Whatever
740 #----------------------------------------------------------------------
741
742 if __name__ == "__main__":
743 if not PREP_ONLY:
744
745 setup(name = 'wxPython',
746 version = VERSION,
747 description = DESCRIPTION,
748 long_description = LONG_DESCRIPTION,
749 author = AUTHOR,
750 author_email = AUTHOR_EMAIL,
751 url = URL,
752 download_url = DOWNLOAD_URL,
753 license = LICENSE,
754 platforms = PLATFORMS,
755 classifiers = filter(None, CLASSIFIERS.split("\n")),
756 keywords = KEYWORDS,
757
758 packages = ['wxPython',
759 'wxPython.lib',
760 'wxPython.lib.colourchooser',
761 'wxPython.lib.editor',
762 'wxPython.lib.mixins',
763 'wxPython.tools',
764
765 'wx',
766 'wx.build',
767 'wx.lib',
768 'wx.lib.colourchooser',
769 'wx.lib.editor',
770 'wx.lib.floatcanvas',
771 'wx.lib.masked',
772 'wx.lib.mixins',
773 'wx.lib.ogl',
774 'wx.py',
775 'wx.tools',
776 'wx.tools.XRCed',
777 ],
778
779 extra_path = EXTRA_PATH,
780
781 ext_package = PKGDIR,
782 ext_modules = wxpExtensions,
783
784 options = { 'build' : { 'build_base' : BUILD_BASE },
785 },
786
787 scripts = SCRIPTS,
788 data_files = DATA_FILES,
789 headers = HEADERS,
790
791 # Override some of the default distutils command classes with my own
792 cmdclass = { 'install' : wx_install,
793 'install_data': wx_smart_install_data,
794 'install_headers': wx_install_headers,
795 'clean': wx_extra_clean,
796 },
797 )
798
799
800 if INSTALL_MULTIVERSION:
801 setup(name = 'wxPython-common',
802 version = VERSION,
803 description = DESCRIPTION,
804 long_description = LONG_DESCRIPTION,
805 author = AUTHOR,
806 author_email = AUTHOR_EMAIL,
807 url = URL,
808 download_url = DOWNLOAD_URL,
809 license = LICENSE,
810 platforms = PLATFORMS,
811 classifiers = filter(None, CLASSIFIERS.split("\n")),
812 keywords = KEYWORDS,
813
814 package_dir = { '': 'wxversion' },
815 py_modules = ['wxversion'],
816
817 data_files = [('', ['src/wx.pth'])],
818
819 options = { 'build' : { 'build_base' : BUILD_BASE },
820 },
821
822 cmdclass = { 'install_data': wx_smart_install_data,
823 },
824 )
825
826 #----------------------------------------------------------------------
827 #----------------------------------------------------------------------