From owner-freebsd-python@FreeBSD.ORG  Tue Jul 30 09:14:24 2013
Return-Path: <owner-freebsd-python@FreeBSD.ORG>
Delivered-To: freebsd-python@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 290A34E8;
 Tue, 30 Jul 2013 09:14:24 +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 CD6C62F97;
 Tue, 30 Jul 2013 09:14:23 +0000 (UTC)
Received: from pampa.cs.huji.ac.il ([132.65.80.32])
 by kabab.cs.huji.ac.il with esmtp
 id 1V460a-0000VO-7t; Tue, 30 Jul 2013 12:14:20 +0300
X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.3
To: mva@freebsd.org
Subject: Re: Dealing with 2.7 and 3.3 installations
In-reply-to: <20130730095456.Horde.XlxQMdj5YU1hIxf6WAYZOQ2@webmail.df.eu>
References: <CAO+PfDdfdhfnyTi0sJzvbJA0GLnOB=3dNme0gn6uhnenzUcjaQ@mail.gmail.com>
 <20130730095456.Horde.XlxQMdj5YU1hIxf6WAYZOQ2@webmail.df.eu>
Comments: In-reply-to Marcus von Appen <mva@freebsd.org>
 message dated "Tue, 30 Jul 2013 09:54:56 +0200."
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Tue, 30 Jul 2013 12:14:19 +0300
From: Daniel Braniss <danny@cs.huji.ac.il>
Message-ID: <E1V460a-0000VO-7t@kabab.cs.huji.ac.il>
Cc: David Demelier <demelier.david@gmail.com>, bapt@freebsd.org,
 koobs@freebsd.org, freebsd-python@freebsd.org
X-BeenThere: freebsd-python@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: FreeBSD-specific Python issues <freebsd-python.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-python>,
 <mailto:freebsd-python-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-python>
List-Post: <mailto:freebsd-python@freebsd.org>
List-Help: <mailto:freebsd-python-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-python>,
 <mailto:freebsd-python-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Jul 2013 09:14:24 -0000

> David, Daniel,
> 
> just to take this to python@ and to clarify, what problems are still  
> open for you:
> 
> - bapt confirmed that the parallel installation of python itself from  
> binary packages should work
>    without any problem
> - Installation from the ports tree should work without problems
> - Installation of python modules from the ports tree basically works  
> without problems (given that
>    you set the correct make knobs), BUT can create tons of issues,  
> when it comes to deinstallation,
>    port dependency detection, etc.
> 
> As per my understanding, you both mentioned issues with both, python  
> itself and 3rd party packages.
> As said above, python itself should not be any problem. If you ran  
> into any issue, please let python@
> know about it (ideally with a reproducible step-by-step description)  
> or create a PR.
> 
> Regarding the 3rd party modules, I am not sure about the pkg status.  
> Maybe bapt can say a word or
> two about whether packages are (planned to or currently) built for  
> different python versions or not.
> David, Daniel: if you are currently running into trouble with the 3rd  
> party modules, please
> let us know, what your requirements are, so we can discuss different  
> solutions top be applied to the
> ports tree and, where applicable, improved support for the pkg builds.
> 
> Thanks and cheers
> Marcus
> 
> 
> 

hi Marcus,
you are correct on most counts.
it's the make in ports that's problematic.

 - no problem in installing all/any version of lang/python.
 - the issue is with 3rd. party modules, and more specifically
   when installing. Furthermore, most modules  compile for all
   versions of python, but installing them is the issue:
     - if the module is installed, no matter what python
       version, it will be deinstalled - unless  FORCE_PKG_REGISTER=,
       which prevents the deinstall issue
   IMHO, the check for is installed does not correctly use PYTHON_VERSION
example:

	/usr/local/bin/python -> python3.3

# cd /usr/ports/devel/py-setproctitle
# make install
===>  Installing for py33-setproctitle-1.1.7
===>   py33-setproctitle-1.1.7 depends on file: /usr/local/bin/python3.3 - 
found
===>   Generating temporary packing list
===>  Checking if devel/py-setproctitle already installed
===>   py33-setproctitle-1.1.7 is already installed              <==== NOT TRUE
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of devel/py-setproctitle
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** [check-already-installed] Error code 1

Stop in /usr/ports/devel/py-setproctitle.
# ls -ls /usr/local/lib/python3.3/site-packages/
total 5
1 -r--r--r--  1 root  wheel   119 Jul 29 11:43 README
2 drwxr-xr-x  4 root  wheel    14 Jul 28 14:00 psycopg2
3 -rw-r--r--  1 root  wheel  1883 Jul 28 14:00 psycopg2-2.5.1-py3.3.egg-info
# make {de,re}install
===>  Deinstalling for devel/py-setproctitle
===>   Deinstalling 
Deinstallation has been requested for the following 1 packages:

        py27-setproctitle-1.1.7  <==========!!!!

The deinstallation will free 31 kB
[1/1] Deleting py27-setproctitle-1.1.7... done
===>  Installing for py33-setproctitle-1.1.7
===>   py33-setproctitle-1.1.7 depends on file: /usr/local/bin/python3.3 - 
found
===>   Generating temporary packing list
...


 - somehwere it should be mentioned:
	- how to set the default python
	  i.e: usr/local/bin/python is a symlink, as is python-config
 - the bsd.python.mk is very confusing, and has some errors

at the moment my goal is to have python 2.7 as default, and 3.2/3.3
as optional, and using PYTHON_VERSION= and FORCE_PKG_REGISTER= ie:
	make PYTHON_VERSION=3.3 FORCE_PKG_REGISTER= clean install
is a workaround