Carsten Haese wrote: > On Wed, 2005-11-23 at 08:01, Tin Gherdanarra wrote: > >>Hallo, >> >>I'm trying to install pypgsql. However, I get syntax errors >>while compiling the C sources. The following excerpt >>from pgconnection.h looks a little funny to me: >> >>typedef struct { >> PyObject_HEAD /* Here is the syntax error, and rightly so */ >> PGconn *conn; >> PyObject *host; >> PyObject *port; >> PyObject *db; >> PyObject *options; >> PyObject *tty; >> PyObject *user; >> PyObject *pass; >> PyObject *bePID; >> PyObject *socket; >> PyObject *version; >> PyObject *notices; >> PyObject *cinfo; >> int showQuery; >>} PgConnection; >> >> >>I don't know what PyObject_HEAD or PGconn is, >>but if they are types, a syntax error is justified here: > > > PyObject_HEAD is not a type, it is a macro that defines struct members > that all Python objects have in common. The macro definition has a > semicolon at the end, so when the macro is expanded, the result is > syntactically correct, even though the above looks wrong on the surface.
Aha! Weird! > > What error messages are you actually getting? If you are getting a long > list of errors, please give us the first few rather than the last few. The aforementioned error was the first one. I "fixed" it by delegating the installation/build to apt-get python-pgsql. That did it for me. Unfortunately, I can't duplicate the errors now. This probably means that apt-get automatically failed to install some stuff I failed to do. However, I don't think that you miss anything interesting, i.e. a bug in pysql or so. This was just a newbie problem. Thanks all the same Tin > > -Carsten > > -- http://mail.python.org/mailman/listinfo/python-list