~ubuntu-branches/ubuntu/warty/pygame/warty

« back to all changes in this revision

Viewing changes to install.html

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2004-09-17 17:09:53 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040917170953-caomeukd8awvvpwv
Tags: 1.6-0.2ubuntu1
Add missing build-depends: python

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
installation package. This will add easy links to the different documentation
34
34
and games that come with pygame. The installer for this is found
35
35
next to the other windows binary downloads. The filename looks like this;
36
 
"pygame-docs-1.3.exe". And this would install the documentation and
37
 
examples for pygame-1.3.
 
36
"pygame-docs-1.6.exe". And this would install the documentation and
 
37
examples for pygame-1.6.
38
38
</p><p>
39
39
One other thing the windows binaries are missing is the Numeric Python
40
40
package. You can easily install this separately and it will allow you to use
49
49
different distributions.
50
50
<p></p>
51
51
There are several binary RPM packages for linux machines. These are
52
 
actually a little bit of work to install, since you will also need
53
 
several RPM packages for the dependencies. There is a good chance
 
52
actually a little bit of work to install, since you will also need several
 
53
RPM packages for the dependencies. There is a good chance
54
54
your linux distribution came with the needed dependencies (like Python
55
 
and SDL). There are binary RPMs available from the
56
 
website for each dependency.
57
 
</p><p>
 
 
b'For debian systems, pygame is actively maintained in the debian'
58
 
archives. It is available for the "woody" release. Visit the
59
 
debian pygame page for more information.
60
 
<a href=http://packages.debian.org/cgi-bin/search_packages.pl?keywords=pygame>http://packages.debian.org/cgi-bin/search_packages.pl?keywords=pygame</a>
 
55
and SDL). There are binary RPMs available from the website for each dependency.
 
56
</p><p>
 
57
For debian systems, pygame is actively maintained in the debian
 
58
archives.  Visit the debian pygame page for more information.
 
59
<a href=http://packages.qa.debian.org/p/pygame.html>http://packages.qa.debian.org/p/pygame.html</a>
61
60
</p><p>
62
61
FreeBSD also has an active pygame package. While techinicaly it
63
 
isn't binary, it is automatically built and installed by the 
 
62
isn't binary, it is automatically built and installed by the
64
63
ports manager. See the FreeBSD package page for more information.
65
64
<a href=http://www.freebsd.org/cgi/ports.cgi?query=py-game&stype=name>http://www.freebsd.org/cgi/ports.cgi?query=py-game&stype=name</a>
 
65
</p><p>
 
66
Gentoo has a builtin package for pygame. This is compiled for
 
67
your system as it installs, similar to BSD,
 
68
<a href=http://www.gentoo.org/dyn/pkgs/dev-python/pygame.xml>http://www.gentoo.org/dyn/pkgs/dev-python/pygame.xml</a>
66
69
</p></blockquote><br>
67
70
 
68
71
<big><b><u>Macintosh Binaries</u></b></big><blockquote><p>
69
 
There are separate binaries for both MacOS and OSX. For both
70
 
these operating systems, there are several remaining problems
71
 
with the Python and SDL dependencies. Therefore the binary
72
 
packages for pygame also come with fixed versions of python
73
 
and the SDL libraries. 
74
 
<p></p>
75
 
For MacOS, binaries are available on the pygame downloads page. 
 
72
For OSX 10.2 and aboce, binary packages are availaboe from Bob Ippolito's
 
73
Package Manager repository. This package requires python 2.3, and does
 
74
not work with the 'Fink' version of Python. The package and instructions
 
75
are at <a href="http://undefined.org/python/pimp/">http://undefined.org/python/pimp/</a> and will automatically
 
76
install dependencies.  Instructions for making application bundles
 
77
for OS X that use pygame are forthcoming, but read up on
 
78
bundlebuilder in the meantime.
 
79
</p><p>
 
80
For MacOS 9.x, binaries are available on the pygame downloads page.
76
81
<a href=http://www.pygame.org/download.shtml>http://www.pygame.org/download.shtml</a>.
77
 
Unfortunately the binaries are stuck at pygame version-1.1.
78
 
<p></p>
79
 
For OSX, there is also a large collection of binary files. Currently
80
 
these are available at the OSX packager's website,
81
 
<a href=http://redivi.com/~bob/>http://redivi.com/~bob/</a>.
82
 
Visit the site for more information on current issues with the
83
 
OSX port, as well as screenshots of OSX pygame in action.
 
82
Unfortunately the binaries are stuck at pygame version-1.1. This also only works with
 
83
an old copy of <tt>MacPython 2.1</tt>.
84
84
</p></blockquote><br>
85
85
 
 
86
<hr><br>
86
87
 
87
88
<big><b><u>Installing From Source</u></b></big><blockquote><p>
88
89
Compiling and installing pygame is handled by Python's distutils.
90
91
the flags needed to build pygame. Use the "setup.py" script to
91
92
start the installation.
92
93
<p></p>
93
 
The first time you run the setup script, it will call the 
94
 
"config.py" script. This will build a "Setup" file which
 
94
The first time you run the setup script, it will call the
 
95
"<tt>config.py</tt>" script. This will build a "<tt>Setup</tt>" file which
95
96
stores all the information needed to compile. The "config.py"
96
97
will do a good job of detecting what dependencies are available
97
98
and where they are located. If it isn't perfect, it is easy to
98
 
build your own, or edit the created "Setup" text file. This
99
 
"Setup" file is a simple Makefile-like text file. It defines
 
99
build your own, or edit the created "<tt>Setup</tt>" text file. This
 
