]> git.saurik.com Git - wxWidgets.git/blame - wxPython/docs/INSTALL.html
log wxChoice events in the same format as wxComboBox ones to make it simpler to compa...
[wxWidgets.git] / wxPython / docs / INSTALL.html
CommitLineData
8eda5e35
RD
1<?xml version="1.0" encoding="iso-8859-1" ?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
c66cd08a 6<meta name="generator" content="Docutils 0.3.7: http://docutils.sourceforge.net/" />
05d6c206 7<title>Installing wxPython 2.6 from Source</title>
8eda5e35
RD
8<link rel="stylesheet" href="default.css" type="text/css" />
9</head>
10<body>
05d6c206
RD
11<div class="document" id="installing-wxpython-2-6-from-source">
12<h1 class="title">Installing wxPython 2.6 from Source</h1>
8eda5e35 13<p>This document will describe the few differences and additions to the
2e957aae
RD
14content in the <a class="reference" href="BUILD.html">BUILD</a> document for installing wxPython built from
15source. Please follow the intstructions both in this file and in
16<a class="reference" href="BUILD.html">BUILD</a> to perform this task. Where there is overlap the items
17described here will take precedence for doing installations.</p>
8eda5e35
RD
18<div class="section" id="installing-on-unix-like-systems-not-os-x">
19<h1><a name="installing-on-unix-like-systems-not-os-x">Installing on Unix-like Systems (not OS X)</a></h1>
20<ol class="arabic">
fc33e5e1 21<li><p class="first">When building wxWidgets you need to decide if you want it to be a
8eda5e35
RD
22private copy only accessed by wxPython, or if you would like it to
23be installed in a stanard location such as /usr. Or perhaps you
fc33e5e1 24already have a version of wxWidgets installed on your system (such
8eda5e35
RD
25as from an RPM) and you want wxPython to use that version too. If
26so then you'll want to ensure that the flags and options used to
27build the installed version are compatible with wxPython.</p>
28</li>
fc33e5e1 29<li><p class="first">If you do decide to build and install your own wxWidgets then there
8eda5e35
RD
30are a few tweaks to the configure flags described in BUILD.txt that
31you will probably want to make. Instead of --enable-debug use
32this configure flag:</p>
33<pre class="literal-block">
34--enable-optimize \
35</pre>
fc33e5e1 36<p>Normally I also use the following flag in order to have wxWidgets
8eda5e35
RD
37runtime assertions turned into Python exceptions where possible.
38It does add extra code to the build but probably not enough to
39worry about it. However if you want to get as lean a build as
40possible you can leave it out, but if your code does something bad
2e957aae
RD
41then instead of exceptions you'll likely get a crash:</p>
42<pre class="literal-block">
43--enable-debug_flag \
44</pre>
fc33e5e1 45<p>If you are building a private copy of wxWidgets (IOW, not installed
8eda5e35
RD
46in a standard library location) then it can be kind of a hassle to
47always have to set the LD_LIBRARY_PATH variable so wxPython can
fc33e5e1 48find the wxWidgets shared libraries. You can hard code the library
8eda5e35 49path into the binaries by using the rpath option when configuring
fc33e5e1 50wxWidgets. For example:</p>
8eda5e35 51<pre class="literal-block">
05d6c206 52--enable-rpath=/opt/wx/2.6/lib \
8eda5e35
RD
53</pre>
54<p>SOLARIS NOTE: The --enable-rpath option may cause problems when
55using wxGTK on Solaris when compiling wxPython as described below.
56The woraround is to not use --enable-rpath flag for configure, but
57in that case all wxPython applications <em>must</em> have the
58LD_LIBRARY_PATH set to include $WXPREF/lib, or you can use the
59'crle' program to modify the runtime linking environment. If this
60is the only installation of wxGTK on the system then you can use a
61system library path for prefix and not have to worry about it at
62all.</p>
63</li>
64<li><p class="first">Build and install wxGTK as described in BUILD.txt.</p>
65</li>
66<li><p class="first">In addition to building wxPython as described in BUILD.txt, you can
67install it to Python's site-packages dir, as well as some scripts
60b517c1
RD
68into the same bin dir used by Python by using this command, plus
69whatever WXPORT, UNICODE, etc. settings you used for the initial
70build step:</p>
8eda5e35 71<pre class="literal-block">
60b517c1 72python2.3 setup.py install
8eda5e35
RD
73</pre>
74<p>If you would like to install to some place besides the prefix where
75Python is installed, (such as to your home directory) then you can
76add &quot;--root=&lt;path&gt;&quot; after the &quot;install&quot; command. This will use
77&lt;path&gt; as the prefix and will install scripts to a bin subdir and
78the wxPython packages to a lib subdir. To use wxPython like this
79you'll need to ensure that the directory containing wxPython is
80contained in the PYTHONPATH environment variable.</p>
81</li>
82</ol>
83</div>
84<div class="section" id="installing-on-os-x">
85<h1><a name="installing-on-os-x">Installing on OS X</a></h1>
86<p>Installing wxPython on OS X is nearly the same as the Unix
87instructions above, except for a few small, but important details:</p>
88<ol class="arabic simple">
89<li>The --enable-rpath configure option is not needed since the path to
fc33e5e1 90the wxWidgets dylibs will automatically be encoded into the
8eda5e35 91extension modules when they are built. If you end up moving the
fc33e5e1 92wxWidgets dynlibs to some other location (such as inside the .app
8eda5e35
RD
93bundle of your applicaiton for distribution to other users,) then
94you will need to set DYLD_LIBRARY_PATH to this location so the
95dylibs can be found at runtime.</li>
96<li>Depending on the version of OS X Python may be installed in
97different locations. On 10.2 (Jaguar) you need to download and
98install MacPython-OSX-2.3 from <a class="reference" href="http://www.python.org/">http://www.python.org/</a> and the
99Python Framework will then be installed in /Library/Frameworks. On
10010.3 (Panther) Apple supplies the Python Framework as part of the
101OS install, but it will be located in /System/Library/Frameworks
40efbdda
RD
102instead. However, on Panther the site-packages dir is sym-linked
103to /Library/Python/2.3 so the wxPython packages will end up there,
8eda5e35
RD
104although they will still be visible from site-packages. If you are
105building distributions of wxPython to be installed on other
106machines be careful to install to /Library/Python/2.3. To
107complicate things further, the Jaguar version, or a custom build
108you do yourself will end up in /Library/Frameworks even on
109Panther...</li>
60b517c1
RD
110<li>You need to use pythonw at the command line or the PythonLauncher
111app to run wxPython apps, otherwise the app will not be able to
112fully use the GUI display.</li>
8eda5e35
RD
113</ol>
114</div>
115<div class="section" id="installing-on-windows">
116<h1><a name="installing-on-windows">Installing on Windows</a></h1>
117<ol class="arabic">
fc33e5e1 118<li><p class="first">Build wxWidgets and wxPython as described in BUILD.txt. If you
8eda5e35
RD
119would rather have a version without the code that turns runtime
120assertions into Python exceptions, then use &quot;release&quot; instead of
fc33e5e1 121&quot;hybrid&quot; when building wxWidgets and add &quot;FINAL=1&quot; to the setup.py
8eda5e35
RD
122command line.</p>
123</li>
40efbdda
RD
124<li><p class="first">Install wxPython like this. Remember to add any additional flags
125you added for the build such as UNICODE or USE_SWIG:</p>
8eda5e35
RD
126<pre class="literal-block">
127python setup.py install
128</pre>
129</li>
fc33e5e1 130<li><p class="first">Copy the wxWidgets DLLs to the wx package directory so they can be
8eda5e35
RD
131found at runtime by the extension modules without requiring that
132they be installed on the PATH:</p>
133<pre class="literal-block">
40efbdda 134copy %WXWIN%\lib\vc_dll\wx*h_*.dll c:\Python23\Lib\site-packages\wx
8eda5e35
RD
135</pre>
136</li>
137</ol>
138</div>
139</div>
8eda5e35
RD
140</body>
141</html>