2000-10-30 16:08:42 -05:00
|
|
|
#!/usr/bin/env python
|
|
|
|
#----------------------------------------------------------------------
|
2004-03-25 16:36:29 -05:00
|
|
|
# Name: setup.py
|
|
|
|
# Purpose: Distutils script for building wxPython
|
|
|
|
#
|
|
|
|
# Author: Robin Dunn
|
|
|
|
#
|
|
|
|
# Created: 12-Oct-2000
|
|
|
|
# RCS-ID: $Id$
|
|
|
|
# Copyright: (c) 2000 by Total Control Software
|
|
|
|
# Licence: wxWindows license
|
2003-03-25 01:35:27 -05:00
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
2005-02-07 14:17:17 -05:00
|
|
|
import sys, os
|
2001-10-26 20:08:14 -04:00
|
|
|
|
|
|
|
|
2004-03-25 16:36:29 -05:00
|
|
|
# The full contents of the wx.build.config module used to be located
|
|
|
|
# here in setup.py. They were split into a separate module so it will
|
|
|
|
# be installed with wxPython and can then be used by the build scripts
|
2005-11-30 14:34:43 -05:00
|
|
|
# of other extension modules that wish to be wxPython compatible.
|
|
|
|
# The split is still fairly new and hasn't been tested by building
|
2004-03-25 16:36:29 -05:00
|
|
|
# third-party extensions yet, so expect some things to still shift
|
|
|
|
# back and forth, and also more stuff in config.py will get converted
|
|
|
|
# to functions, etc.
|
2001-10-26 20:08:14 -04:00
|
|
|
|
2004-03-25 19:21:33 -05:00
|
|
|
# This script imports it as just "config" because if wxPython doesn't
|
|
|
|
# exist yet, then it can't be imported from wx.build.config (since
|
|
|
|
# wx._core doesn't exist yet.) So instead we keep the main copy of
|
|
|
|
# config .py in the same place as setup.py, and then copy it to
|
|
|
|
# wx/build as needed below.
|
|
|
|
|
2005-02-07 14:17:17 -05:00
|
|
|
# To fully support external builds, we need to have a build options
|
|
|
|
# file that is created whenever a new wxPython build is performed.
|
2005-11-30 14:34:43 -05:00
|
|
|
# We happen to be doing that here in this script, so make sure to
|
|
|
|
# remove the build_options.py file, so that config.py will recreate it.
|
2005-02-07 14:17:17 -05:00
|
|
|
|
2005-12-30 18:02:03 -05:00
|
|
|
for bo_name in ["build_options.py", "build_options.pyc"]:
|
|
|
|
if os.path.exists(bo_name):
|
|
|
|
os.remove(bo_name)
|
2005-02-07 14:17:17 -05:00
|
|
|
|
2004-03-25 16:36:29 -05:00
|
|
|
sys.setup_is_main = __name__ == "__main__" # an icky hack!
|
2004-03-25 19:21:33 -05:00
|
|
|
from config import *
|
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
# Update the packaged config file.
|
|
|
|
#----------------------------------------------------------------------
|
2000-10-30 16:08:42 -05:00
|
|
|
|
2004-03-25 19:21:33 -05:00
|
|
|
copy_file('config.py', 'wx/build', update=1, verbose=1)
|
2005-02-07 14:17:17 -05:00
|
|
|
copy_file('build_options.py', 'wx/build', update=1, verbose=1)
|
2004-03-25 19:21:33 -05:00
|
|
|
CLEANUP.append('wx/build/config.py')
|
2005-02-07 14:17:17 -05:00
|
|
|
CLEANUP.append('wx/build/build_options.py')
|
2000-10-30 16:08:42 -05:00
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
2003-07-02 19:13:10 -04:00
|
|
|
# Update the version file
|
2000-10-30 16:08:42 -05:00
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
2004-03-25 16:36:29 -05:00
|
|
|
# The version file is unconditionally updated every time setup.py is
|
|
|
|
# run since the version string can change based on the UNICODE flag
|
|
|
|
|
2004-03-17 14:57:06 -05:00
|
|
|
open('wx/__version__.py', 'w').write("""\
|
2003-07-02 19:13:10 -04:00
|
|
|
# This file was generated by setup.py...
|
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
VERSION_STRING = '%(VERSION)s'
|
|
|
|
MAJOR_VERSION = %(VER_MAJOR)s
|
|
|
|
MINOR_VERSION = %(VER_MINOR)s
|
|
|
|
RELEASE_VERSION = %(VER_RELEASE)s
|
|
|
|
SUBREL_VERSION = %(VER_SUBREL)s
|
2003-07-02 19:13:10 -04:00
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
VERSION = (MAJOR_VERSION, MINOR_VERSION, RELEASE_VERSION,
|
2004-03-17 14:57:06 -05:00
|
|
|
SUBREL_VERSION, '%(VER_FLAGS)s')
|
2003-07-02 19:13:10 -04:00
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
RELEASE_NUMBER = RELEASE_VERSION # for compatibility
|
2003-07-02 19:13:10 -04:00
|
|
|
""" % globals())
|
2003-03-25 01:35:27 -05:00
|
|
|
|
2004-03-17 19:46:08 -05:00
|
|
|
CLEANUP.append('wx/__version__.py')
|
2000-10-30 16:08:42 -05:00
|
|
|
|
2001-02-16 03:19:50 -05:00
|
|
|
|
2006-01-28 21:33:00 -05:00
|
|
|
#----------------------------------------------------------------------
|
|
|
|
# Write the SWIG version to a header file
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
|
|
|
if USE_SWIG:
|
|
|
|
try:
|
2006-03-13 23:06:46 -05:00
|
|
|
SVER = swig_version()
|
2006-01-28 21:33:00 -05:00
|
|
|
open('include/wx/wxPython/swigver.h', 'w').write('''\
|
|
|
|
// This file was generated by setup.py
|
|
|
|
|
|
|
|
#define wxPy_SWIG_VERSION "SWIG-%s"
|
|
|
|
''' % SVER)
|
|
|
|
msg('Using SWIG-' + SVER)
|
|
|
|
except:
|
|
|
|
msg('\nUnable to get SWIG version number\n')
|
2006-03-13 23:06:46 -05:00
|
|
|
|
2006-01-28 21:33:00 -05:00
|
|
|
|
|
|
|
|
2004-10-14 20:47:56 -04:00
|
|
|
#----------------------------------------------------------------------
|
|
|
|
# patch distutils if it can't cope with the "classifiers" or
|
|
|
|
# "download_url" keywords
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
|
|
|
if sys.version < '2.2.3':
|
|
|
|
from distutils.dist import DistributionMetadata
|
|
|
|
DistributionMetadata.classifiers = None
|
|
|
|
DistributionMetadata.download_url = None
|
|
|
|
depends = {}
|
|
|
|
else:
|
|
|
|
depends = {'depends' : depends}
|
|
|
|
|
|
|
|
|
2001-02-16 03:19:50 -05:00
|
|
|
#----------------------------------------------------------------------
|
|
|
|
# Define the CORE extension module
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
2003-03-25 01:35:27 -05:00
|
|
|
msg('Preparing CORE...')
|
2003-11-12 16:34:20 -05:00
|
|
|
swig_sources = run_swig(['core.i'], 'src', GENDIR, PKGDIR,
|
|
|
|
USE_SWIG, swig_force, swig_args, swig_deps +
|
2003-11-26 01:09:56 -05:00
|
|
|
[ 'src/_accel.i',
|
|
|
|
'src/_app.i',
|
2003-11-12 16:34:20 -05:00
|
|
|
'src/_app_ex.py',
|
|
|
|
'src/_constraints.i',
|
|
|
|
'src/_core_api.i',
|
|
|
|
'src/_core_ex.py',
|
2004-04-25 02:51:10 -04:00
|
|
|
'src/__core_rename.i',
|
|
|
|
'src/__core_reverse.txt',
|
2003-11-12 16:34:20 -05:00
|
|
|
'src/_defs.i',
|
|
|
|
'src/_event.i',
|
|
|
|
'src/_event_ex.py',
|
2004-09-23 12:49:01 -04:00
|
|
|
'src/_evtloop.i',
|
2003-11-12 16:34:20 -05:00
|
|
|
'src/_evthandler.i',
|
|
|
|
'src/_filesys.i',
|
|
|
|
'src/_gdicmn.i',
|
|
|
|
'src/_image.i',
|
|
|
|
'src/_menu.i',
|
|
|
|
'src/_obj.i',
|
|
|
|
'src/_sizers.i',
|
|
|
|
'src/_gbsizer.i',
|
|
|
|
'src/_streams.i',
|
|
|
|
'src/_validator.i',
|
|
|
|
'src/_window.i',
|
2004-03-17 19:46:08 -05:00
|
|
|
'src/_control.i',
|
2006-01-20 13:18:02 -05:00
|
|
|
'src/_swigtype.i',
|
2004-04-25 02:51:10 -04:00
|
|
|
],
|
|
|
|
True)
|
2001-02-16 03:19:50 -05:00
|
|
|
|
2003-03-25 01:35:27 -05:00
|
|
|
copy_file('src/__init__.py', PKGDIR, update=1, verbose=0)
|
2004-03-17 19:46:08 -05:00
|
|
|
CLEANUP.append(opj(PKGDIR, '__init__.py'))
|
2001-02-16 03:19:50 -05:00
|
|
|
|
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
# update the license files
|
|
|
|
mkpath('licence')
|
|
|
|
for file in ['preamble.txt', 'licence.txt', 'licendoc.txt', 'lgpl.txt']:
|
|
|
|
copy_file(opj(WXDIR, 'docs', file), opj('licence',file), update=1, verbose=0)
|
2004-03-17 19:46:08 -05:00
|
|
|
CLEANUP.append(opj('licence',file))
|
|
|
|
CLEANUP.append('licence')
|
2000-10-30 16:08:42 -05:00
|
|
|
|
|
|
|
|
2003-03-25 01:35:27 -05:00
|
|
|
if os.name == 'nt':
|
2006-10-02 16:03:01 -04:00
|
|
|
build_locale_dir(opj(PKGDIR, 'locale'))
|
|
|
|
DATA_FILES += build_locale_list(opj(PKGDIR, 'locale'))
|
2001-07-28 23:06:02 -04:00
|
|
|
|
|
|
|
|
2003-03-25 01:35:27 -05:00
|
|
|
if os.name == 'nt':
|
|
|
|
rc_file = ['src/wxc.rc']
|
|
|
|
else:
|
|
|
|
rc_file = []
|
|
|
|
|
|
|
|
|
2004-04-25 02:51:10 -04:00
|
|
|
ext = Extension('_core_', ['src/helpers.cpp',
|
|
|
|
] + rc_file + swig_sources,
|
2003-03-25 01:35:27 -05:00
|
|
|
|
|
|
|
include_dirs = includes,
|
|
|
|
define_macros = defines,
|
|
|
|
|
|
|
|
library_dirs = libdirs,
|
|
|
|
libraries = libs,
|
|
|
|
|
|
|
|
extra_compile_args = cflags,
|
|
|
|
extra_link_args = lflags,
|
2003-11-12 16:34:20 -05:00
|
|
|
|
2004-10-14 20:47:56 -04:00
|
|
|
**depends
|
2003-03-25 01:35:27 -05:00
|
|
|
)
|
|
|
|
wxpExtensions.append(ext)
|
|
|
|
|
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Extension for the GDI module
|
|
|
|
swig_sources = run_swig(['gdi.i'], 'src', GENDIR, PKGDIR,
|
|
|
|
USE_SWIG, swig_force, swig_args, swig_deps +
|
2006-11-11 02:40:41 -05:00
|
|
|
['src/_bitmap.i',
|
2004-03-17 19:46:08 -05:00
|
|
|
'src/_colour.i',
|
|
|
|
'src/_dc.i',
|
2006-10-03 17:36:33 -04:00
|
|
|
'src/_graphics.i',
|
2006-10-10 23:51:27 -04:00
|
|
|
'src/_overlay.i',
|
2004-03-17 19:46:08 -05:00
|
|
|
'src/_gdiobj.i',
|
|
|
|
'src/_imaglist.i',
|
|
|
|
'src/_region.i',
|
|
|
|
'src/_stockobjs.i',
|
2003-11-12 16:34:20 -05:00
|
|
|
'src/_effects.i',
|
2004-03-17 19:46:08 -05:00
|
|
|
'src/_intl.i',
|
|
|
|
'src/_intl_ex.py',
|
|
|
|
'src/_brush.i',
|
|
|
|
'src/_cursor.i',
|
|
|
|
'src/_font.i',
|
|
|
|
'src/_icon.i',
|
|
|
|
'src/_pen.i',
|
|
|
|
'src/_palette.i',
|
2005-06-09 16:11:14 -04:00
|
|
|
'src/_renderer.i',
|
2006-07-10 11:06:31 -04:00
|
|
|
'src/_pseudodc.i',
|
2004-04-25 02:51:10 -04:00
|
|
|
],
|
|
|
|
True)
|
2006-07-05 01:23:28 -04:00
|
|
|
ext = Extension('_gdi_', ['src/drawlist.cpp',
|
2006-07-10 11:06:31 -04:00
|
|
|
'src/pseudodc.cpp'
|
2006-07-05 01:23:28 -04:00
|
|
|
] + swig_sources,
|
2003-03-25 01:35:27 -05:00
|
|
|
include_dirs = includes,
|
|
|
|
define_macros = defines,
|
|
|
|
library_dirs = libdirs,
|
|
|
|
libraries = libs,
|
|
|
|
extra_compile_args = cflags,
|
|
|
|
extra_link_args = lflags,
|
2004-10-14 20:47:56 -04:00
|
|
|
**depends
|
2003-03-25 01:35:27 -05:00
|
|
|
)
|
|
|
|
wxpExtensions.append(ext)
|
|
|
|
|
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Extension for the windows module
|
|
|
|
swig_sources = run_swig(['windows.i'], 'src', GENDIR, PKGDIR,
|
|
|
|
USE_SWIG, swig_force, swig_args, swig_deps +
|
2006-11-11 02:40:41 -05:00
|
|
|
['src/_panel.i',
|
2004-03-17 19:46:08 -05:00
|
|
|
'src/_toplvl.i',
|
|
|
|
'src/_statusbar.i',
|
|
|
|
'src/_splitter.i',
|
|
|
|
'src/_sashwin.i',
|
|
|
|
'src/_popupwin.i',
|
|
|
|
'src/_tipwin.i',
|
|
|
|
'src/_vscroll.i',
|
|
|
|
'src/_taskbar.i',
|
|
|
|
'src/_cmndlgs.i',
|
|
|
|
'src/_mdi.i',
|
|
|
|
'src/_pywindows.i',
|
|
|
|
'src/_printfw.i',
|
2004-04-25 02:51:10 -04:00
|
|
|
],
|
|
|
|
True)
|
|
|
|
ext = Extension('_windows_', swig_sources,
|
2003-03-25 01:35:27 -05:00
|
|
|
include_dirs = includes,
|
|
|
|
define_macros = defines,
|
|
|
|
library_dirs = libdirs,
|
|
|
|
libraries = libs,
|
|
|
|
extra_compile_args = cflags,
|
|
|
|
extra_link_args = lflags,
|
2004-10-14 20:47:56 -04:00
|
|
|
**depends
|
2003-03-25 01:35:27 -05:00
|
|
|
)
|
|
|
|
wxpExtensions.append(ext)
|
|
|
|
|
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
|
|
|
|
|
|
|
|
# Extension for the controls module
|
|
|
|
swig_sources = run_swig(['controls.i'], 'src', GENDIR, PKGDIR,
|
|
|
|
USE_SWIG, swig_force, swig_args, swig_deps +
|
2006-11-11 02:40:41 -05:00
|
|
|
[ 'src/_toolbar.i',
|
2004-03-17 19:46:08 -05:00
|
|
|
'src/_button.i',
|
|
|
|
'src/_checkbox.i',
|
|
|
|
'src/_choice.i',
|
|
|
|
'src/_combobox.i',
|
|
|
|
'src/_gauge.i',
|
|
|
|
'src/_statctrls.i',
|
|
|
|
'src/_listbox.i',
|
|
|
|
'src/_textctrl.i',
|
|
|
|
'src/_scrolbar.i',
|
|
|
|
'src/_spin.i',
|
|
|
|
'src/_radio.i',
|
|
|
|
'src/_slider.i',
|
|
|
|
'src/_tglbtn.i',
|
|
|
|
'src/_notebook.i',
|
|
|
|
'src/_listctrl.i',
|
|
|
|
'src/_treectrl.i',
|
|
|
|
'src/_dirctrl.i',
|
|
|
|
'src/_pycontrol.i',
|
|
|
|
'src/_cshelp.i',
|
|
|
|
'src/_dragimg.i',
|
2005-02-17 23:38:30 -05:00
|
|
|
'src/_datectrl.i',
|
2006-05-29 16:57:05 -04:00
|
|
|
'src/_hyperlink.i',
|
2006-06-06 22:26:41 -04:00
|
|
|
'src/_picker.i',
|
2006-11-11 02:40:41 -05:00
|
|
|
'src/_collpane.i',
|
2006-12-11 01:19:27 -05:00
|
|
|
'src/_srchctrl.i',
|
2004-04-25 02:51:10 -04:00
|
|
|
],
|
|
|
|
True)
|
|
|
|
ext = Extension('_controls_', swig_sources,
|
2003-11-12 16:34:20 -05:00
|
|
|
include_dirs = includes,
|
|
|
|
define_macros = defines,
|
|
|
|
library_dirs = libdirs,
|
|
|
|
libraries = libs,
|
|
|
|
extra_compile_args = cflags,
|
|
|
|
extra_link_args = lflags,
|
2004-10-14 20:47:56 -04:00
|
|
|
**depends
|
2003-11-12 16:34:20 -05:00
|
|
|
)
|
|
|
|
wxpExtensions.append(ext)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Extension for the misc module
|
|
|
|
swig_sources = run_swig(['misc.i'], 'src', GENDIR, PKGDIR,
|
|
|
|
USE_SWIG, swig_force, swig_args, swig_deps +
|
2006-11-11 02:40:41 -05:00
|
|
|
[ 'src/_settings.i',
|
2004-03-17 19:46:08 -05:00
|
|
|
'src/_functions.i',
|
|
|
|
'src/_misc.i',
|
|
|
|
'src/_tipdlg.i',
|
|
|
|
'src/_timer.i',
|
|
|
|
'src/_log.i',
|
|
|
|
'src/_process.i',
|
|
|
|
'src/_joystick.i',
|
|
|
|
'src/_sound.i',
|
|
|
|
'src/_mimetype.i',
|
|
|
|
'src/_artprov.i',
|
|
|
|
'src/_config.i',
|
|
|
|
'src/_datetime.i',
|
|
|
|
'src/_dataobj.i',
|
|
|
|
'src/_dnd.i',
|
|
|
|
'src/_display.i',
|
2003-11-12 16:34:20 -05:00
|
|
|
'src/_clipbrd.i',
|
2004-11-10 21:26:18 -05:00
|
|
|
'src/_stdpaths.i',
|
2006-05-29 16:57:05 -04:00
|
|
|
'src/_power.i',
|
2006-10-09 14:55:10 -04:00
|
|
|
'src/_about.i',
|
2004-04-25 02:51:10 -04:00
|
|
|
],
|
|
|
|
True)
|
|
|
|
ext = Extension('_misc_', swig_sources,
|
2003-11-12 16:34:20 -05:00
|
|
|
include_dirs = includes,
|
|
|
|
define_macros = defines,
|
|
|
|
library_dirs = libdirs,
|
|
|
|
libraries = libs,
|
|
|
|
extra_compile_args = cflags,
|
|
|
|
extra_link_args = lflags,
|
2004-10-14 20:47:56 -04:00
|
|
|
**depends
|
2003-11-12 16:34:20 -05:00
|
|
|
)
|
|
|
|
wxpExtensions.append(ext)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
##
|
|
|
|
## Core modules that are not in the "core" namespace start here
|
|
|
|
##
|
|
|
|
|
2003-03-25 01:35:27 -05:00
|
|
|
swig_sources = run_swig(['calendar.i'], 'src', GENDIR, PKGDIR,
|
|
|
|
USE_SWIG, swig_force, swig_args, swig_deps)
|
2003-11-12 16:34:20 -05:00
|
|
|
ext = Extension('_calendar', swig_sources,
|
|
|
|
include_dirs = includes,
|
|
|
|
define_macros = defines,
|
|
|
|
library_dirs = libdirs,
|
|
|
|
libraries = libs,
|
|
|
|
extra_compile_args = cflags,
|
|
|
|
extra_link_args = lflags,
|
2004-10-14 20:47:56 -04:00
|
|
|
**depends
|
2003-11-12 16:34:20 -05:00
|
|
|
)
|
|
|
|
wxpExtensions.append(ext)
|
|
|
|
|
|
|
|
|
2006-11-16 18:38:29 -05:00
|
|
|
swig_sources = run_swig(['combo.i'], 'src', GENDIR, PKGDIR,
|
|
|
|
USE_SWIG, swig_force, swig_args, swig_deps)
|
|
|
|
ext = Extension('_combo', swig_sources,
|
|
|
|
include_dirs = includes,
|
|
|
|
define_macros = defines,
|
|
|
|
library_dirs = libdirs,
|
|
|
|
libraries = libs,
|
|
|
|
extra_compile_args = cflags,
|
|
|
|
extra_link_args = lflags,
|
|
|
|
**depends
|
|
|
|
)
|
|
|
|
wxpExtensions.append(ext)
|
|
|
|
|
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
swig_sources = run_swig(['grid.i'], 'src', GENDIR, PKGDIR,
|
|
|
|
USE_SWIG, swig_force, swig_args, swig_deps)
|
|
|
|
ext = Extension('_grid', swig_sources,
|
2003-03-25 01:35:27 -05:00
|
|
|
include_dirs = includes,
|
|
|
|
define_macros = defines,
|
|
|
|
library_dirs = libdirs,
|
|
|
|
libraries = libs,
|
|
|
|
extra_compile_args = cflags,
|
|
|
|
extra_link_args = lflags,
|
2004-10-14 20:47:56 -04:00
|
|
|
**depends
|
2003-03-25 01:35:27 -05:00
|
|
|
)
|
|
|
|
wxpExtensions.append(ext)
|
|
|
|
|
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
|
|
|
|
swig_sources = run_swig(['html.i'], 'src', GENDIR, PKGDIR,
|
2003-03-25 01:35:27 -05:00
|
|
|
USE_SWIG, swig_force, swig_args, swig_deps)
|
2003-11-12 16:34:20 -05:00
|
|
|
ext = Extension('_html', swig_sources,
|
2003-03-25 01:35:27 -05:00
|
|
|
include_dirs = includes,
|
|
|
|
define_macros = defines,
|
|
|
|
library_dirs = libdirs,
|
|
|
|
libraries = libs,
|
|
|
|
extra_compile_args = cflags,
|
|
|
|
extra_link_args = lflags,
|
2004-10-14 20:47:56 -04:00
|
|
|
**depends
|
2003-03-25 01:35:27 -05:00
|
|
|
)
|
|
|
|
wxpExtensions.append(ext)
|
|
|
|
|
2004-10-19 17:00:30 -04:00
|
|
|
|
2004-12-14 17:46:28 -05:00
|
|
|
mediaLibs = libs[:]
|
2006-11-18 16:22:50 -05:00
|
|
|
if not MONOLITHIC and findLib('media', libdirs):
|
2006-06-06 13:49:06 -04:00
|
|
|
mediaLibs += makeLibName('media')
|
2004-11-24 14:34:54 -05:00
|
|
|
swig_sources = run_swig(['media.i'], 'src', GENDIR, PKGDIR,
|
|
|
|
USE_SWIG, swig_force, swig_args, swig_deps)
|
|
|
|
ext = Extension('_media', swig_sources,
|
|
|
|
include_dirs = includes,
|
|
|
|
define_macros = defines,
|
|
|
|
library_dirs = libdirs,
|
2004-12-14 17:46:28 -05:00
|
|
|
libraries = mediaLibs,
|
2004-11-24 14:34:54 -05:00
|
|
|
extra_compile_args = cflags,
|
|
|
|
extra_link_args = lflags,
|
|
|
|
**depends
|
|
|
|
)
|
|
|
|
wxpExtensions.append(ext)
|
|
|
|
|
|
|
|
|
2004-10-19 02:07:13 -04:00
|
|
|
swig_sources = run_swig(['webkit.i'], 'src', GENDIR, PKGDIR,
|
|
|
|
USE_SWIG, swig_force, swig_args, swig_deps)
|
|
|
|
ext = Extension('_webkit', swig_sources,
|
|
|
|
include_dirs = includes,
|
|
|
|
define_macros = defines,
|
|
|
|
library_dirs = libdirs,
|
|
|
|
libraries = libs,
|
|
|
|
extra_compile_args = cflags,
|
|
|
|
extra_link_args = lflags,
|
|
|
|
**depends
|
|
|
|
)
|
|
|
|
wxpExtensions.append(ext)
|
2003-11-12 16:34:20 -05:00
|
|
|
|
2004-10-19 17:00:30 -04:00
|
|
|
|
|
|
|
|
2003-03-25 01:35:27 -05:00
|
|
|
swig_sources = run_swig(['wizard.i'], 'src', GENDIR, PKGDIR,
|
|
|
|
USE_SWIG, swig_force, swig_args, swig_deps)
|
2003-11-12 16:34:20 -05:00
|
|
|
ext = Extension('_wizard', swig_sources,
|
2003-03-25 01:35:27 -05:00
|
|
|
include_dirs = includes,
|
|
|
|
define_macros = defines,
|
|
|
|
library_dirs = libdirs,
|
|
|
|
libraries = libs,
|
|
|
|
extra_compile_args = cflags,
|
|
|
|
extra_link_args = lflags,
|
2004-10-14 20:47:56 -04:00
|
|
|
**depends
|
2003-03-25 01:35:27 -05:00
|
|
|
)
|
|
|
|
wxpExtensions.append(ext)
|
2002-08-17 15:08:21 -04:00
|
|
|
|
|
|
|
|
2004-09-23 12:49:01 -04:00
|
|
|
|
|
|
|
swig_sources = run_swig(['xrc.i'], 'src', GENDIR, PKGDIR,
|
|
|
|
USE_SWIG, swig_force, swig_args, swig_deps +
|
2006-11-11 02:40:41 -05:00
|
|
|
[ 'src/_xrc_ex.py',
|
2004-09-23 12:49:01 -04:00
|
|
|
'src/_xmlres.i',
|
|
|
|
'src/_xmlsub.i',
|
|
|
|
'src/_xml.i',
|
|
|
|
'src/_xmlhandler.i',
|
|
|
|
])
|
2006-11-18 16:22:50 -05:00
|
|
|
|
|
|
|
if not MONOLITHIC and findLib('xrc', libdirs):
|
2006-07-05 01:23:28 -04:00
|
|
|
xrcLib = makeLibName('xrc')
|
|
|
|
else:
|
|
|
|
xrcLib = []
|
2004-09-23 12:49:01 -04:00
|
|
|
ext = Extension('_xrc',
|
|
|
|
swig_sources,
|
|
|
|
|
|
|
|
include_dirs = includes + CONTRIBS_INC,
|
|
|
|
define_macros = defines,
|
|
|
|
|
|
|
|
library_dirs = libdirs,
|
2006-07-05 01:23:28 -04:00
|
|
|
libraries = libs + xrcLib,
|
2004-09-23 12:49:01 -04:00
|
|
|
|
|
|
|
extra_compile_args = cflags,
|
|
|
|
extra_link_args = lflags,
|
|
|
|
)
|
|
|
|
wxpExtensions.append(ext)
|
|
|
|
|
|
|
|
|
2006-05-22 21:10:25 -04:00
|
|
|
|
|
|
|
swig_sources = run_swig(['richtext.i'], 'src', GENDIR, PKGDIR,
|
|
|
|
USE_SWIG, swig_force, swig_args, swig_deps)
|
2006-11-18 16:22:50 -05:00
|
|
|
if not MONOLITHIC and findLib('richtext', libdirs):
|
2006-07-05 01:23:28 -04:00
|
|
|
richLib = makeLibName('richtext')
|
|
|
|
else:
|
|
|
|
richLib = []
|
2006-05-22 21:10:25 -04:00
|
|
|
ext = Extension('_richtext', swig_sources,
|
|
|
|
include_dirs = includes,
|
|
|
|
define_macros = defines,
|
|
|
|
library_dirs = libdirs,
|
2006-07-05 01:23:28 -04:00
|
|
|
libraries = libs + richLib,
|
2006-05-22 21:10:25 -04:00
|
|
|
extra_compile_args = cflags,
|
2006-07-07 22:13:59 -04:00
|
|
|
extra_link_args = lflags,
|
|
|
|
**depends
|
|
|
|
)
|
|
|
|
wxpExtensions.append(ext)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
swig_sources = run_swig(['aui.i'], 'src', GENDIR, PKGDIR,
|
|
|
|
USE_SWIG, swig_force,
|
|
|
|
swig_args + ['-I'+opj(WXDIR, 'include/wx/aui')],
|
|
|
|
swig_deps + ['src/_aui_docstrings.i',
|
|
|
|
opj(WXDIR, 'include/wx/aui/framemanager.h'),
|
|
|
|
opj(WXDIR, 'include/wx/aui/floatpane.h'),
|
|
|
|
opj(WXDIR, 'include/wx/aui/dockart.h'),
|
2006-07-22 19:02:47 -04:00
|
|
|
opj(WXDIR, 'include/wx/aui/auibook.h'),
|
2007-01-06 14:44:28 -05:00
|
|
|
opj(WXDIR, 'include/wx/aui/tabmdi.h'),
|
2006-07-07 22:13:59 -04:00
|
|
|
])
|
2006-11-18 16:22:50 -05:00
|
|
|
if not MONOLITHIC and findLib('aui', libdirs):
|
2006-07-07 22:13:59 -04:00
|
|
|
auiLib = makeLibName('aui')
|
|
|
|
else:
|
|
|
|
auiLib = []
|
|
|
|
ext = Extension('_aui', swig_sources,
|
|
|
|
include_dirs = includes,
|
|
|
|
define_macros = defines,
|
|
|
|
library_dirs = libdirs,
|
|
|
|
libraries = libs + auiLib,
|
|
|
|
extra_compile_args = cflags,
|
2006-05-22 21:10:25 -04:00
|
|
|
extra_link_args = lflags,
|
|
|
|
**depends
|
|
|
|
)
|
|
|
|
wxpExtensions.append(ext)
|
|
|
|
|
|
|
|
|
2006-10-10 23:51:27 -04:00
|
|
|
swig_sources = run_swig(['animate.i'], 'src', GENDIR, PKGDIR,
|
|
|
|
USE_SWIG, swig_force, swig_args, swig_deps)
|
|
|
|
ext = Extension('_animate',
|
|
|
|
swig_sources,
|
|
|
|
|
|
|
|
include_dirs = includes + CONTRIBS_INC,
|
|
|
|
define_macros = defines,
|
|
|
|
|
|
|
|
library_dirs = libdirs,
|
|
|
|
libraries = libs,
|
|
|
|
|
|
|
|
extra_compile_args = cflags,
|
|
|
|
extra_link_args = lflags,
|
|
|
|
)
|
|
|
|
|
|
|
|
wxpExtensions.append(ext)
|
|
|
|
|
2006-05-22 21:10:25 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
2000-10-30 16:08:42 -05:00
|
|
|
#----------------------------------------------------------------------
|
|
|
|
# Define the GLCanvas extension module
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
2003-03-25 01:35:27 -05:00
|
|
|
if BUILD_GLCANVAS:
|
2001-07-05 14:54:09 -04:00
|
|
|
msg('Preparing GLCANVAS...')
|
2000-10-30 16:08:42 -05:00
|
|
|
location = 'contrib/glcanvas'
|
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
swig_sources = run_swig(['glcanvas.i'], location, GENDIR, PKGDIR,
|
2002-03-20 15:43:39 -05:00
|
|
|
USE_SWIG, swig_force, swig_args, swig_deps)
|
2000-10-30 16:08:42 -05:00
|
|
|
|
|
|
|
gl_libs = []
|
2006-07-05 01:23:28 -04:00
|
|
|
gl_libdirs = libdirs[:]
|
2000-10-30 16:08:42 -05:00
|
|
|
if os.name == 'posix':
|
2004-08-09 19:10:26 -04:00
|
|
|
gl_config = os.popen(WX_CONFIG + ' --libs gl', 'r').read()[:-1]
|
2006-02-05 22:03:24 -05:00
|
|
|
gl_lflags = gl_config.split()
|
2006-07-05 01:23:28 -04:00
|
|
|
gl_lflags = adjustLFLAGS(gl_lflags, gl_libdirs, gl_libs)
|
|
|
|
|
2006-02-05 22:03:24 -05:00
|
|
|
|
2001-03-26 16:31:04 -05:00
|
|
|
else:
|
2003-07-25 20:20:04 -04:00
|
|
|
gl_libs = libs + ['opengl32', 'glu32'] + makeLibName('gl')
|
2001-10-04 13:12:27 -04:00
|
|
|
gl_lflags = lflags
|
2000-10-30 16:08:42 -05:00
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
ext = Extension('_glcanvas',
|
2003-07-25 20:20:04 -04:00
|
|
|
swig_sources,
|
2000-12-21 19:06:04 -05:00
|
|
|
|
2004-03-11 01:28:07 -05:00
|
|
|
include_dirs = includes + CONTRIBS_INC,
|
2000-12-21 19:06:04 -05:00
|
|
|
define_macros = defines,
|
|
|
|
|
2006-07-05 01:23:28 -04:00
|
|
|
library_dirs = gl_libdirs,
|
2001-10-04 13:12:27 -04:00
|
|
|
libraries = gl_libs,
|
2000-12-21 19:06:04 -05:00
|
|
|
|
|
|
|
extra_compile_args = cflags,
|
2001-10-04 13:12:27 -04:00
|
|
|
extra_link_args = gl_lflags,
|
2000-12-21 19:06:04 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
wxpExtensions.append(ext)
|
2000-10-30 16:08:42 -05:00
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
# Define the OGL extension module
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
2003-03-25 01:35:27 -05:00
|
|
|
if BUILD_OGL:
|
2001-07-05 14:54:09 -04:00
|
|
|
msg('Preparing OGL...')
|
2000-10-30 16:08:42 -05:00
|
|
|
location = 'contrib/ogl'
|
|
|
|
|
2003-11-21 15:50:36 -05:00
|
|
|
swig_sources = run_swig(['ogl.i'], location, GENDIR, PKGDIR,
|
2003-11-12 16:34:20 -05:00
|
|
|
USE_SWIG, swig_force, swig_args, swig_deps +
|
|
|
|
[ '%s/_oglbasic.i' % location,
|
|
|
|
'%s/_oglshapes.i' % location,
|
|
|
|
'%s/_oglshapes2.i' % location,
|
|
|
|
'%s/_oglcanvas.i' % location,
|
|
|
|
'%s/_ogldefs.i' % location,
|
|
|
|
])
|
2000-10-30 16:08:42 -05:00
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
ext = Extension('_ogl',
|
2003-07-23 20:28:34 -04:00
|
|
|
swig_sources,
|
2000-12-21 19:06:04 -05:00
|
|
|
|
2004-03-11 01:28:07 -05:00
|
|
|
include_dirs = includes + [ location ] + CONTRIBS_INC,
|
2003-07-17 22:26:53 -04:00
|
|
|
define_macros = defines + [('wxUSE_DEPRECATED', '0')],
|
2000-12-21 19:06:04 -05:00
|
|
|
|
|
|
|
library_dirs = libdirs,
|
2003-07-23 20:28:34 -04:00
|
|
|
libraries = libs + makeLibName('ogl'),
|
2000-12-21 19:06:04 -05:00
|
|
|
|
|
|
|
extra_compile_args = cflags,
|
|
|
|
extra_link_args = lflags,
|
|
|
|
)
|
|
|
|
|
|
|
|
wxpExtensions.append(ext)
|
|
|
|
|
|
|
|
|
2000-10-30 16:08:42 -05:00
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
# Define the STC extension module
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
2003-03-25 01:35:27 -05:00
|
|
|
if BUILD_STC:
|
2001-07-05 14:54:09 -04:00
|
|
|
msg('Preparing STC...')
|
2000-10-30 16:08:42 -05:00
|
|
|
location = 'contrib/stc'
|
2004-09-25 19:15:58 -04:00
|
|
|
#if os.name == 'nt':
|
|
|
|
STC_H = opj(WXDIR, 'contrib', 'include/wx/stc')
|
|
|
|
#else:
|
|
|
|
# STC_H = opj(WXPREFIX, 'include/wx-%d.%d/wx/stc' % (VER_MAJOR, VER_MINOR))
|
2001-08-31 22:35:31 -04:00
|
|
|
|
2004-01-13 20:51:52 -05:00
|
|
|
## NOTE: need to add something like this to the stc.bkl...
|
2001-08-31 22:35:31 -04:00
|
|
|
|
2003-07-23 20:28:34 -04:00
|
|
|
## # Check if gen_iface needs to be run for the wxSTC sources
|
|
|
|
## if (newer(opj(CTRB_SRC, 'stc/stc.h.in'), opj(CTRB_INC, 'stc/stc.h' )) or
|
|
|
|
## newer(opj(CTRB_SRC, 'stc/stc.cpp.in'), opj(CTRB_SRC, 'stc/stc.cpp')) or
|
|
|
|
## newer(opj(CTRB_SRC, 'stc/gen_iface.py'), opj(CTRB_SRC, 'stc/stc.cpp'))):
|
2001-08-31 22:35:31 -04:00
|
|
|
|
2003-07-23 20:28:34 -04:00
|
|
|
## msg('Running gen_iface.py, regenerating stc.h and stc.cpp...')
|
|
|
|
## cwd = os.getcwd()
|
|
|
|
## os.chdir(opj(CTRB_SRC, 'stc'))
|
|
|
|
## sys.path.insert(0, os.curdir)
|
|
|
|
## import gen_iface
|
|
|
|
## gen_iface.main([])
|
|
|
|
## os.chdir(cwd)
|
2000-10-30 16:08:42 -05:00
|
|
|
|
|
|
|
|
2004-04-15 15:52:50 -04:00
|
|
|
swig_sources = run_swig(['stc.i'], location, GENDIR, PKGDIR,
|
2000-10-30 16:08:42 -05:00
|
|
|
USE_SWIG, swig_force,
|
|
|
|
swig_args + ['-I'+STC_H, '-I'+location],
|
2005-04-16 15:41:33 -04:00
|
|
|
[opj(STC_H, 'stc.h'),
|
|
|
|
opj(location, "_stc_utf8_methods.py"),
|
2005-04-16 17:41:28 -04:00
|
|
|
opj(location, "_stc_docstrings.i"),
|
|
|
|
opj(location, "_stc_gendocs.i"),
|
2005-04-16 15:41:33 -04:00
|
|
|
] + swig_deps)
|
2000-10-30 16:08:42 -05:00
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
ext = Extension('_stc',
|
2003-07-23 20:28:34 -04:00
|
|
|
swig_sources,
|
|
|
|
|
2004-03-11 01:28:07 -05:00
|
|
|
include_dirs = includes + CONTRIBS_INC,
|
2003-07-23 20:28:34 -04:00
|
|
|
define_macros = defines,
|
2000-12-21 19:06:04 -05:00
|
|
|
|
|
|
|
library_dirs = libdirs,
|
2003-07-23 20:28:34 -04:00
|
|
|
libraries = libs + makeLibName('stc'),
|
2000-10-30 16:08:42 -05:00
|
|
|
|
2000-12-21 19:06:04 -05:00
|
|
|
extra_compile_args = cflags,
|
|
|
|
extra_link_args = lflags,
|
|
|
|
)
|
|
|
|
|
|
|
|
wxpExtensions.append(ext)
|
2000-10-30 16:08:42 -05:00
|
|
|
|
|
|
|
|
2004-03-23 00:29:50 -05:00
|
|
|
#----------------------------------------------------------------------
|
|
|
|
# Define the ACTIVEX extension module (experimental)
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
|
|
|
if BUILD_ACTIVEX:
|
|
|
|
msg('Preparing ACTIVEX...')
|
|
|
|
location = 'contrib/activex'
|
|
|
|
axloc = opj(location, "wxie")
|
|
|
|
|
|
|
|
swig_files = ['activex.i', ]
|
|
|
|
|
|
|
|
swig_sources = run_swig(swig_files, location, '', PKGDIR,
|
|
|
|
USE_SWIG, swig_force, swig_args, swig_deps +
|
|
|
|
[ '%s/_activex_ex.py' % location])
|
|
|
|
|
|
|
|
|
|
|
|
ext = Extension('_activex', ['%s/IEHtmlWin.cpp' % axloc,
|
|
|
|
'%s/wxactivex.cpp' % axloc,
|
|
|
|
] + swig_sources,
|
|
|
|
|
|
|
|
include_dirs = includes + [ axloc ],
|
|
|
|
define_macros = defines,
|
|
|
|
|
|
|
|
library_dirs = libdirs,
|
|
|
|
libraries = libs,
|
|
|
|
|
|
|
|
extra_compile_args = cflags,
|
2001-04-30 14:37:26 -04:00
|
|
|
extra_link_args = lflags,
|
|
|
|
)
|
|
|
|
|
|
|
|
wxpExtensions.append(ext)
|
|
|
|
|
|
|
|
|
2001-11-25 04:10:01 -05:00
|
|
|
#----------------------------------------------------------------------
|
|
|
|
# Define the GIZMOS extension module
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
2003-03-25 01:35:27 -05:00
|
|
|
if BUILD_GIZMOS:
|
2001-11-25 04:10:01 -05:00
|
|
|
msg('Preparing GIZMOS...')
|
|
|
|
location = 'contrib/gizmos'
|
|
|
|
|
2003-11-21 15:50:36 -05:00
|
|
|
swig_sources = run_swig(['gizmos.i'], location, GENDIR, PKGDIR,
|
2006-09-12 17:05:20 -04:00
|
|
|
USE_SWIG, swig_force, swig_args, swig_deps +
|
|
|
|
[ '%s/_treelist.i' % location])
|
2001-11-25 04:10:01 -05:00
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
ext = Extension('_gizmos',
|
2004-05-25 00:59:23 -04:00
|
|
|
[ '%s/treelistctrl.cpp' % opj(location, 'wxCode/src') ] + swig_sources,
|
2001-11-25 04:10:01 -05:00
|
|
|
|
2004-05-25 00:59:23 -04:00
|
|
|
include_dirs = includes + [ location, opj(location, 'wxCode/include') ] + CONTRIBS_INC,
|
2001-11-25 04:10:01 -05:00
|
|
|
define_macros = defines,
|
|
|
|
|
|
|
|
library_dirs = libdirs,
|
2003-07-23 20:28:34 -04:00
|
|
|
libraries = libs + makeLibName('gizmos'),
|
2001-11-25 04:10:01 -05:00
|
|
|
|
|
|
|
extra_compile_args = cflags,
|
|
|
|
extra_link_args = lflags,
|
|
|
|
)
|
|
|
|
|
|
|
|
wxpExtensions.append(ext)
|
|
|
|
|
|
|
|
|
2001-12-06 14:59:37 -05:00
|
|
|
#----------------------------------------------------------------------
|
|
|
|
# Define the DLLWIDGET extension module
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
2003-03-25 01:35:27 -05:00
|
|
|
if BUILD_DLLWIDGET:
|
2001-12-06 14:59:37 -05:00
|
|
|
msg('Preparing DLLWIDGET...')
|
|
|
|
location = 'contrib/dllwidget'
|
|
|
|
swig_files = ['dllwidget_.i']
|
|
|
|
|
|
|
|
swig_sources = run_swig(swig_files, location, '', PKGDIR,
|
2002-03-20 15:43:39 -05:00
|
|
|
USE_SWIG, swig_force, swig_args, swig_deps)
|
2001-12-06 14:59:37 -05:00
|
|
|
|
|
|
|
# copy a contrib project specific py module to the main package dir
|
|
|
|
copy_file(opj(location, 'dllwidget.py'), PKGDIR, update=1, verbose=0)
|
2004-03-17 19:46:08 -05:00
|
|
|
CLEANUP.append(opj(PKGDIR, 'dllwidget.py'))
|
2001-12-06 14:59:37 -05:00
|
|
|
|
|
|
|
ext = Extension('dllwidget_c', [
|
|
|
|
'%s/dllwidget.cpp' % location,
|
|
|
|
] + swig_sources,
|
|
|
|
|
2004-03-11 01:28:07 -05:00
|
|
|
include_dirs = includes + CONTRIBS_INC,
|
2001-12-06 14:59:37 -05:00
|
|
|
define_macros = defines,
|
|
|
|
|
|
|
|
library_dirs = libdirs,
|
|
|
|
libraries = libs,
|
|
|
|
|
|
|
|
extra_compile_args = cflags,
|
|
|
|
extra_link_args = lflags,
|
|
|
|
)
|
|
|
|
|
|
|
|
wxpExtensions.append(ext)
|
|
|
|
|
|
|
|
|
2003-03-25 01:35:27 -05:00
|
|
|
|
2004-09-23 12:49:01 -04:00
|
|
|
|
2003-03-25 01:35:27 -05:00
|
|
|
#----------------------------------------------------------------------
|
2004-03-25 16:36:29 -05:00
|
|
|
# Tools, scripts data files, etc.
|
2003-03-25 01:35:27 -05:00
|
|
|
#----------------------------------------------------------------------
|
2001-12-20 12:07:50 -05:00
|
|
|
|
2002-08-12 17:30:02 -04:00
|
|
|
if NO_SCRIPTS:
|
|
|
|
SCRIPTS = None
|
|
|
|
else:
|
2003-03-25 01:35:27 -05:00
|
|
|
SCRIPTS = [opj('scripts/helpviewer'),
|
|
|
|
opj('scripts/img2png'),
|
2002-08-12 17:30:02 -04:00
|
|
|
opj('scripts/img2py'),
|
2004-09-28 20:11:17 -04:00
|
|
|
opj('scripts/img2xpm'),
|
|
|
|
opj('scripts/pyalacarte'),
|
|
|
|
opj('scripts/pyalamode'),
|
2002-08-12 17:30:02 -04:00
|
|
|
opj('scripts/pycrust'),
|
2004-09-28 20:11:17 -04:00
|
|
|
opj('scripts/pyshell'),
|
2003-07-02 19:13:10 -04:00
|
|
|
opj('scripts/pywrap'),
|
|
|
|
opj('scripts/pywrap'),
|
2004-10-06 17:54:49 -04:00
|
|
|
opj('scripts/pywxrc'),
|
2004-09-28 20:11:17 -04:00
|
|
|
opj('scripts/xrced'),
|
2002-08-12 17:30:02 -04:00
|
|
|
]
|
2004-09-28 20:11:17 -04:00
|
|
|
|
2001-12-06 14:59:37 -05:00
|
|
|
|
2001-04-30 14:37:26 -04:00
|
|
|
|
2004-01-13 21:10:32 -05:00
|
|
|
DATA_FILES += find_data_files('wx/tools/XRCed', '*.txt', '*.xrc')
|
|
|
|
DATA_FILES += find_data_files('wx/py', '*.txt', '*.ico', '*.css', '*.html')
|
2003-07-02 19:13:10 -04:00
|
|
|
DATA_FILES += find_data_files('wx', '*.txt', '*.css', '*.html')
|
2003-03-25 01:35:27 -05:00
|
|
|
|
|
|
|
|
2004-03-25 16:36:29 -05:00
|
|
|
if NO_HEADERS:
|
|
|
|
HEADERS = None
|
|
|
|
else:
|
|
|
|
h_files = glob.glob(opj("include/wx/wxPython/*.h"))
|
|
|
|
i_files = glob.glob(opj("src/*.i")) + \
|
|
|
|
glob.glob(opj("src/_*.py")) + \
|
|
|
|
glob.glob(opj("src/*.swg"))
|
2006-10-25 16:47:15 -04:00
|
|
|
if BUILD_GLCANVAS:
|
|
|
|
i_files += glob.glob(opj("contrib/glcanvas/*.i"))
|
2004-03-25 16:36:29 -05:00
|
|
|
|
2004-07-22 14:15:18 -04:00
|
|
|
HEADERS = zip(h_files, ["/wxPython"]*len(h_files)) + \
|
|
|
|
zip(i_files, ["/wxPython/i_files"]*len(i_files))
|
|
|
|
|
2004-03-25 16:36:29 -05:00
|
|
|
|
2004-09-28 20:11:17 -04:00
|
|
|
|
|
|
|
if INSTALL_MULTIVERSION:
|
2006-01-06 02:05:15 -05:00
|
|
|
EXTRA_PATH = getExtraPath(addOpts=EP_ADD_OPTS, shortVer=not EP_FULL_VER)
|
2004-09-28 20:11:17 -04:00
|
|
|
open("src/wx.pth", "w").write(EXTRA_PATH)
|
|
|
|
CLEANUP.append("src/wx.pth")
|
|
|
|
else:
|
|
|
|
EXTRA_PATH = None
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-10-30 16:08:42 -05:00
|
|
|
#----------------------------------------------------------------------
|
|
|
|
# Do the Setup/Build/Install/Whatever
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
2001-02-16 03:19:50 -05:00
|
|
|
if __name__ == "__main__":
|
2003-03-25 01:35:27 -05:00
|
|
|
if not PREP_ONLY:
|
2004-09-28 20:11:17 -04:00
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
setup(name = 'wxPython',
|
2001-02-16 03:19:50 -05:00
|
|
|
version = VERSION,
|
|
|
|
description = DESCRIPTION,
|
|
|
|
long_description = LONG_DESCRIPTION,
|
|
|
|
author = AUTHOR,
|
|
|
|
author_email = AUTHOR_EMAIL,
|
|
|
|
url = URL,
|
2003-10-03 15:51:12 -04:00
|
|
|
download_url = DOWNLOAD_URL,
|
2002-07-05 21:47:31 -04:00
|
|
|
license = LICENSE,
|
2003-10-03 15:51:12 -04:00
|
|
|
platforms = PLATFORMS,
|
|
|
|
classifiers = filter(None, CLASSIFIERS.split("\n")),
|
|
|
|
keywords = KEYWORDS,
|
2003-11-12 16:34:20 -05:00
|
|
|
|
2003-07-02 19:13:10 -04:00
|
|
|
packages = ['wxPython',
|
|
|
|
'wxPython.lib',
|
|
|
|
'wxPython.lib.colourchooser',
|
|
|
|
'wxPython.lib.editor',
|
|
|
|
'wxPython.lib.mixins',
|
|
|
|
'wxPython.tools',
|
|
|
|
|
|
|
|
'wx',
|
2004-03-25 16:36:29 -05:00
|
|
|
'wx.build',
|
2003-07-02 19:13:10 -04:00
|
|
|
'wx.lib',
|
2006-05-22 21:10:25 -04:00
|
|
|
'wx.lib.analogclock',
|
|
|
|
'wx.lib.analogclock.lib_setup',
|
2006-12-05 13:55:40 -05:00
|
|
|
'wx.lib.art',
|
2003-07-02 19:13:10 -04:00
|
|
|
'wx.lib.colourchooser',
|
|
|
|
'wx.lib.editor',
|
2004-06-04 17:29:41 -04:00
|
|
|
'wx.lib.floatcanvas',
|
2004-04-22 18:46:10 -04:00
|
|
|
'wx.lib.masked',
|
2003-07-02 19:13:10 -04:00
|
|
|
'wx.lib.mixins',
|
2004-05-25 22:13:04 -04:00
|
|
|
'wx.lib.ogl',
|
2003-07-02 19:13:10 -04:00
|
|
|
'wx.py',
|
|
|
|
'wx.tools',
|
|
|
|
'wx.tools.XRCed',
|
2001-02-16 03:19:50 -05:00
|
|
|
],
|
|
|
|
|
2004-09-28 20:11:17 -04:00
|
|
|
extra_path = EXTRA_PATH,
|
|
|
|
|
2001-02-16 03:19:50 -05:00
|
|
|
ext_package = PKGDIR,
|
|
|
|
ext_modules = wxpExtensions,
|
2001-12-20 12:07:50 -05:00
|
|
|
|
2004-03-25 16:36:29 -05:00
|
|
|
options = { 'build' : { 'build_base' : BUILD_BASE },
|
|
|
|
},
|
2002-03-13 17:30:20 -05:00
|
|
|
|
2004-03-25 16:36:29 -05:00
|
|
|
scripts = SCRIPTS,
|
2003-03-25 01:35:27 -05:00
|
|
|
data_files = DATA_FILES,
|
2004-03-25 16:36:29 -05:00
|
|
|
headers = HEADERS,
|
2001-12-20 12:07:50 -05:00
|
|
|
|
2004-09-28 20:11:17 -04:00
|
|
|
# Override some of the default distutils command classes with my own
|
|
|
|
cmdclass = { 'install' : wx_install,
|
|
|
|
'install_data': wx_smart_install_data,
|
2004-03-25 16:36:29 -05:00
|
|
|
'install_headers': wx_install_headers,
|
|
|
|
'clean': wx_extra_clean,
|
|
|
|
},
|
2001-02-16 03:19:50 -05:00
|
|
|
)
|
2000-10-30 16:08:42 -05:00
|
|
|
|
2006-07-05 01:23:28 -04:00
|
|
|
setup(name = 'wxaddons',
|
|
|
|
version = VERSION,
|
|
|
|
description = DESCRIPTION,
|
|
|
|
long_description = LONG_DESCRIPTION,
|
|
|
|
author = AUTHOR,
|
|
|
|
author_email = AUTHOR_EMAIL,
|
|
|
|
url = URL,
|
|
|
|
download_url = DOWNLOAD_URL,
|
|
|
|
license = LICENSE,
|
|
|
|
platforms = PLATFORMS,
|
|
|
|
classifiers = filter(None, CLASSIFIERS.split("\n")),
|
|
|
|
keywords = KEYWORDS,
|
|
|
|
|
|
|
|
packages = ['wxaddons']
|
|
|
|
)
|
2000-10-30 16:08:42 -05:00
|
|
|
|
2004-09-28 20:11:17 -04:00
|
|
|
if INSTALL_MULTIVERSION:
|
|
|
|
setup(name = 'wxPython-common',
|
|
|
|
version = VERSION,
|
|
|
|
description = DESCRIPTION,
|
|
|
|
long_description = LONG_DESCRIPTION,
|
|
|
|
author = AUTHOR,
|
|
|
|
author_email = AUTHOR_EMAIL,
|
|
|
|
url = URL,
|
|
|
|
download_url = DOWNLOAD_URL,
|
|
|
|
license = LICENSE,
|
|
|
|
platforms = PLATFORMS,
|
|
|
|
classifiers = filter(None, CLASSIFIERS.split("\n")),
|
|
|
|
keywords = KEYWORDS,
|
|
|
|
|
|
|
|
package_dir = { '': 'wxversion' },
|
|
|
|
py_modules = ['wxversion'],
|
|
|
|
|
|
|
|
data_files = [('', ['src/wx.pth'])],
|
|
|
|
|
|
|
|
options = { 'build' : { 'build_base' : BUILD_BASE },
|
|
|
|
},
|
|
|
|
|
|
|
|
cmdclass = { 'install_data': wx_smart_install_data,
|
|
|
|
},
|
|
|
|
)
|
|
|
|
|
2000-10-30 16:08:42 -05:00
|
|
|
#----------------------------------------------------------------------
|
|
|
|
#----------------------------------------------------------------------
|