100
"<tt>Setup</tt>" file is a simple Makefile-like text file. It defines
100
101
variables needed to use each dependency, and then enables
101
102
all the pygame modules with found dependencies. If you have
102
103
trouble compiling, you should be able to easily fix any problems
103
 
inside the "Setup" file.
 
104
inside the "<tt>Setup</tt>" file.
104
105
<p></p>
105
 
Running the "setup.py" script will call distutils to build and
 
106
Running the "<tt>setup.py</tt>" script will call distutils to build and
106
107
install the pygame package. Distutils actually supports a wide
107
 
variety of compile and install options. running "python setup.py help"
 
108
variety of compile and install options. running "<tt>python setup.py help</tt>"
108
109
will start to show you the different options available. You can
109
110
change many things like install locations, compiler to use, and more.
110
111
Calling the "setup.py" script with no arguments and it will just
120
121
this prebuilt directory and make use of it for you.
121
122
<a href=http://www.pygame.org/ftp/win32-dependencies.zip>http://www.pygame.org/ftp/win32-dependencies.zip</a>.
122
123
If you don't use the prebuilt binaries directory, the autoconfig
123
 
script will scan the neighboring directory trees to find the 
 
124
script will scan the neighboring directory trees to find the
124
125
dependencies.
125
126
<p></p>
126
127
When installing on windows, the "setup.py" script will also copy
127
128
all the used .DLL files into the pygame directory.
 
129
<p></p>
 
130
If compiling with VisualC, these instructions are all you'll need
 
131
to do. If you are using Borland's free compiler or cygwin, you will
 
132
need an extra step. You need to convert the VisualC style .LIB files
 
133
into the format used by your compiler. Both Borland and Cygwin include
 
134
a command to do this. To convert the python library the command looks
 
135
like this with Borland: <tt>COFF2OMF python22.lib python22_bcpp.lib</tt>.
 
136
For Cygwin, this is the command you need: <tt>DLLTOOL --dllname python15.dll --def python15.def --output-lib
 
137
libpython15.a</tt>. You will also need to do this conversion on all the
 
138
LIB files that come with the prebuilt dependencies (in the <tt>prebuilt/lib</tt> directory).
 
139
Note that with cygwin you should replace the <tt>--def</tt> flag and argument
 
140
with <tt>--export-all-symbols</tt> since they do not come with .def files.
 
141
</p><p>
 
142
Mingw is well supported by SDL, but a little rougher for python extensions.
 
143
Here is a link with more information to compiling with non-ms compilers.
 
144
<a
 
145
href=http://www.python.org/doc/current/inst/non-ms-compilers.html>http://www.python.org/doc/current/inst/non-ms-compilers.html</a>
128
146
</p></blockquote><br>
129
147
 
130
148
<big><b><u>Unix Compiling Info</u></b></big><blockquote><p>
131
149
Compiling from linux shouldn't give you any problems. One thing
132
 
you must keep in mind is that most linux packages separate the
133
 
actual library from the "dev" files needed to compile. To build on
134
 
linux you'll need to make sure the packages like "SDL-dev" are
 
150
you must keep in mind is that most linux RPM packages separate the
 
151
actual library from the "<tt>dev</tt>" files needed to compile. To build you
 
152
will need to make sure the packages like "<tt>SDL-dev</tt>" are
135
153
installed.
136
154
<p></p>
137
155
You can check to see if SDL is ready to be built from by running
138
 
the command "sdl-config" and seeing if it is found.
139
 
<p></p>
140
 
Depending on where the SMPEG headers are installed, the pygame
141
 
"config.py" script might not actually find it. If this happens
142
 
you can easily fix the SMPEG line in the "Setup" script to
143
 
use the correct flags. Then also uncomment the line for the
144
 
"movie" module.
145
 
<p></p>
146
 
Several users have run into error compiling when trying to use the
147
 
Numeric Python header files. This is a problem with the autoconfigure
148
 
script. The script foolishly assumes if it can import the Numeric
149
 
module, then the headers will be available for compile. You need
150
 
to either install the correct "python-numeric-dev" package for your
151
 
system, or comment out the line for "surfarray" in the "Setup" file.
152
 
</p></blockquote><br>
 
156
the command <tt>sdl-config</tt> and seeing if it is found. If the
 
157
<tt>sdl-config</tt> script is not on the path (or you have more than
 
158
one?) Set the environment variable <tt>SDL_CONFIG</tt> to its location.
 
159
</p>
 
160
<p>Sometimes you will have the SDL libraries installed in once
 
161
location, and the other SDL libraries in another. This tricks the
 
162
pygame config scripts, but you can help it out by setting the
 
163
environment <tt>LOCALBASE</tt> to a path prefix where the other libraries
 
164
are. The common case for this is SDL installed in /usr and other
 
165
SDL libs installed in /usr/local. The command for this situation
 
166
is "<tt>LOCALBASE=/usr/local python setup.py install</tt>".
 
167
</blockquote><br>
153
168
 
154
 
<big><b><u>OSX Compiling Info</u></b></big><blockquote><p>
155
 
Building pygame on OSX is not really supported yet. Actually,
156
 
the "config.py" script will actually do a good job on OSX.
157
 
Unfortunately, there are some bugs with both SDL and Python
158
 
for OSX, so it will be difficult to build a working version
159
 
of pygame on your own. You will also need to build the SDL
160
 
libraries as ".dylib" libraries, which is not the default
161
 
build mode for these.
 
169
<big><b><u>OS X Compiling Info</u></b></big><blockquote><p>
 
170
Make sure to have Numeric, PyObjC, PIL, and the SDL development frameworks
 
171
installed.  Compilation should work just same as the unix compiling
 
172
instructions. Python 2.3 and OSX 10.2 are required.
162
173
</p></blockquote><br>
163
174