mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-07-07 05:03:04 +03:00
Added note about missign pg headers to INSTALL.
This commit is contained in:
parent
d061b384d9
commit
b651781f63
20
INSTALL
20
INSTALL
|
@ -7,9 +7,7 @@ Compiling and installing psycopg
|
||||||
libpq will leak memory.
|
libpq will leak memory.
|
||||||
|
|
||||||
While psycopg 1.x used autoconf for its build process psycopg 2 switched to
|
While psycopg 1.x used autoconf for its build process psycopg 2 switched to
|
||||||
the more pythoning setup.py. Currently both psycopg's author and distutils
|
the more pythoning setup.py. Before building psycopg look at setup.cfg file
|
||||||
have some limitations so the file setup.cfg is almost unused and most build
|
|
||||||
options are hidden in setup.py. Before building psycopg look at setup.cfg file
|
|
||||||
and change any settings to follow your system (or taste); then:
|
and change any settings to follow your system (or taste); then:
|
||||||
|
|
||||||
python setup.py build
|
python setup.py build
|
||||||
|
@ -21,6 +19,21 @@ to build in the local directory; and:
|
||||||
to install system-wide.
|
to install system-wide.
|
||||||
|
|
||||||
|
|
||||||
|
Common errors and build problems
|
||||||
|
================================
|
||||||
|
|
||||||
|
One of the most common errors is trying to build psycopg without the right
|
||||||
|
development headers for PostgreSQL, Python or both. If you get errors, look
|
||||||
|
for the following messages and then take the appropriate action:
|
||||||
|
|
||||||
|
libpq-fe.h: No such file or directory
|
||||||
|
PostgreSQL headers are not properly installed on your system or are
|
||||||
|
installed in a non default path. First make sure they are installed, then
|
||||||
|
check setup.cfg and make sure pg_config points to a valid pg_config
|
||||||
|
executable. If you don't have a working pg_config try to play with the
|
||||||
|
include_dirs variable (and note that a working pg_config is better.)
|
||||||
|
|
||||||
|
|
||||||
Using setuptools and EasyInstall
|
Using setuptools and EasyInstall
|
||||||
================================
|
================================
|
||||||
|
|
||||||
|
@ -46,3 +59,4 @@ First you need to create a libpython2X.a as described in
|
||||||
http://starship.python.net/crew/kernr/mingw32/Notes.html. Then run:
|
http://starship.python.net/crew/kernr/mingw32/Notes.html. Then run:
|
||||||
|
|
||||||
python setup.py build_ext --compiler=mingw32 install
|
python setup.py build_ext --compiler=mingw32 install
|
||||||
|
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -272,7 +272,6 @@ ext.append(Extension("psycopg2._psycopg", sources,
|
||||||
define_macros=define_macros,
|
define_macros=define_macros,
|
||||||
include_dirs=include_dirs,
|
include_dirs=include_dirs,
|
||||||
undef_macros=[]))
|
undef_macros=[]))
|
||||||
|
|
||||||
setup(name="psycopg2",
|
setup(name="psycopg2",
|
||||||
version=PSYCOPG_VERSION,
|
version=PSYCOPG_VERSION,
|
||||||
maintainer="Federico Di Gregorio",
|
maintainer="Federico Di Gregorio",
|
||||||
|
@ -291,3 +290,4 @@ setup(name="psycopg2",
|
||||||
packages=['psycopg2'],
|
packages=['psycopg2'],
|
||||||
cmdclass={ 'build_ext': psycopg_build_ext },
|
cmdclass={ 'build_ext': psycopg_build_ext },
|
||||||
ext_modules=ext)
|
ext_modules=ext)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user