~groldster/ubuntu/maverick/psycopg2/merge-611040

« back to all changes in this revision

Viewing changes to INSTALL

  • Committer: Bazaar Package Importer
  • Author(s): Fabio Tranchitella
  • Date: 2006-08-09 10:28:30 UTC
  • Revision ID: james.westby@ubuntu.com-20060809102830-grac1dsp24uyqfp4
Tags: upstream-2.0.4
ImportĀ upstreamĀ versionĀ 2.0.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Compiling and installing psycopg
 
2
********************************
 
3
 
 
4
** Important note: if you plan to use psyopg2 in a multithreaed application
 
5
   make sure that your libpq has been compiled with the --with-thread-safety
 
6
   option. psycopg2 will work correctly even with a non-thread-safe libpq but
 
7
   libpq will leak memory.
 
8
 
 
9
While psycopg 1.x used autoconf for its build process psycopg 2 switched to
 
10
the more pythoning setup.py. Currently both psycopg's author and distutils
 
11
have some limitations so the file setup.cfg is almost unused and most build
 
12
options are hidden in setup.py. Before building psycopg look at setup.cfg file
 
13
and change any settings to follow your system (or taste); then:
 
14
 
 
15
    python setup.py build
 
16
 
 
17
to build in the local directory; and:
 
18
 
 
19
    python setup.py install
 
20
    
 
21
to install system-wide.
 
22
 
 
23
 
 
24
Using setuptools and EasyInstall
 
25
================================
 
26
 
 
27
If setuptools are installed on your system you can easily create an egg for
 
28
psycopg and install it. Download the source distribution (if you're reading
 
29
this file you probably already have) and then edit setup.cfg to your taste
 
30
and build from the source distribution top-level directory using:
 
31
 
 
32
    easy_install .
 
33
 
 
34
 
 
35
Compiling under Windows with mingw32
 
36
====================================
 
37
 
 
38
You can compile psycopg under Windows platform with mingw32
 
39
(http://www.mingw.org/) compiler. MinGW is also shipped with IDEs such as
 
40
Dev-C++ (http://www.bloodshed.net/devcpp.html) and Code::Blocks
 
41
(http://www.codeblocks.org). gcc binaries should be in your PATH.
 
42
 
 
43
You need a PostgreSQL with include and libary files installed. At least v8.0 is required.
 
44
 
 
45
First you need to create a libpython2X.a as described in 
 
46
http://starship.python.net/crew/kernr/mingw32/Notes.html. Then run:
 
47
 
 
48
    python setup.py build_ext --compiler=mingw32 install