See attached for a small patch that enables plpython to build cleanly
under Cygwin. This patch together with my previous Python patch: http://postgresql.readysetnet.com/mhonarc/pgsql-patches/2001-05/msg00075.htm l enables full Python support (i.e., configure --with-python) for Cygwin PostgreSQL. Jason Tishler
This commit is contained in:
parent
f6923ff3ac
commit
06a8346c84
@ -1,4 +1,4 @@
|
|||||||
# $Header: /cvsroot/pgsql/src/makefiles/Attic/Makefile.win,v 1.12 2001/05/25 14:28:58 momjian Exp $
|
# $Header: /cvsroot/pgsql/src/makefiles/Attic/Makefile.win,v 1.13 2001/05/25 15:48:33 momjian Exp $
|
||||||
LDFLAGS+= -g
|
LDFLAGS+= -g
|
||||||
DLLTOOL= dlltool
|
DLLTOOL= dlltool
|
||||||
DLLWRAP= dllwrap
|
DLLWRAP= dllwrap
|
||||||
@ -28,4 +28,8 @@ ifeq ($(findstring ecpg/lib,$(subdir)), ecpg/lib)
|
|||||||
override CPPFLAGS+= -DBUILDING_DLL=1
|
override CPPFLAGS+= -DBUILDING_DLL=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(findstring src/pl/plpython,$(subdir)), src/pl/plpython)
|
||||||
|
override CPPFLAGS+= -DUSE_DL_IMPORT
|
||||||
|
endif
|
||||||
|
|
||||||
override javadir := '$(shell cygpath -w $(javadir))'
|
override javadir := '$(shell cygpath -w $(javadir))'
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# $Header: /cvsroot/pgsql/src/pl/plpython/Makefile,v 1.6 2001/05/14 22:06:50 petere Exp $
|
# $Header: /cvsroot/pgsql/src/pl/plpython/Makefile,v 1.7 2001/05/25 15:48:33 momjian Exp $
|
||||||
|
|
||||||
subdir = src/pl/plpython
|
subdir = src/pl/plpython
|
||||||
top_builddir = ../../..
|
top_builddir = ../../..
|
||||||
@ -7,6 +7,8 @@ include $(top_builddir)/src/Makefile.global
|
|||||||
|
|
||||||
override CPPFLAGS := -I$(srcdir) -I$(python_includedir) $(CPPFLAGS)
|
override CPPFLAGS := -I$(srcdir) -I$(python_includedir) $(CPPFLAGS)
|
||||||
|
|
||||||
|
override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
|
||||||
|
|
||||||
NAME = plpython
|
NAME = plpython
|
||||||
SO_MAJOR_VERSION = 0
|
SO_MAJOR_VERSION = 0
|
||||||
SO_MINOR_VERSION = 0
|
SO_MINOR_VERSION = 0
|
||||||
|
@ -29,7 +29,7 @@ SELECT global_test_two();
|
|||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT import_fail();
|
SELECT import_fail();
|
||||||
NOTICE: ('import socket failed -- untrusted dynamic module: socket',)
|
NOTICE: ('import socket failed -- untrusted dynamic module: _socket',)
|
||||||
import_fail
|
import_fail
|
||||||
--------------------
|
--------------------
|
||||||
failed as expected
|
failed as expected
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $Header: /cvsroot/pgsql/src/pl/plpython/plpython.c,v 1.2 2001/05/12 01:30:30 petere Exp $ */
|
/* $Header: /cvsroot/pgsql/src/pl/plpython/plpython.c,v 1.3 2001/05/25 15:48:33 momjian Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* plpython.c - python as a procedural language for PostgreSQL
|
* plpython.c - python as a procedural language for PostgreSQL
|
||||||
@ -1534,7 +1534,7 @@ static PyObject *PLy_spi_execute_fetch_result(SPITupleTable *, int, int);
|
|||||||
|
|
||||||
|
|
||||||
PyTypeObject PLy_PlanType = {
|
PyTypeObject PLy_PlanType = {
|
||||||
PyObject_HEAD_INIT(&PyType_Type)
|
PyObject_HEAD_INIT(NULL)
|
||||||
0, /*ob_size*/
|
0, /*ob_size*/
|
||||||
"PLyPlan", /*tp_name*/
|
"PLyPlan", /*tp_name*/
|
||||||
sizeof(PLyPlanObject), /*tp_size*/
|
sizeof(PLyPlanObject), /*tp_size*/
|
||||||
@ -1577,7 +1577,7 @@ PySequenceMethods PLy_result_as_sequence = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
PyTypeObject PLy_ResultType = {
|
PyTypeObject PLy_ResultType = {
|
||||||
PyObject_HEAD_INIT(&PyType_Type)
|
PyObject_HEAD_INIT(NULL)
|
||||||
0, /*ob_size*/
|
0, /*ob_size*/
|
||||||
"PLyResult", /*tp_name*/
|
"PLyResult", /*tp_name*/
|
||||||
sizeof(PLyResultObject), /*tp_size*/
|
sizeof(PLyResultObject), /*tp_size*/
|
||||||
@ -2287,6 +2287,7 @@ PLy_init_plpy(void)
|
|||||||
|
|
||||||
/* initialize plpy module
|
/* initialize plpy module
|
||||||
*/
|
*/
|
||||||
|
PLy_PlanType.ob_type = PLy_ResultType.ob_type = &PyType_Type;
|
||||||
plpy = Py_InitModule("plpy", PLy_methods);
|
plpy = Py_InitModule("plpy", PLy_methods);
|
||||||
plpy_dict = PyModule_GetDict(plpy);
|
plpy_dict = PyModule_GetDict(plpy);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user