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