File: install_notes.html

package info (click to toggle)
python-gd 0.26-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 216 kB
  • ctags: 103
  • sloc: ansic: 1,350; makefile: 64; python: 26
file content (72 lines) | stat: -rw-r--r-- 2,631 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>gd module install notes</title>
<style>
    body    { font-family: arial, helvetica; }
    code    { font-size: 110%; }
</style>
</head>
<body>
<h2>gd module install notes</h2>

I'm going to assume that you've got the GD library installed, which
is pretty trivial to do. If you're having troubles with that, I
suggest you have a look at that package's
<a href="http://www.boutell.com/gd/">instructions</a>. 

<p>
This version of gdmodule is written assuming you have PNG, JPEG, FreeType,
and Xpm libraries incorporated into your copy of GD.  If you have an
incomplete version you will have difficulty getting this one to build.

<p>Now, for gdmodule, you'll need to do one of two things. You have
the option to link the gdmodule into Python itself or to make it
dynamically loadable.</p>

<h4>option 1</h4>

Determine the installation location (prefix) of Python on your
system. This may be done using the command "<code>python -c 'import
sys;print sys.prefix'</code>". Once you have determined the install
prefix, then grab the file <code>Makefile.pre.in</code> from <em>
prefix</em>/lib/python1.5/config. 

<p>
I have provided a sample of this file, from Python 1.5, but you would
do well to copy the one from your build.  Also, if you are using Mingw32
(to build for Windows) you are on your own at the moment.

<p> Now that Makefile.pre.in is in the same directory as the
gdmodule.c source and Setup.in, edit Setup.in to ensure that the GD
library include and lib paths are correct.

<p>Now type "<code>make -f Makefile.pre.in boot; make</code>". You
should now have a working gdmodule.so. You should be able to
execute the "gddemo.py" script with no errors. Once you have
determined that it's all compiled ok, copy gdmodule.so to <em>
prefix</em>/lib/python1.5/site-packages (you may need to actually
make this directory).

<h4>option 2</h4>

This requires that you are able to either compile &amp; install
Python yourself or are good friends with the person who does :) You
need to copy the gdmodule.c file to the Modules directory and edit
the "Setup.in" file to add the following lines at the end: 

<blockquote>
<pre>
# Richard Jones' GD module.
gd gdmodule.c -I/usr/local/include -L/usr/local/lib -L/usr/lib/X11 -L/usr/X11R6/lib -lgd -lz -lpng -ljpeg -lttf -lX11 -lXpm
</pre>
</blockquote>

Once you've done that, you'll need to delete the "Setup" file and
type "make Setup". Then go up to the main Python directory and type
"make install" and you're done. You should now be able to execute
the "gddemo.py" script with no errors. 

</body>
</html>