From 92ec416ee7dc6aaa22df771e7151e963a0a1749a Mon Sep 17 00:00:00 2001 From: drochner Date: Tue, 5 Feb 2002 21:05:58 +0000 Subject: ap-mod_python->ap-python --- www/Makefile | 4 +- www/ap-mod_python/DESCR | 6 -- www/ap-mod_python/Makefile | 37 ----------- www/ap-mod_python/distinfo | 8 --- www/ap-mod_python/patches/patch-aa | 12 ---- www/ap-mod_python/patches/patch-ab | 124 ------------------------------------- www/ap-mod_python/patches/patch-ac | 18 ------ www/ap-mod_python/patches/patch-ad | 14 ----- www/ap-python/DESCR | 6 ++ www/ap-python/Makefile | 37 +++++++++++ www/ap-python/distinfo | 8 +++ www/ap-python/patches/patch-aa | 12 ++++ www/ap-python/patches/patch-ab | 124 +++++++++++++++++++++++++++++++++++++ www/ap-python/patches/patch-ac | 18 ++++++ www/ap-python/patches/patch-ad | 14 +++++ 15 files changed, 221 insertions(+), 221 deletions(-) delete mode 100644 www/ap-mod_python/DESCR delete mode 100644 www/ap-mod_python/Makefile delete mode 100644 www/ap-mod_python/distinfo delete mode 100644 www/ap-mod_python/patches/patch-aa delete mode 100644 www/ap-mod_python/patches/patch-ab delete mode 100644 www/ap-mod_python/patches/patch-ac delete mode 100644 www/ap-mod_python/patches/patch-ad create mode 100644 www/ap-python/DESCR create mode 100644 www/ap-python/Makefile create mode 100644 www/ap-python/distinfo create mode 100644 www/ap-python/patches/patch-aa create mode 100644 www/ap-python/patches/patch-ab create mode 100644 www/ap-python/patches/patch-ac create mode 100644 www/ap-python/patches/patch-ad (limited to 'www') diff --git a/www/Makefile b/www/Makefile index 33bddf81d1e..5297e4b01ff 100644 --- a/www/Makefile +++ b/www/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.176 2002/02/05 20:44:02 drochner Exp $ +# $NetBSD: Makefile,v 1.177 2002/02/05 21:07:23 drochner Exp $ # COMMENT= Packages related to the World Wide Web @@ -19,10 +19,10 @@ SUBDIR+= ap-dtcl SUBDIR+= ap-fastcgi SUBDIR+= ap-jk SUBDIR+= ap-jserv -SUBDIR+= ap-mod_python SUBDIR+= ap-perl SUBDIR+= ap-php3 SUBDIR+= ap-php4 +SUBDIR+= ap-python SUBDIR+= ap-ruby SUBDIR+= ap-ssl SUBDIR+= ap-xslt diff --git a/www/ap-mod_python/DESCR b/www/ap-mod_python/DESCR deleted file mode 100644 index 8b240e90a1b..00000000000 --- a/www/ap-mod_python/DESCR +++ /dev/null @@ -1,6 +0,0 @@ -Mod_python is an Apache module that embeds the Python interpreter -within the server. With mod_python you can write web-based applications -in Python that will run many times faster than traditional CGI and -will have access to advanced features such as ability to retain -database connections and other data between hits and access to -Apache internals. diff --git a/www/ap-mod_python/Makefile b/www/ap-mod_python/Makefile deleted file mode 100644 index b3dc10a8ddb..00000000000 --- a/www/ap-mod_python/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -# $NetBSD: Makefile,v 1.1.1.1 2002/02/05 20:43:08 drochner Exp $ -# - -DISTNAME= mod_python-2.7.6 -PKGNAME= ap-mod_python-2.7.6 -CATEGORIES= www -MASTER_SITES= http://www.modpython.org/dist/ -EXTRACT_SUFX= .tgz - -MAINTAINER= packages@netbsd.org -HOMEPAGE= http://www.modpython.org/ -COMMENT= Python interpretter embedded into Apache - -DEPENDS+= apache{,6}>=1.3:../../www/apache - -PLIST_SRC= ${WRKDIR}/.PLIST_SRC - -GNU_CONFIGURE= yes -CONFIGURE_ENV+= PYTHON_BIN=${PYTHONBIN} -MAKE_ENV+= PYTHONBIN=${PYTHONBIN} -PYTHON_VERSIONS_ACCEPTED= 20 - -post-install: - ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/html/ap-mod_python - ( cd ${WRKSRC}; ${PAX} -r -w -s /doc-html/ap-mod_python/ \ - -p e doc-html ${PREFIX}/share/doc/html ) - ${ECHO} lib/httpd/mod_python.so >${PLIST_SRC} - (cd ${PREFIX}; ${FIND} ${PYSITELIB}/mod_python \ - share/doc/html/ap-mod_python \ - -type f -print >>${PLIST_SRC} ) - ( cd ${PREFIX}; ${FIND} -d ${PYSITELIB}/mod_python \ - share/doc/html/ap-mod_python \ - -type d -print | ${SED} -e "s/^/@dirrm /" >>${PLIST_SRC} ) - -.include "../../lang/python/extension.buildlink.mk" -.include "../../www/apache/buildlink.mk" -.include "../../mk/bsd.pkg.mk" diff --git a/www/ap-mod_python/distinfo b/www/ap-mod_python/distinfo deleted file mode 100644 index 415acdedac9..00000000000 --- a/www/ap-mod_python/distinfo +++ /dev/null @@ -1,8 +0,0 @@ -$NetBSD: distinfo,v 1.1.1.1 2002/02/05 20:43:08 drochner Exp $ - -SHA1 (mod_python-2.7.6.tgz) = 37579015f2c2bf0c6106e8d301b8a09254221b54 -Size (mod_python-2.7.6.tgz) = 176449 bytes -SHA1 (patch-aa) = e1f3c0ea969ac3a512ac9b1ca171a3691cef1189 -SHA1 (patch-ab) = b79f50bed5ad6bda8f5e6aef111fbc9b9aedf943 -SHA1 (patch-ac) = 1c2a5c1d961e9710561c406b60518fbfef4cb2cb -SHA1 (patch-ad) = 6ce2a424d581ebfc8763543451af566809b979a8 diff --git a/www/ap-mod_python/patches/patch-aa b/www/ap-mod_python/patches/patch-aa deleted file mode 100644 index 6f521d50592..00000000000 --- a/www/ap-mod_python/patches/patch-aa +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-aa,v 1.1.1.1 2002/02/05 20:43:08 drochner Exp $ ---- src/Makefile.in.orig Sat Nov 10 05:38:09 2001 -+++ src/Makefile.in Sat Nov 10 05:38:39 2001 -@@ -53,7 +53,7 @@ - INCLUDES=@INCLUDES@ - LIBS=@LIBS@ - LDFLAGS=@LDFLAGS@ --OPT= -+OPT=-DEAPI - CFLAGS=$(OPT) $(INCLUDES) - srcdir=. - diff --git a/www/ap-mod_python/patches/patch-ab b/www/ap-mod_python/patches/patch-ab deleted file mode 100644 index 6ab2a0820b0..00000000000 --- a/www/ap-mod_python/patches/patch-ab +++ /dev/null @@ -1,124 +0,0 @@ -$NetBSD: patch-ab,v 1.1.1.1 2002/02/05 20:43:08 drochner Exp $ ---- src/tableobject.c.orig Mon May 28 23:00:41 2001 -+++ src/tableobject.c Sun Nov 4 18:28:55 2001 -@@ -185,6 +185,105 @@ - }; - - /** -+ ** table_get -+ ** -+ * -+ * Implements dictionary like get(k,[x]) method. -+ */ -+ -+static PyObject * table_get(tableobject *self, PyObject *args) -+{ -+ -+ PyObject *key,*v; -+ PyObject *failob = Py_None; -+ array_header *ah; -+ table_entry *elts; -+ int i, j; -+ -+ if(!PyArg_ParseTuple(args, "O|O:get", &key, &failob)) -+ return NULL; -+ v=tablegetitem(self,key); -+ if(v = NULL) { -+ v=failob; -+ Py_INCREF(failob); -+ } -+ return v; -+} -+ -+/** -+ ** table_keys -+ ** -+ * -+ * Implements dictionary like items() method. -+ */ -+ -+static PyObject * table_items(tableobject *self) -+{ -+ -+ PyObject *v; -+ array_header *ah; -+ table_entry *elts; -+ int i, j; -+ -+ ah = ap_table_elts(self->table); -+ elts = (table_entry *) ah->elts; -+ -+ v = PyList_New(ah->nelts); -+ -+ for (i = 0, j = 0; i < ah->nelts; i++) -+ { -+ if (elts[i].key) -+ { -+ PyObject *vp = PyTuple_New(2); -+ if(vp == NULL) { -+ Py_DECREF(v); -+ return NULL; -+ } -+ PyTuple_SET_ITEM(vp,0,PyString_FromString(elts[i].key)); -+ PyTuple_SET_ITEM(vp,1,PyString_FromString(ap_table_get(self->table, -+ elts[i].key))); -+ PyList_SetItem(v, j, vp); -+ j++; -+ } -+ } -+ return v; -+} -+/** -+ ** table_keys -+ ** -+ * -+ * Implements dictionary like values() method. -+ * This mostly for completeness sake, I can't see use for it -+ */ -+ -+static PyObject * table_values(tableobject *self) -+{ -+ -+ PyObject *v; -+ array_header *ah; -+ table_entry *elts; -+ int i, j; -+ -+ ah = ap_table_elts(self->table); -+ elts = (table_entry *) ah->elts; -+ -+ v = PyList_New(ah->nelts); -+ -+ for (i = 0, j = 0; i < ah->nelts; i++) -+ { -+ if (elts[i].key) -+ { -+ PyObject *val = PyString_FromString(ap_table_get(self->table, -+ elts[i].key)); -+ PyList_SetItem(v, j, val); -+ j++; -+ } -+ } -+ return v; -+} -+ -+ -+/** - ** table_keys - ** - * -@@ -261,9 +360,13 @@ - /* table method definitions */ - - static PyMethodDef tablemethods[] = { -- {"keys", (PyCFunction)table_keys, METH_VARARGS}, - {"has_key", (PyCFunction)table_has_key, METH_VARARGS}, - {"add", (PyCFunction)mp_table_add, METH_VARARGS}, -+ {"items", (PyCFunction)table_items, METH_VARARGS}, -+ {"keys", (PyCFunction)table_keys, METH_VARARGS}, -+ {"get", (PyCFunction)table_get, METH_VARARGS}, -+ {"values", (PyCFunction)table_values, METH_VARARGS}, -+ /* Still needs: copy, update, clear, setdefault, popitem */ - {NULL, NULL} /* sentinel */ - }; - diff --git a/www/ap-mod_python/patches/patch-ac b/www/ap-mod_python/patches/patch-ac deleted file mode 100644 index f73549f6747..00000000000 --- a/www/ap-mod_python/patches/patch-ac +++ /dev/null @@ -1,18 +0,0 @@ -$NetBSD: patch-ac,v 1.1.1.1 2002/02/05 20:43:08 drochner Exp $ ---- src/mod_python.c.orig Sat Nov 10 13:06:57 2001 -+++ src/mod_python.c Sat Nov 10 13:07:53 2001 -@@ -474,11 +474,13 @@ - - if (! ((m = PyImport_ImportModule(MODULENAME)))) { - fprintf(stderr, "make_obcallback(): could not import %s.\n", MODULENAME); -+ PyErr_Print(); - } - -- if (! ((obCallBack = PyObject_CallMethod(m, INITFUNC, NULL)))) { -+ if (m && ! ((obCallBack = PyObject_CallMethod(m, INITFUNC, NULL)))) { - fprintf(stderr, "make_obcallback(): could not call %s.\n", - INITFUNC); -+ PyErr_Print(); - } - - return obCallBack; diff --git a/www/ap-mod_python/patches/patch-ad b/www/ap-mod_python/patches/patch-ad deleted file mode 100644 index 968feb9e467..00000000000 --- a/www/ap-mod_python/patches/patch-ad +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-ad,v 1.1.1.1 2002/02/05 20:43:08 drochner Exp $ - ---- Makefile.in.orig Wed Dec 6 04:05:37 2000 -+++ Makefile.in Tue Feb 5 21:30:44 2002 -@@ -119,7 +119,8 @@ - do \ - $(INSTALL) $$f $(PY_STD_LIB)/site-packages/mod_python; \ - done -- python $(PY_STD_LIB)/compileall.py $(PY_STD_LIB)/site-packages/mod_python -+ ${PYTHONBIN} $(PY_STD_LIB)/compileall.py $(PY_STD_LIB)/site-packages/mod_python -+ ${PYTHONBIN} -O $(PY_STD_LIB)/compileall.py $(PY_STD_LIB)/site-packages/mod_python - - clean: - cd src && $(MAKE) clean diff --git a/www/ap-python/DESCR b/www/ap-python/DESCR new file mode 100644 index 00000000000..8b240e90a1b --- /dev/null +++ b/www/ap-python/DESCR @@ -0,0 +1,6 @@ +Mod_python is an Apache module that embeds the Python interpreter +within the server. With mod_python you can write web-based applications +in Python that will run many times faster than traditional CGI and +will have access to advanced features such as ability to retain +database connections and other data between hits and access to +Apache internals. diff --git a/www/ap-python/Makefile b/www/ap-python/Makefile new file mode 100644 index 00000000000..b7e7f15fb2e --- /dev/null +++ b/www/ap-python/Makefile @@ -0,0 +1,37 @@ +# $NetBSD: Makefile,v 1.1.1.1 2002/02/05 21:05:58 drochner Exp $ +# + +DISTNAME= mod_python-2.7.6 +PKGNAME= ap-python-2.7.6 +CATEGORIES= www +MASTER_SITES= http://www.modpython.org/dist/ +EXTRACT_SUFX= .tgz + +MAINTAINER= packages@netbsd.org +HOMEPAGE= http://www.modpython.org/ +COMMENT= Python interpretter embedded into Apache + +DEPENDS+= apache{,6}>=1.3:../../www/apache + +PLIST_SRC= ${WRKDIR}/.PLIST_SRC + +GNU_CONFIGURE= yes +CONFIGURE_ENV+= PYTHON_BIN=${PYTHONBIN} +MAKE_ENV+= PYTHONBIN=${PYTHONBIN} +PYTHON_VERSIONS_ACCEPTED= 20 + +post-install: + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/html/ap-mod_python + ( cd ${WRKSRC}; ${PAX} -r -w -s /doc-html/ap-mod_python/ \ + -p e doc-html ${PREFIX}/share/doc/html ) + ${ECHO} lib/httpd/mod_python.so >${PLIST_SRC} + (cd ${PREFIX}; ${FIND} ${PYSITELIB}/mod_python \ + share/doc/html/ap-mod_python \ + -type f -print >>${PLIST_SRC} ) + ( cd ${PREFIX}; ${FIND} -d ${PYSITELIB}/mod_python \ + share/doc/html/ap-mod_python \ + -type d -print | ${SED} -e "s/^/@dirrm /" >>${PLIST_SRC} ) + +.include "../../lang/python/extension.buildlink.mk" +.include "../../www/apache/buildlink.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/www/ap-python/distinfo b/www/ap-python/distinfo new file mode 100644 index 00000000000..ad07dad9aaf --- /dev/null +++ b/www/ap-python/distinfo @@ -0,0 +1,8 @@ +$NetBSD: distinfo,v 1.1.1.1 2002/02/05 21:05:58 drochner Exp $ + +SHA1 (mod_python-2.7.6.tgz) = 37579015f2c2bf0c6106e8d301b8a09254221b54 +Size (mod_python-2.7.6.tgz) = 176449 bytes +SHA1 (patch-aa) = e1f3c0ea969ac3a512ac9b1ca171a3691cef1189 +SHA1 (patch-ab) = b79f50bed5ad6bda8f5e6aef111fbc9b9aedf943 +SHA1 (patch-ac) = 1c2a5c1d961e9710561c406b60518fbfef4cb2cb +SHA1 (patch-ad) = 6ce2a424d581ebfc8763543451af566809b979a8 diff --git a/www/ap-python/patches/patch-aa b/www/ap-python/patches/patch-aa new file mode 100644 index 00000000000..4b85c0846a0 --- /dev/null +++ b/www/ap-python/patches/patch-aa @@ -0,0 +1,12 @@ +$NetBSD: patch-aa,v 1.1.1.1 2002/02/05 21:05:58 drochner Exp $ +--- src/Makefile.in.orig Sat Nov 10 05:38:09 2001 ++++ src/Makefile.in Sat Nov 10 05:38:39 2001 +@@ -53,7 +53,7 @@ + INCLUDES=@INCLUDES@ + LIBS=@LIBS@ + LDFLAGS=@LDFLAGS@ +-OPT= ++OPT=-DEAPI + CFLAGS=$(OPT) $(INCLUDES) + srcdir=. + diff --git a/www/ap-python/patches/patch-ab b/www/ap-python/patches/patch-ab new file mode 100644 index 00000000000..ad8ffee972c --- /dev/null +++ b/www/ap-python/patches/patch-ab @@ -0,0 +1,124 @@ +$NetBSD: patch-ab,v 1.1.1.1 2002/02/05 21:05:58 drochner Exp $ +--- src/tableobject.c.orig Mon May 28 23:00:41 2001 ++++ src/tableobject.c Sun Nov 4 18:28:55 2001 +@@ -185,6 +185,105 @@ + }; + + /** ++ ** table_get ++ ** ++ * ++ * Implements dictionary like get(k,[x]) method. ++ */ ++ ++static PyObject * table_get(tableobject *self, PyObject *args) ++{ ++ ++ PyObject *key,*v; ++ PyObject *failob = Py_None; ++ array_header *ah; ++ table_entry *elts; ++ int i, j; ++ ++ if(!PyArg_ParseTuple(args, "O|O:get", &key, &failob)) ++ return NULL; ++ v=tablegetitem(self,key); ++ if(v = NULL) { ++ v=failob; ++ Py_INCREF(failob); ++ } ++ return v; ++} ++ ++/** ++ ** table_keys ++ ** ++ * ++ * Implements dictionary like items() method. ++ */ ++ ++static PyObject * table_items(tableobject *self) ++{ ++ ++ PyObject *v; ++ array_header *ah; ++ table_entry *elts; ++ int i, j; ++ ++ ah = ap_table_elts(self->table); ++ elts = (table_entry *) ah->elts; ++ ++ v = PyList_New(ah->nelts); ++ ++ for (i = 0, j = 0; i < ah->nelts; i++) ++ { ++ if (elts[i].key) ++ { ++ PyObject *vp = PyTuple_New(2); ++ if(vp == NULL) { ++ Py_DECREF(v); ++ return NULL; ++ } ++ PyTuple_SET_ITEM(vp,0,PyString_FromString(elts[i].key)); ++ PyTuple_SET_ITEM(vp,1,PyString_FromString(ap_table_get(self->table, ++ elts[i].key))); ++ PyList_SetItem(v, j, vp); ++ j++; ++ } ++ } ++ return v; ++} ++/** ++ ** table_keys ++ ** ++ * ++ * Implements dictionary like values() method. ++ * This mostly for completeness sake, I can't see use for it ++ */ ++ ++static PyObject * table_values(tableobject *self) ++{ ++ ++ PyObject *v; ++ array_header *ah; ++ table_entry *elts; ++ int i, j; ++ ++ ah = ap_table_elts(self->table); ++ elts = (table_entry *) ah->elts; ++ ++ v = PyList_New(ah->nelts); ++ ++ for (i = 0, j = 0; i < ah->nelts; i++) ++ { ++ if (elts[i].key) ++ { ++ PyObject *val = PyString_FromString(ap_table_get(self->table, ++ elts[i].key)); ++ PyList_SetItem(v, j, val); ++ j++; ++ } ++ } ++ return v; ++} ++ ++ ++/** + ** table_keys + ** + * +@@ -261,9 +360,13 @@ + /* table method definitions */ + + static PyMethodDef tablemethods[] = { +- {"keys", (PyCFunction)table_keys, METH_VARARGS}, + {"has_key", (PyCFunction)table_has_key, METH_VARARGS}, + {"add", (PyCFunction)mp_table_add, METH_VARARGS}, ++ {"items", (PyCFunction)table_items, METH_VARARGS}, ++ {"keys", (PyCFunction)table_keys, METH_VARARGS}, ++ {"get", (PyCFunction)table_get, METH_VARARGS}, ++ {"values", (PyCFunction)table_values, METH_VARARGS}, ++ /* Still needs: copy, update, clear, setdefault, popitem */ + {NULL, NULL} /* sentinel */ + }; + diff --git a/www/ap-python/patches/patch-ac b/www/ap-python/patches/patch-ac new file mode 100644 index 00000000000..a0c037111db --- /dev/null +++ b/www/ap-python/patches/patch-ac @@ -0,0 +1,18 @@ +$NetBSD: patch-ac,v 1.1.1.1 2002/02/05 21:05:58 drochner Exp $ +--- src/mod_python.c.orig Sat Nov 10 13:06:57 2001 ++++ src/mod_python.c Sat Nov 10 13:07:53 2001 +@@ -474,11 +474,13 @@ + + if (! ((m = PyImport_ImportModule(MODULENAME)))) { + fprintf(stderr, "make_obcallback(): could not import %s.\n", MODULENAME); ++ PyErr_Print(); + } + +- if (! ((obCallBack = PyObject_CallMethod(m, INITFUNC, NULL)))) { ++ if (m && ! ((obCallBack = PyObject_CallMethod(m, INITFUNC, NULL)))) { + fprintf(stderr, "make_obcallback(): could not call %s.\n", + INITFUNC); ++ PyErr_Print(); + } + + return obCallBack; diff --git a/www/ap-python/patches/patch-ad b/www/ap-python/patches/patch-ad new file mode 100644 index 00000000000..559a4ff7b67 --- /dev/null +++ b/www/ap-python/patches/patch-ad @@ -0,0 +1,14 @@ +$NetBSD: patch-ad,v 1.1.1.1 2002/02/05 21:05:58 drochner Exp $ + +--- Makefile.in.orig Wed Dec 6 04:05:37 2000 ++++ Makefile.in Tue Feb 5 21:30:44 2002 +@@ -119,7 +119,8 @@ + do \ + $(INSTALL) $$f $(PY_STD_LIB)/site-packages/mod_python; \ + done +- python $(PY_STD_LIB)/compileall.py $(PY_STD_LIB)/site-packages/mod_python ++ ${PYTHONBIN} $(PY_STD_LIB)/compileall.py $(PY_STD_LIB)/site-packages/mod_python ++ ${PYTHONBIN} -O $(PY_STD_LIB)/compileall.py $(PY_STD_LIB)/site-packages/mod_python + + clean: + cd src && $(MAKE) clean -- cgit v1.2.3