Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Oct 2000 22:06:19 +0100 (CET)
From:      Anders Nordby <anders@fix.no>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/22426: New port: www/mod_python
Message-ID:  <20001030210619.161FF3CAF@totem.fix.no>

next in thread | raw e-mail | index | archive | help

>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 <anders@fix.no>
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 <bsd.port.mk>
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 <portsdir>/lang/python
Xvi Makefile (change PORTNAME to python_nothreads)
Xmake WITHOUT_THREADS=yes LOCALBASE=/path/to/python_nothreads clean install
Xcd <portsdir>/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 <portsdir>/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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001030210619.161FF3CAF>