From owner-freebsd-questions Tue Oct 23 6:25:25 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-31-203-60.mmcable.com [65.31.203.60]) by hub.freebsd.org (Postfix) with SMTP id 67B1437B401 for ; Tue, 23 Oct 2001 06:25:21 -0700 (PDT) Received: (qmail 9898 invoked by uid 100); 23 Oct 2001 13:25:16 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15317.28603.296849.864129@guru.mired.org> Date: Tue, 23 Oct 2001 08:25:15 -0500 To: Ulf.Kister@t-online.de (Ulf Kister) Cc: questions@freebsd.org Subject: Re: python 2.1.1 with AND without threads In-Reply-To: <55888007@toto.iv> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Ulf Kister types: > since I am planning to simultaneously use zope (which requires python > to be built with threads) and mod_python-2.7.6 (which requires python > to be built without threads) I was wondering if there is a simple way > to have both. Sure. Just build them and install them in two different places. No problem. Actually, build it one way, rename the binary, then build it another. I know, that doesn't solve your problem. > I use python-2.1.1, zope-2.4.2 (both from ports collection) and would > like to use mod_python-2.7.6. First question - if you're running zope, why would you want mod_python? Zope comes with a very nice server that makes plugging in python code straightforward, and provides excellent performance. > Being not familiar with Makefiles I took a closer look at > /usr/ports/Mk/bsd.python.mk but did'nt see the clue yet. It looks like the port builds the CGI/apache version. That's a good reason not to use the port. > Does anyone have a hint for solving this dilemma? First suggestion - look on the for the PyApache module, and see if it will do what you want. It works fine with threaded python. Second suggestion. Build Python sans threads. Build Apache with the python module and interpreter statically linked into it, instead of dynamically linked into it. Now build Python with threads for Zope to use. Or vice versa. Or build both versions in two different locations, and set the LD_LIBRARY_PATH appropriately for the two binaries. If there aren't two binaries, but just one - I don't think it can be done without rewriting python so all the external symbols have different names for one version. You might ask on the Python help list, or on freebsd-hackers. http://www.mired.org/home/mwm/ Q: How do you make the gods laugh? A: Tell them your plans. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message