From owner-freebsd-questions@FreeBSD.ORG Sat Dec 29 02:23:55 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6FAEC3B3 for ; Sat, 29 Dec 2012 02:23:55 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ipmail06.adl6.internode.on.net (ipmail06.adl6.internode.on.net [IPv6:2001:44b8:8060:ff02:300:1:6:6]) by mx1.freebsd.org (Postfix) with ESMTP id C49B58FC0A for ; Sat, 29 Dec 2012 02:23:54 +0000 (UTC) Received: from ppp247-71.static.internode.on.net (HELO leader.local) ([203.122.247.71]) by ipmail06.adl6.internode.on.net with ESMTP; 29 Dec 2012 12:53:53 +1030 Message-ID: <50DE5413.1060405@ShaneWare.Biz> Date: Sat, 29 Dec 2012 12:53:15 +1030 From: Shane Ambler User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:16.0) Gecko/20121030 Thunderbird/16.0.2 MIME-Version: 1.0 To: Roland Smith Subject: Re: correct way for installing python extensions for 3.3? References: <20121228172242.GB4522@slackbox.erewhon.net> In-Reply-To: <20121228172242.GB4522@slackbox.erewhon.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Dec 2012 02:23:55 -0000 On 29/12/2012 03:52, Roland Smith wrote: > Currently I'm using python 2.7.3 because numpy required it. It seems that > numpy some other extensions can now be installed for python3. > > Numpy for python 2.7.3 is already installed, and now I want to install it > for python 3.3 as well. I'm just not sure how to do that? Reading > /usr/ports/Mk/bsd.python.mk implies that setting PYTHON_VERSION in > /etc/make.conf should only be done if you want to build extensions with an > older binary. Is that still correct? > > In other words: what is the best way to install numpy and other extensions for > different major versions of python? > > Roland > I'll second that. As a temporary workaround I duplicated py-numpy to py-numpy32 and changed USE_PYTHON to 3.2. It appears that some extra patching is needed for 3.3 which I haven't gotten to yet. Is duplicate ports the only way to install multiple versions? This should be extended to boost-python-libs as well. I duplicated the port to boost-python3-libs and changed it to use py3.2. This enables the building of libboost_python as well as libboost_python3 so it looks to be able to support both py3.x and py2.7 if built against py3.x. I only use this for blender so I don't know for sure that py2.7 will work right.