diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2000-06-10 18:02:12 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2000-06-10 18:02:12 +0000 |
commit | 6de89c9ab78a557f98dc02dca97795d27a4112d2 (patch) | |
tree | 4b1a26308ed5013424b39847f0c7b2aad355e606 /src/interfaces/python | |
parent | 2ae20ef98a94c6a0f77e6358ae756cc02f29e921 (diff) | |
download | postgresql-6de89c9ab78a557f98dc02dca97795d27a4112d2.tar.gz postgresql-6de89c9ab78a557f98dc02dca97795d27a4112d2.zip |
Moved the intricacies of the perl interface build into its own makefile
that now functions as a wrapper around the MakeMaker stuff. It might
even behave sensically when we have separate build dirs. Same for plperl,
which of course still doesn't work very well. Made sure that plperl
respects the choice of --libdir.
Added --with-python to automatically build and install the Python interface.
Works similarly to the Perl5 stuff.
Moved the burden of the distclean targets lower down into the source tree.
Eventually, each make file should have its own.
Added automatic remaking of makefiles and configure. Currently only for the
top-level because of a bug(?) in Autoconf. Use GNU `missing' to work around
missing autoconf and aclocal. Start factoring out macros into their own
config/*.m4 files to increase readability and organization.
Diffstat (limited to 'src/interfaces/python')
-rw-r--r-- | src/interfaces/python/GNUmakefile.in | 74 | ||||
-rw-r--r-- | src/interfaces/python/Setup.in.raw | 3 | ||||
-rw-r--r-- | src/interfaces/python/pgmodule.c | 2 |
3 files changed, 78 insertions, 1 deletions
diff --git a/src/interfaces/python/GNUmakefile.in b/src/interfaces/python/GNUmakefile.in new file mode 100644 index 00000000000..2dd40954e3d --- /dev/null +++ b/src/interfaces/python/GNUmakefile.in @@ -0,0 +1,74 @@ +#------------------------------------------------------------------- +# +# Makefile for src/interfaces/python, a.k.a. "PyGreSQL" +# +# Written by Peter Eisentraut <peter_e@gmx.net> +# +# $Header: /cvsroot/pgsql/src/interfaces/python/Attic/GNUmakefile.in,v 1.1 2000/06/10 18:02:00 petere Exp $ +# +#------------------------------------------------------------------- + +srcdir = @srcdir@ +VPATH = @srcdir@ + +top_srcdir = @top_srcdir@ +top_builddir = ../../.. + + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +libdir = @libdir@ +includedir = @includedir@ + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ + +LIBS = @LIBS@ + +PYTHON = @PYTHON@ +python_extmakefile = @python_extmakefile@ +python_moduledir = @python_moduledir@ + + +all: Makefile pgmodule.c libpq-all + $(MAKE) -f Makefile + +libpq-all: + $(MAKE) -C $(top_builddir)/src/interfaces/libpq all + +Makefile: Setup.in Makefile.pre.in + $(MAKE) -f Makefile.pre.in boot srcdir=$(srcdir) VPATH=$(srcdir) + +Makefile.pre.in: $(python_extmakefile) + cp $< $@ + +Setup.in: Setup.in.raw + sed -e "s%__LIBPQ__%${top_srcdir}/src/interfaces/libpq%g" \ + -e "s%__EXTRA_LIBS__%${LIBS}%g" \ + -e "s%__INCLUDES__%${top_srcdir}/src/include%g" \ + < $< > $@ + +install: all + @echo "Installing Python module" + @if ! ( $(INSTALL_DATA) pg.py $(python_moduledir) && \ + $(MAKE) -f Makefile install ); then \ + echo "*****" ;\ + echo "* Skipping the installation of the Python interface module for lack"; \ + echo "* of permissions. To install it, change to the directory"; \ + echo "* "`pwd`", become the appropriate"; \ + echo "* user, and do \`$(MAKE) install'."; \ + echo "*****"; \ + fi + + +# Python sometimes has a different idea what exactly "clean" is. + +clean: + -[ -f Makefile ] && $(MAKE) -f Makefile clobber + rm -f Makefile.pre.in Makefile Setup Setup.in + +distclean maintainer-clean: clean + rm -f GNUmakefile + + +.PHONY: all libpq-all install clean distclean maintainer-clean diff --git a/src/interfaces/python/Setup.in.raw b/src/interfaces/python/Setup.in.raw new file mode 100644 index 00000000000..dddb5588102 --- /dev/null +++ b/src/interfaces/python/Setup.in.raw @@ -0,0 +1,3 @@ +*shared* + +_pg pgmodule.c -I__LIBPQ__ -I__INCLUDES__ -L__LIBPQ__ -lpq __EXTRA_LIBS__ diff --git a/src/interfaces/python/pgmodule.c b/src/interfaces/python/pgmodule.c index 03424b805c2..967ac536008 100644 --- a/src/interfaces/python/pgmodule.c +++ b/src/interfaces/python/pgmodule.c @@ -680,7 +680,7 @@ static char connect__doc__[] = static PyObject * pgconnect(pgobject * self, PyObject * args, PyObject * dict) { - static const char *kwlist[] = {"dbname", "host", "port", "opt", + static char *kwlist[] = {"dbname", "host", "port", "opt", "tty", "user", "passwd", NULL}; char *pghost, *pgopt, |