Update of /cvsroot/fink/dists/10.4-transitional/unstable/main/finkinfo/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23809
Added Files: libapache2-mod-python-py.info libapache2-mod-python-py.patch Removed Files: libapache2-mod-python.info libapache2-mod-python.patch Log Message: Moving and fixing up mod_python package per Martin's suggestions. --- libapache2-mod-python.patch DELETED --- --- NEW FILE: libapache2-mod-python-py.info --- Info2: << #========================================================================= # $Id$ Package: libapache2-mod-python-py%type_pkg[python] Version: 3.1.4 Revision: 3 Type: python (2.3 2.4) Description: Embeds the Python interpreter within Apache License: OSI-Approved Homepage: http://modpython.org/ Maintainer: Matthew Bogosian <[EMAIL PROTECTED]> #========================================================================= #---- Dependencies ------------------------------------------------------- Depends: python%type_pkg[python] | python%type_pkg[python]-nox, apache2-ssl | apache2 BuildDepends: apache2-ssl-dev | apache2-dev #---- Unpack phase ------------------------------------------------------- Source: http://www.apache.org/dist/httpd/modpython/mod_python-%v.tgz Source-MD5: 607175958137b06bcda91110414c82a1 PatchScript: patch -p0 < %a/libapache2-mod-python-py.patch #---- Compile phase ------------------------------------------------------ CompileScript: << #!/bin/sh -ex ./configure --prefix='%p' --with-apxs='%p/sbin/apxs' \ --with-python='%p/bin/python%type_raw[python]' make << #---- Install phase ------------------------------------------------------ DocFiles: COPYRIGHT CREDITS LICENSE NEWS NOTICE README InstallScript: << #!/bin/sh -ex make DESTDIR='%d' install install -d -m 700 '%i/share/doc/mod-python' cp -Rp doc-html examples '%i/share/doc/mod-python' chmod -R go-rstwx,a+Xr '%i/share/doc/mod-python' << #---- Split-offs --------------------------------------------------------- SplitOff: << Package: libapache2-mod-python-doc Description: mod_python documentation Suggests: libapache2-mod-python-py24 | libapache2-mod-python-py23 Files: share/doc/mod-python << #---- Documentation ------------------------------------------------------ DescDetail: << >From http://modpython.org/: 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. << DescPort: << Using a patch from here: http://cvs.opendarwin.org//cgi-bin/cvsweb.cgi/proj/darwinports/dports/www/mod_python/files/patch-mod_python.c << << --- NEW FILE: libapache2-mod-python-py.patch --- --- src/mod_python.c Mon Feb 16 20:47:27 2004 +++ /Users/mww/Desktop/mod_python.c Wed Mar 16 21:15:49 2005 @@ -31,6 +31,10 @@ * (In a Python dictionary) */ static PyObject * interpreters = NULL; +#ifdef WITH_THREAD +static apr_thread_mutex_t* interpreters_lock = 0; +#endif + apr_pool_t *child_init_pool = NULL; /** @@ -124,6 +128,8 @@ name = MAIN_INTERPRETER; #ifdef WITH_THREAD + apr_thread_mutex_lock(interpreters_lock); + PyEval_AcquireLock(); #endif @@ -149,6 +155,8 @@ #ifdef WITH_THREAD PyEval_ReleaseLock(); + + apr_thread_mutex_unlock(interpreters_lock); #endif if (! idata) { @@ -469,6 +477,9 @@ const char *userdata_key = "python_init"; apr_status_t rc; + /* fudge for Mac OS X with Apache where Py_IsInitialized() broke */ + static int initialized = 0; + apr_pool_userdata_get(&data, userdata_key, s->process->pool); if (!data) { apr_pool_userdata_set((const void *)1, userdata_key, @@ -490,13 +501,16 @@ } /* initialize global Python interpreter if necessary */ - if (! Py_IsInitialized()) + if (initialized == 0 || ! Py_IsInitialized()) { + initialized = 1; /* initialze the interpreter */ Py_Initialize(); #ifdef WITH_THREAD + apr_thread_mutex_create(&interpreters_lock,APR_THREAD_MUTEX_UNNESTED,p); + /* create and acquire the interpreter lock */ PyEval_InitThreads(); #endif --- libapache2-mod-python.info DELETED --- ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Fink-commits mailing list Fink-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-commits