From owner-freebsd-ports@FreeBSD.ORG Mon Jul 29 11:30:33 2013 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D4E40301 for ; Mon, 29 Jul 2013 11:30:33 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.16.84]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8876A208C for ; Mon, 29 Jul 2013 11:30:33 +0000 (UTC) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by kabab.cs.huji.ac.il with esmtp id 1V3lei-000Bp9-H1; Mon, 29 Jul 2013 14:30:24 +0300 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.3 To: David Demelier Subject: Re: python 2 and 3 modules In-reply-to: References: Comments: In-reply-to David Demelier message dated "Mon, 29 Jul 2013 09:46:23 +0200." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 29 Jul 2013 14:30:24 +0300 From: Daniel Braniss Message-ID: Cc: ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 11:30:33 -0000 > 2013/7/28 Daniel Braniss : > > Hi, > > I need to be able to have both (2.7 and 3.2) modules. > > setting PYTHON_VERSION=3.2 in /etc/make.conf compiles properly, > > but make install, insists that that the 2.7 version is installed! > > after deinstalling, it will install the 3.2 version in the correct directory: > > /usr/local/lib/python3.2/site-path > > but now I lost the 2.7 version. > > > > the same happens if I try to install the 2.7 version, it will complain > > that the 3,2 version is installed. > > > > BTW, the comments in ports/Mk/bsd.python.mk are very confusing and > > some are wrong: > > # PYTHON_VERSION - Version of the python binary in your ${PATH}, in the > > # format "python2.0". Set this in your > > makefile in case you > > # want to build extensions with an > > older binary. > > # default: depends on the version of > > your python binary > > > > setting it to "python3.2" produces errors in the make, while 3.2 is ok > > > > is there any fix? > > > > thanks, > > danny > > > > For the moment its pretty difficult to install python 2.7 and 3.3 at > the same time. However, if you plan to install python 3.3, you need to > set PYTHON_DEFAULT_VERSION to "python3.3" and not PYTHON_VERSION. the joke on sysadmin/programes (im one of them) is that we give a correct answer to the wrong qwestion :-) the problem is not compiling modules(*), that works fine, it's the install. there is a bug somewhere, where the check if installed is WRONG, so it deinstalls the LAST installed module, but installes the correct version! my workaround was to tar lib/python2.7/site-packages, install the 3.2 modules (which deinstalls the 2.7) and when done, untar the 2.7. the virtualenv is a nogo here, we have several hundred users! the bsd.python.mk needs urgent cleanup, it's most confusing cheers, danny *: make PYTHON_VERSION=3.2 clean {de,re}install PS: keep me in the CC, I'm not subscrided to ports.