From owner-freebsd-ports Mon Oct 30 13: 0:11 2000 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 2D77037B4C5 for ; Mon, 30 Oct 2000 13:00:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id NAA46773; Mon, 30 Oct 2000 13:00:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from totem.fix.no (totem.fix.no [213.142.66.130]) by hub.freebsd.org (Postfix) with ESMTP id CFB1537B479 for ; Mon, 30 Oct 2000 12:57:19 -0800 (PST) Received: by totem.fix.no (Postfix, from userid 1000) id 161FF3CAF; Mon, 30 Oct 2000 22:06:19 +0100 (CET) Message-Id: <20001030210619.161FF3CAF@totem.fix.no> Date: Mon, 30 Oct 2000 22:06:19 +0100 (CET) From: Anders Nordby Reply-To: Anders Nordby To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: ports/22426: New port: www/mod_python Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 22426 >Category: ports >Synopsis: New port: www/mod_python >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Oct 30 13:00:00 PST 2000 >Closed-Date: >Last-Modified: >Originator: Anders Nordby >Release: FreeBSD 4.1-STABLE i386 >Organization: Fluxpod Information eXchange >Environment: FreeBSD eggsilo.localnet 4.1-STABLE FreeBSD 4.1-STABLE #0: Mon Aug 28 10:23:12 CEST 2000 root@:/usr/src/sys/compile/EGGSILO i386 >Description: 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. WWW: http://www.modpython.org/ >How-To-Repeat: >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # mod_python # mod_python/distinfo # mod_python/Makefile # mod_python/pkg-comment # mod_python/pkg-descr # mod_python/pkg-plist # mod_python/scripts # mod_python/scripts/pre-build # mod_python/files # mod_python/files/patch-aa # mod_python/pkg-message # echo c - mod_python mkdir -p mod_python > /dev/null 2>&1 echo x - mod_python/distinfo sed 's/^X//' >mod_python/distinfo << 'END-of-mod_python/distinfo' XMD5 (mod_python-2.6.3.tgz) = c3c3a12a5fd6d86e9334cdf4f6a9e845 END-of-mod_python/distinfo echo x - mod_python/Makefile sed 's/^X//' >mod_python/Makefile << 'END-of-mod_python/Makefile' X# New ports collection makefile for: mod_python X# Date created: October 30 2000 X# Whom: Anders Nordby X# X# $FreeBSD$ X# X XPORTNAME= mod_python XPORTVERSION= 2.6.3 XCATEGORIES= www python XMASTER_SITES= http://www.modpython.org/dist/ \ X http://www.freenix.no/~anders/ XEXTRACT_SUFX= .tgz X XMAINTAINER= anders@fix.no X XBUILD_DEPENDS= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache13 XRUN_DEPENDS= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache13 X XGNU_CONFIGURE= yes XUSE_PYTHON= yes XCONFIGURE_ARGS= --with-apxs=${LOCALBASE}/sbin/apxs X.if defined(PYTHON_NOTHREADS) XCONFIGURE_ENV= PYTHON_BIN=${PYTHON_NOTHREADS}/bin/python XPLIST_SUB+= PYTHON_LIBPATH=${PYTHON_NOTHREADS:S/${LOCALBASE}\///g}/lib X.else XPLIST_SUB+= PYTHON_LIBPATH=lib X.endif X X.if !defined(PYTHON_NOTHREADS) && !defined(WITHOUT_THREADS) Xpost-fetch: X @${CAT} ${PKGMESSAGE} X.endif X Xpost-install: X @${ECHO} "================================================================================" X @${ECHO} X @${ECHO} "Also remember to add to your Apache configuration in the appropriate context:" X @${ECHO} X @${ECHO} "PythonPath \"['/path/to/foo', '/path/to/bar']\"" X @${ECHO} "AddHandler python-program .py" X @${ECHO} "PythonHandler foobar" X @${ECHO} "PythonDebug On" X @${ECHO} X @${ECHO} "Where PythonPath includes the paths to at least the Python libdir, its" X @${ECHO} "site-packages dir, and to the dir where your Python programs are. Also consider" X @${ECHO} "including the dir to mod_python if your Python distribution is installed in a" X @${ECHO} "non-standard location. For more information, see http://www.modpython.org/." X @${ECHO} X @${ECHO} "================================================================================" X X.include END-of-mod_python/Makefile echo x - mod_python/pkg-comment sed 's/^X//' >mod_python/pkg-comment << 'END-of-mod_python/pkg-comment' XEmbeds a Python interpreter within the Apache server END-of-mod_python/pkg-comment echo x - mod_python/pkg-descr sed 's/^X//' >mod_python/pkg-descr << 'END-of-mod_python/pkg-descr' XMod_python is an Apache module that embeds the Python interpreter within the Xserver. With mod_python you can write web-based applications in Python that Xwill run many times faster than traditional CGI and will have access to Xadvanced features such as ability to retain database connections and other Xdata between hits and access to Apache internals. X XWWW: http://www.modpython.org/ END-of-mod_python/pkg-descr echo x - mod_python/pkg-plist sed 's/^X//' >mod_python/pkg-plist << 'END-of-mod_python/pkg-plist' Xlibexec/apache/mod_python.so X%%PYTHON_LIBPATH%%/%%PYTHON_VERSION%%/site-packages/mod_python/__init__.py X%%PYTHON_LIBPATH%%/%%PYTHON_VERSION%%/site-packages/mod_python/apache.py X%%PYTHON_LIBPATH%%/%%PYTHON_VERSION%%/site-packages/mod_python/cgihandler.py X%%PYTHON_LIBPATH%%/%%PYTHON_VERSION%%/site-packages/mod_python/httpdapi.py X%%PYTHON_LIBPATH%%/%%PYTHON_VERSION%%/site-packages/mod_python/zhandler.py X%%PYTHON_LIBPATH%%/%%PYTHON_VERSION%%/site-packages/mod_python/__init__.pyc X%%PYTHON_LIBPATH%%/%%PYTHON_VERSION%%/site-packages/mod_python/apache.pyc X%%PYTHON_LIBPATH%%/%%PYTHON_VERSION%%/site-packages/mod_python/cgihandler.pyc X%%PYTHON_LIBPATH%%/%%PYTHON_VERSION%%/site-packages/mod_python/httpdapi.pyc X%%PYTHON_LIBPATH%%/%%PYTHON_VERSION%%/site-packages/mod_python/zhandler.pyc X@dirrm %%PYTHON_LIBPATH%%/%%PYTHON_VERSION%%/site-packages/mod_python END-of-mod_python/pkg-plist echo c - mod_python/scripts mkdir -p mod_python/scripts > /dev/null 2>&1 echo x - mod_python/scripts/pre-build sed 's/^X//' >mod_python/scripts/pre-build << 'END-of-mod_python/scripts/pre-build' X#! /bin/sh X Xif [ -z "${PYTHON_NOTHREADS}" ] Xthen X py="${LOCALBASE}/bin/python" Xelse X py="${LOCALBASE}/python_nothreads/bin/python" Xfi X Xif [ ! -z "`ldd $py | grep libc_r`" ] Xthen X echo "** Error: your python installation is compiled with threads support." X cat pkg-message X exit 1 Xfi END-of-mod_python/scripts/pre-build echo c - mod_python/files mkdir -p mod_python/files > /dev/null 2>&1 echo x - mod_python/files/patch-aa sed 's/^X//' >mod_python/files/patch-aa << 'END-of-mod_python/files/patch-aa' X--- src/Makefile.in.old Sun Oct 29 02:21:07 2000 X+++ src/Makefile.in Sun Oct 29 02:21:21 2000 X@@ -83,7 +83,7 @@ X @echo X @echo 'Compiling for DSO. For static, do "make static"' X @echo X- $(APXS) $(INCLUDES) -c $(OBJS) $(LIBS) X+ $(APXS) $(INCLUDES) -c $(OBJS) $(LIBS) $(LDFLAGS) X @echo X @echo 'Now su and make install' X @echo END-of-mod_python/files/patch-aa echo x - mod_python/pkg-message sed 's/^X//' >mod_python/pkg-message << 'END-of-mod_python/pkg-message' X================================================================================ X XThis port needs Python without threads. Either reinstall Python with XWITHOUT_THREADS set and recompile, or install an additional copy this way: X Xcd /lang/python Xvi Makefile (change PORTNAME to python_nothreads) Xmake WITHOUT_THREADS=yes LOCALBASE=/path/to/python_nothreads clean install Xcd /www/mod_python Xmake PYTHON_NOTHREADS=/path/to/python_nothreads clean install X XOr just use the last step above, pointing PYTHON_NOTHREADS to the location of Xyour no-threads Python installation. X XRemember to change back PORTNAME in /lang/python/Makefile. Also, do Xchange /path/to to whatever path you want to have the nothreads version of XPython. X X================================================================================ END-of-mod_python/pkg-message exit >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message