]> git.saurik.com Git - wxWidgets.git/blob - wxPython/setup.py
cleanup - heavy reformatting
[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 'src/_swigtype.i',
125 ],
126 True)
127
128 copy_file('src/__init__.py', PKGDIR, update=1, verbose=0)
129 CLEANUP.append(opj(PKGDIR, '__init__.py'))
130
131
132 # update the license files
133 mkpath('licence')
134 for file in ['preamble.txt', 'licence.txt', 'licendoc.txt', 'lgpl.txt']:
135 copy_file(opj(WXDIR, 'docs', file), opj('licence',file), update=1, verbose=0)
136 CLEANUP.append(opj('licence',file))
137 CLEANUP.append('licence')
138
139
140 if os.name == 'nt':
141 build_locale_dir(opj(PKGDIR, 'locale'))
142 DATA_FILES += build_locale_list(opj(PKGDIR, 'locale'))
143
144
145 if os.name == 'nt':
146 rc_file = ['src/wxc.rc']
147 else:
148 rc_file = []
149
150
151 ext = Extension('_core_', ['src/helpers.cpp',
152 ] + rc_file + swig_sources,
153
154 include_dirs = includes,
155 define_macros = defines,
156
157 library_dirs = libdirs,
158 libraries = libs,
159
160 extra_compile_args = cflags,
161 extra_link_args = lflags,
162
163 **depends
164 )
165 wxpExtensions.append(ext)
166
167
168
169
170
171 # Extension for the GDI module
172 swig_sources = run_swig(['gdi.i'], 'src', GENDIR, PKGDIR,
173 USE_SWIG, swig_force, swig_args, swig_deps +
174 ['src/__gdi_rename.i',
175 'src/_bitmap.i',
176 'src/_colour.i',
177 'src/_dc.i',
178 'src/_gdiobj.i',
179 'src/_imaglist.i',
180 'src/_region.i',
181 'src/_stockobjs.i',
182 'src/_effects.i',
183 'src/_intl.i',
184 'src/_intl_ex.py',
185 'src/_brush.i',
186 'src/_cursor.i',
187 'src/_font.i',
188 'src/_icon.i',
189 'src/_pen.i',
190 'src/_palette.i',
191 'src/_renderer.i',
192 ],
193 True)
194 ext = Extension('_gdi_', ['src/drawlist.cpp'] + swig_sources,
195 include_dirs = includes,
196 define_macros = defines,
197 library_dirs = libdirs,
198 libraries = libs,
199 extra_compile_args = cflags,
200 extra_link_args = lflags,
201 **depends
202 )
203 wxpExtensions.append(ext)
204
205
206
207
208
209
210 # Extension for the windows module
211 swig_sources = run_swig(['windows.i'], 'src', GENDIR, PKGDIR,
212 USE_SWIG, swig_force, swig_args, swig_deps +
213 ['src/__windows_rename.i',
214 'src/__windows_reverse.txt',
215 'src/_panel.i',
216 'src/_toplvl.i',
217 'src/_statusbar.i',
218 'src/_splitter.i',
219 'src/_sashwin.i',
220 'src/_popupwin.i',
221 'src/_tipwin.i',
222 'src/_vscroll.i',
223 'src/_taskbar.i',
224 'src/_cmndlgs.i',
225 'src/_mdi.i',
226 'src/_pywindows.i',
227 'src/_printfw.i',
228 ],
229 True)
230 ext = Extension('_windows_', swig_sources,
231 include_dirs = includes,
232 define_macros = defines,
233 library_dirs = libdirs,
234 libraries = libs,
235 extra_compile_args = cflags,
236 extra_link_args = lflags,
237 **depends
238 )
239 wxpExtensions.append(ext)
240
241
242
243
244 # Extension for the controls module
245 swig_sources = run_swig(['controls.i'], 'src', GENDIR, PKGDIR,
246 USE_SWIG, swig_force, swig_args, swig_deps +
247 [ 'src/__controls_rename.i',
248 'src/__controls_reverse.txt',
249 'src/_toolbar.i',
250 'src/_button.i',
251 'src/_checkbox.i',
252 'src/_choice.i',
253 'src/_combobox.i',
254 'src/_gauge.i',
255 'src/_statctrls.i',
256 'src/_listbox.i',
257 'src/_textctrl.i',
258 'src/_scrolbar.i',
259 'src/_spin.i',
260 'src/_radio.i',
261 'src/_slider.i',
262 'src/_tglbtn.i',
263 'src/_notebook.i',
264 'src/_listctrl.i',
265 'src/_treectrl.i',
266 'src/_dirctrl.i',
267 'src/_pycontrol.i',
268 'src/_cshelp.i',
269 'src/_dragimg.i',
270 'src/_datectrl.i',
271 ],
272 True)
273 ext = Extension('_controls_', swig_sources,
274 include_dirs = includes,
275 define_macros = defines,
276 library_dirs = libdirs,
277 libraries = libs,
278 extra_compile_args = cflags,
279 extra_link_args = lflags,
280 **depends
281 )
282 wxpExtensions.append(ext)
283
284
285
286
287 # Extension for the misc module
288 swig_sources = run_swig(['misc.i'], 'src', GENDIR, PKGDIR,
289 USE_SWIG, swig_force, swig_args, swig_deps +
290 [ 'src/__misc_rename.i',
291 'src/__misc_reverse.txt',
292 'src/_settings.i',
293 'src/_functions.i',
294 'src/_misc.i',
295 'src/_tipdlg.i',
296 'src/_timer.i',
297 'src/_log.i',
298 'src/_process.i',
299 'src/_joystick.i',
300 'src/_sound.i',
301 'src/_mimetype.i',
302 'src/_artprov.i',
303 'src/_config.i',
304 'src/_datetime.i',
305 'src/_dataobj.i',
306 'src/_dnd.i',
307 'src/_display.i',
308 'src/_clipbrd.i',
309 'src/_stdpaths.i',
310 ],
311 True)
312 ext = Extension('_misc_', swig_sources,
313 include_dirs = includes,
314 define_macros = defines,
315 library_dirs = libdirs,
316 libraries = libs,
317 extra_compile_args = cflags,
318 extra_link_args = lflags,
319 **depends
320 )
321 wxpExtensions.append(ext)
322
323
324
325 ##
326 ## Core modules that are not in the "core" namespace start here
327 ##
328
329 swig_sources = run_swig(['calendar.i'], 'src', GENDIR, PKGDIR,
330 USE_SWIG, swig_force, swig_args, swig_deps)
331 ext = Extension('_calendar', swig_sources,
332 include_dirs = includes,
333 define_macros = defines,
334 library_dirs = libdirs,
335 libraries = libs,
336 extra_compile_args = cflags,
337 extra_link_args = lflags,
338 **depends
339 )
340 wxpExtensions.append(ext)
341
342
343 swig_sources = run_swig(['grid.i'], 'src', GENDIR, PKGDIR,
344 USE_SWIG, swig_force, swig_args, swig_deps)
345 ext = Extension('_grid', swig_sources,
346 include_dirs = includes,
347 define_macros = defines,
348 library_dirs = libdirs,
349 libraries = libs,
350 extra_compile_args = cflags,
351 extra_link_args = lflags,
352 **depends
353 )
354 wxpExtensions.append(ext)
355
356
357
358 swig_sources = run_swig(['html.i'], 'src', GENDIR, PKGDIR,
359 USE_SWIG, swig_force, swig_args, swig_deps)
360 ext = Extension('_html', swig_sources,
361 include_dirs = includes,
362 define_macros = defines,
363 library_dirs = libdirs,
364 libraries = libs,
365 extra_compile_args = cflags,
366 extra_link_args = lflags,
367 **depends
368 )
369 wxpExtensions.append(ext)
370
371
372 mediaLibs = libs[:]
373 if not MONOLITHIC and os.name == 'nt':
374 mediaLibs.append(makeLibName('media')[0])
375 swig_sources = run_swig(['media.i'], 'src', GENDIR, PKGDIR,
376 USE_SWIG, swig_force, swig_args, swig_deps)
377 ext = Extension('_media', swig_sources,
378 include_dirs = includes,
379 define_macros = defines,
380 library_dirs = libdirs,
381 libraries = mediaLibs,
382 extra_compile_args = cflags,
383 extra_link_args = lflags,
384 **depends
385 )
386 wxpExtensions.append(ext)
387
388
389 swig_sources = run_swig(['webkit.i'], 'src', GENDIR, PKGDIR,
390 USE_SWIG, swig_force, swig_args, swig_deps)
391 ext = Extension('_webkit', swig_sources,
392 include_dirs = includes,
393 define_macros = defines,
394 library_dirs = libdirs,
395 libraries = libs,
396 extra_compile_args = cflags,
397 extra_link_args = lflags,
398 **depends
399 )
400 wxpExtensions.append(ext)
401
402
403
404 swig_sources = run_swig(['wizard.i'], 'src', GENDIR, PKGDIR,
405 USE_SWIG, swig_force, swig_args, swig_deps)
406 ext = Extension('_wizard', swig_sources,
407 include_dirs = includes,
408 define_macros = defines,
409 library_dirs = libdirs,
410 libraries = libs,
411 extra_compile_args = cflags,
412 extra_link_args = lflags,
413 **depends
414 )
415 wxpExtensions.append(ext)
416
417
418
419 swig_sources = run_swig(['xrc.i'], 'src', GENDIR, PKGDIR,
420 USE_SWIG, swig_force, swig_args, swig_deps +
421 [ 'src/_xrc_rename.i',
422 'src/_xrc_ex.py',
423 'src/_xmlres.i',
424 'src/_xmlsub.i',
425 'src/_xml.i',
426 'src/_xmlhandler.i',
427 ])
428 ext = Extension('_xrc',
429 swig_sources,
430
431 include_dirs = includes + CONTRIBS_INC,
432 define_macros = defines,
433
434 library_dirs = libdirs,
435 libraries = libs,
436
437 extra_compile_args = cflags,
438 extra_link_args = lflags,
439 )
440 wxpExtensions.append(ext)
441
442
443 #----------------------------------------------------------------------
444 # Define the GLCanvas extension module
445 #----------------------------------------------------------------------
446
447 if BUILD_GLCANVAS:
448 msg('Preparing GLCANVAS...')
449 location = 'contrib/glcanvas'
450
451 swig_sources = run_swig(['glcanvas.i'], location, GENDIR, PKGDIR,
452 USE_SWIG, swig_force, swig_args, swig_deps)
453
454 gl_libs = []
455 if os.name == 'posix':
456 gl_config = os.popen(WX_CONFIG + ' --libs gl', 'r').read()[:-1]
457 gl_lflags = gl_config.split() + lflags
458 gl_libs = libs
459 else:
460 gl_libs = libs + ['opengl32', 'glu32'] + makeLibName('gl')
461 gl_lflags = lflags
462
463 ext = Extension('_glcanvas',
464 swig_sources,
465
466 include_dirs = includes + CONTRIBS_INC,
467 define_macros = defines,
468
469 library_dirs = libdirs,
470 libraries = gl_libs,
471
472 extra_compile_args = cflags,
473 extra_link_args = gl_lflags,
474 )
475
476 wxpExtensions.append(ext)
477
478
479 #----------------------------------------------------------------------
480 # Define the OGL extension module
481 #----------------------------------------------------------------------
482
483 if BUILD_OGL:
484 msg('Preparing OGL...')
485 location = 'contrib/ogl'
486
487 swig_sources = run_swig(['ogl.i'], location, GENDIR, PKGDIR,
488 USE_SWIG, swig_force, swig_args, swig_deps +
489 [ '%s/_oglbasic.i' % location,
490 '%s/_oglshapes.i' % location,
491 '%s/_oglshapes2.i' % location,
492 '%s/_oglcanvas.i' % location,
493 '%s/_ogldefs.i' % location,
494 ])
495
496 ext = Extension('_ogl',
497 swig_sources,
498
499 include_dirs = includes + [ location ] + CONTRIBS_INC,
500 define_macros = defines + [('wxUSE_DEPRECATED', '0')],
501
502 library_dirs = libdirs,
503 libraries = libs + makeLibName('ogl'),
504
505 extra_compile_args = cflags,
506 extra_link_args = lflags,
507 )
508
509 wxpExtensions.append(ext)
510
511
512
513 #----------------------------------------------------------------------
514 # Define the STC extension module
515 #----------------------------------------------------------------------
516
517 if BUILD_STC:
518 msg('Preparing STC...')
519 location = 'contrib/stc'
520 #if os.name == 'nt':
521 STC_H = opj(WXDIR, 'contrib', 'include/wx/stc')
522 #else:
523 # STC_H = opj(WXPREFIX, 'include/wx-%d.%d/wx/stc' % (VER_MAJOR, VER_MINOR))
524
525 ## NOTE: need to add something like this to the stc.bkl...
526
527 ## # Check if gen_iface needs to be run for the wxSTC sources
528 ## if (newer(opj(CTRB_SRC, 'stc/stc.h.in'), opj(CTRB_INC, 'stc/stc.h' )) or
529 ## newer(opj(CTRB_SRC, 'stc/stc.cpp.in'), opj(CTRB_SRC, 'stc/stc.cpp')) or
530 ## newer(opj(CTRB_SRC, 'stc/gen_iface.py'), opj(CTRB_SRC, 'stc/stc.cpp'))):
531
532 ## msg('Running gen_iface.py, regenerating stc.h and stc.cpp...')
533 ## cwd = os.getcwd()
534 ## os.chdir(opj(CTRB_SRC, 'stc'))
535 ## sys.path.insert(0, os.curdir)
536 ## import gen_iface
537 ## gen_iface.main([])
538 ## os.chdir(cwd)
539
540
541 swig_sources = run_swig(['stc.i'], location, GENDIR, PKGDIR,
542 USE_SWIG, swig_force,
543 swig_args + ['-I'+STC_H, '-I'+location],
544 [opj(STC_H, 'stc.h'),
545 opj(location, "_stc_utf8_methods.py"),
546 opj(location, "_stc_docstrings.i"),
547 opj(location, "_stc_gendocs.i"),
548 ] + swig_deps)
549
550 ext = Extension('_stc',
551 swig_sources,
552
553 include_dirs = includes + CONTRIBS_INC,
554 define_macros = defines,
555
556 library_dirs = libdirs,
557 libraries = libs + makeLibName('stc'),
558
559 extra_compile_args = cflags,
560 extra_link_args = lflags,
561 )
562
563 wxpExtensions.append(ext)
564
565
566 #----------------------------------------------------------------------
567 # Define the ACTIVEX extension module (experimental)
568 #----------------------------------------------------------------------
569
570 if BUILD_ACTIVEX:
571 msg('Preparing ACTIVEX...')
572 location = 'contrib/activex'
573 axloc = opj(location, "wxie")
574
575 swig_files = ['activex.i', ]
576
577 swig_sources = run_swig(swig_files, location, '', PKGDIR,
578 USE_SWIG, swig_force, swig_args, swig_deps +
579 [ '%s/_activex_ex.py' % location])
580
581
582 ext = Extension('_activex', ['%s/IEHtmlWin.cpp' % axloc,
583 '%s/wxactivex.cpp' % axloc,
584 ] + swig_sources,
585
586 include_dirs = includes + [ axloc ],
587 define_macros = defines,
588
589 library_dirs = libdirs,
590 libraries = libs,
591
592 extra_compile_args = cflags,
593 extra_link_args = lflags,
594 )
595
596 wxpExtensions.append(ext)
597
598
599 #----------------------------------------------------------------------
600 # Define the GIZMOS extension module
601 #----------------------------------------------------------------------
602
603 if BUILD_GIZMOS:
604 msg('Preparing GIZMOS...')
605 location = 'contrib/gizmos'
606
607 swig_sources = run_swig(['gizmos.i'], location, GENDIR, PKGDIR,
608 USE_SWIG, swig_force, swig_args, swig_deps)
609
610 ext = Extension('_gizmos',
611 [ '%s/treelistctrl.cpp' % opj(location, 'wxCode/src') ] + swig_sources,
612
613 include_dirs = includes + [ location, opj(location, 'wxCode/include') ] + CONTRIBS_INC,
614 define_macros = defines,
615
616 library_dirs = libdirs,
617 libraries = libs + makeLibName('gizmos'),
618
619 extra_compile_args = cflags,
620 extra_link_args = lflags,
621 )
622
623 wxpExtensions.append(ext)
624
625
626 #----------------------------------------------------------------------
627 # Define the ANIMATE extension module
628 #----------------------------------------------------------------------
629
630 if BUILD_ANIMATE:
631 msg('Preparing ANIMATE...')
632 location = 'contrib/animate'
633
634 swig_sources = run_swig(['animate.i'], location, GENDIR, PKGDIR,
635 USE_SWIG, swig_force, swig_args, swig_deps)
636
637 ext = Extension('_animate',
638 swig_sources,
639
640 include_dirs = includes + CONTRIBS_INC,
641 define_macros = defines,
642
643 library_dirs = libdirs,
644 libraries = libs + makeLibName('animate'),
645
646 extra_compile_args = cflags,
647 extra_link_args = lflags,
648 )
649
650 wxpExtensions.append(ext)
651
652
653
654 #----------------------------------------------------------------------
655 # Define the DLLWIDGET extension module
656 #----------------------------------------------------------------------
657
658 if BUILD_DLLWIDGET:
659 msg('Preparing DLLWIDGET...')
660 location = 'contrib/dllwidget'
661 swig_files = ['dllwidget_.i']
662
663 swig_sources = run_swig(swig_files, location, '', PKGDIR,
664 USE_SWIG, swig_force, swig_args, swig_deps)
665
666 # copy a contrib project specific py module to the main package dir
667 copy_file(opj(location, 'dllwidget.py'), PKGDIR, update=1, verbose=0)
668 CLEANUP.append(opj(PKGDIR, 'dllwidget.py'))
669
670 ext = Extension('dllwidget_c', [
671 '%s/dllwidget.cpp' % location,
672 ] + swig_sources,
673
674 include_dirs = includes + CONTRIBS_INC,
675 define_macros = defines,
676
677 library_dirs = libdirs,
678 libraries = libs,
679
680 extra_compile_args = cflags,
681 extra_link_args = lflags,
682 )
683
684 wxpExtensions.append(ext)
685
686
687
688
689 #----------------------------------------------------------------------
690 # Tools, scripts data files, etc.
691 #----------------------------------------------------------------------
692
693 if NO_SCRIPTS:
694 SCRIPTS = None
695 else:
696 SCRIPTS = [opj('scripts/helpviewer'),
697 opj('scripts/img2png'),
698 opj('scripts/img2py'),
699 opj('scripts/img2xpm'),
700 opj('scripts/pyalacarte'),
701 opj('scripts/pyalamode'),
702 opj('scripts/pycrust'),
703 opj('scripts/pyshell'),
704 opj('scripts/pywrap'),
705 opj('scripts/pywrap'),
706 opj('scripts/pywxrc'),
707 opj('scripts/xrced'),
708 ]
709
710
711
712 DATA_FILES += find_data_files('wx/tools/XRCed', '*.txt', '*.xrc')
713 DATA_FILES += find_data_files('wx/py', '*.txt', '*.ico', '*.css', '*.html')
714 DATA_FILES += find_data_files('wx', '*.txt', '*.css', '*.html')
715
716
717 if NO_HEADERS:
718 HEADERS = None
719 else:
720 h_files = glob.glob(opj("include/wx/wxPython/*.h"))
721 i_files = glob.glob(opj("src/*.i")) + \
722 glob.glob(opj("src/_*.py")) + \
723 glob.glob(opj("src/*.swg"))
724
725 HEADERS = zip(h_files, ["/wxPython"]*len(h_files)) + \
726 zip(i_files, ["/wxPython/i_files"]*len(i_files))
727
728
729
730 if INSTALL_MULTIVERSION:
731 EXTRA_PATH = getExtraPath(addOpts=EP_ADD_OPTS, shortVer=not EP_FULL_VER)
732 open("src/wx.pth", "w").write(EXTRA_PATH)
733 CLEANUP.append("src/wx.pth")
734 else:
735 EXTRA_PATH = None
736
737
738
739 #----------------------------------------------------------------------
740 # Do the Setup/Build/Install/Whatever
741 #----------------------------------------------------------------------
742
743 if __name__ == "__main__":
744 if not PREP_ONLY:
745
746 setup(name = 'wxPython',
747 version = VERSION,
748 description = DESCRIPTION,
749 long_description = LONG_DESCRIPTION,
750 author = AUTHOR,
751 author_email = AUTHOR_EMAIL,
752 url = URL,
753 download_url = DOWNLOAD_URL,
754 license = LICENSE,
755 platforms = PLATFORMS,
756 classifiers = filter(None, CLASSIFIERS.split("\n")),
757 keywords = KEYWORDS,
758
759 packages = ['wxPython',
760 'wxPython.lib',
761 'wxPython.lib.colourchooser',
762 'wxPython.lib.editor',
763 'wxPython.lib.mixins',
764 'wxPython.tools',
765
766 'wx',
767 'wx.build',
768 'wx.lib',
769 'wx.lib.colourchooser',
770 'wx.lib.editor',
771 'wx.lib.floatcanvas',
772 'wx.lib.masked',
773 'wx.lib.mixins',
774 'wx.lib.ogl',
775 'wx.py',
776 'wx.tools',
777 'wx.tools.XRCed',
778 ],
779
780 extra_path = EXTRA_PATH,
781
782 ext_package = PKGDIR,
783 ext_modules = wxpExtensions,
784
785 options = { 'build' : { 'build_base' : BUILD_BASE },
786 },
787
788 scripts = SCRIPTS,
789 data_files = DATA_FILES,
790 headers = HEADERS,
791
792 # Override some of the default distutils command classes with my own
793 cmdclass = { 'install' : wx_install,
794 'install_data': wx_smart_install_data,
795 'install_headers': wx_install_headers,
796 'clean': wx_extra_clean,
797 },
798 )
799
800
801 if INSTALL_MULTIVERSION:
802 setup(name = 'wxPython-common',
803 version = VERSION,
804 description = DESCRIPTION,
805 long_description = LONG_DESCRIPTION,
806 author = AUTHOR,
807 author_email = AUTHOR_EMAIL,
808 url = URL,
809 download_url = DOWNLOAD_URL,
810 license = LICENSE,
811 platforms = PLATFORMS,
812 classifiers = filter(None, CLASSIFIERS.split("\n")),
813 keywords = KEYWORDS,
814
815 package_dir = { '': 'wxversion' },
816 py_modules = ['wxversion'],
817
818 data_files = [('', ['src/wx.pth'])],
819
820 options = { 'build' : { 'build_base' : BUILD_BASE },
821 },
822
823 cmdclass = { 'install_data': wx_smart_install_data,
824 },
825 )
826
827 #----------------------------------------------------------------------
828 #----------------------------------------------------------------------