From owner-freebsd-python@freebsd.org  Wed Jan 31 07:00:59 2018
Return-Path: <owner-freebsd-python@freebsd.org>
Delivered-To: freebsd-python@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 852F9EDED67
 for <freebsd-python@mailman.ysv.freebsd.org>;
 Wed, 31 Jan 2018 07:00:59 +0000 (UTC)
 (envelope-from estartu@ze.tum.de)
Received: from mail.ze.tum.de (mail.ze.tum.de [IPv6:2001:4ca0:2e03::1:2])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mail.ze.tum.de",
 Issuer "Zertifizierungsstelle der TUM" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 083D47674E
 for <freebsd-python@freebsd.org>; Wed, 31 Jan 2018 07:00:58 +0000 (UTC)
 (envelope-from estartu@ze.tum.de)
Received: from etustar.ze.tum.de (etustar.ze.tum.de [129.187.39.200])
 by mail.ze.tum.de (8.15.2/8.15.2) with ESMTPS id w0V70t4N092517
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO)
 for <freebsd-python@freebsd.org>; Wed, 31 Jan 2018 08:00:55 +0100 (CET)
 (envelope-from estartu@ze.tum.de)
To: FreeBSD Python <freebsd-python@freebsd.org>
From: Gerhard Schmidt <estartu@ze.tum.de>
Organization: =?UTF-8?Q?Technische_Universit=c3=a4t_M=c3=bcnchen_-_WWW_und_O?=
 =?UTF-8?Q?nline_Services?=
Subject: Installing a port to a specific python version
Message-ID: <6825a87e-60ec-f3bd-3368-2a6a519667bb@ze.tum.de>
Date: Wed, 31 Jan 2018 08:00:55 +0100
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101
 Thunderbird/52.6.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-BeenThere: freebsd-python@freebsd.org
X-Mailman-Version: 2.1.25
Precedence: list
List-Id: FreeBSD-specific Python issues <freebsd-python.freebsd.org>
List-Unsubscribe: <https://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: <https://lists.freebsd.org/mailman/listinfo/freebsd-python>,
 <mailto:freebsd-python-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 31 Jan 2018 07:00:59 -0000

Hi

I'm having a small problem with python and FreeBSD. I'm a python
developer. I Maintain some legacy code written in python2.7 and some new
projects in Python 3.6 and for testing purposes i need python 3.4 and
3.5. So I need all this versions of python on my system, at least to be
able to create virtual envs.

Installing the python interpreters is not a problem, but installing
python packages.

How can in say a port it shouldn't use the default version stated in
make.conf but a specific version. I don't want to change the default
version every time i install a Port.

I've tried to set PYTHON_VERSION as environment variable.
I've tried to give PYTHON_VERSION as parameter to make.
I've tried to give PYTHON as parameter to make.
I've tried python3.5 python35 3.5 and 35 with each of them, it still
installed the default python version.

Then i tried make PYTHON_DEFAULT=3.5 and get a error message.

So how can i tell a port to install the python3.5 version of a port
without changing the make.conf

Regards
  Estartu