From owner-freebsd-python@freebsd.org Thu Feb 1 15:54:30 2018 Return-Path: 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 EDCA2ED9B23 for ; Thu, 1 Feb 2018 15:54:29 +0000 (UTC) (envelope-from schmidt@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 28C687328F for ; Thu, 1 Feb 2018 15:54:28 +0000 (UTC) (envelope-from schmidt@ze.tum.de) Received: from [192.168.71.66] (ppp-188-174-102-58.dynamic.mnet-online.de [188.174.102.58]) (authenticated bits=0) by mail.ze.tum.de (8.15.2/8.15.2) with ESMTPSA id w11FsOnN065079 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 1 Feb 2018 16:54:24 +0100 (CET) (envelope-from schmidt@ze.tum.de) X-Authentication-Warning: hades.ze.tum.de: Host ppp-188-174-102-58.dynamic.mnet-online.de [188.174.102.58] claimed to be [192.168.71.66] From: Gerhard Schmidt Subject: Re: Installing a port to a specific python version To: Gerhard Schmidt , FreeBSD Python References: <6825a87e-60ec-f3bd-3368-2a6a519667bb@ze.tum.de> <20180201151021.GA52705@slackbox.erewhon.home> Message-ID: <799f50a9-4cb5-7e71-a3fb-bb030d80d864@ze.tum.de> Date: Thu, 1 Feb 2018 16:54:24 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20180201151021.GA52705@slackbox.erewhon.home> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="x3BTe5vDB5aX9wuwMmxiwoHUEeFbbwvpG" X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Feb 2018 15:54:30 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --x3BTe5vDB5aX9wuwMmxiwoHUEeFbbwvpG Content-Type: multipart/mixed; boundary="wlRL7T9Uq2F1pawXXghwKfTmriXnuO5wp"; protected-headers="v1" From: Gerhard Schmidt To: Gerhard Schmidt , FreeBSD Python Message-ID: <799f50a9-4cb5-7e71-a3fb-bb030d80d864@ze.tum.de> Subject: Re: Installing a port to a specific python version References: <6825a87e-60ec-f3bd-3368-2a6a519667bb@ze.tum.de> <20180201151021.GA52705@slackbox.erewhon.home> In-Reply-To: <20180201151021.GA52705@slackbox.erewhon.home> --wlRL7T9Uq2F1pawXXghwKfTmriXnuO5wp Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Am 01.02.2018 um 16:10 schrieb Roland Smith: > On Wed, Jan 31, 2018 at 08:00:55AM +0100, Gerhard Schmidt wrote: >> 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 n= ew >> 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 b= e >> 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=3D3.5 and get a error message. >=20 > Python ports work with "flavors" now. See the entries for 20171130 in > /usr/ports/UPDATING. >=20 > Use it like this:: >=20 > cd /usr/ports/ > make FLAVOR=3Dpy36 install clean >=20 > If you always want a specific version of a port, you can put the follow= ing in > /etc/make.conf:: >=20 > .if ${.CURDIR:M*/devel/ipython} > FLAVOR=3Dpy36 > .endif >=20 > If you always want to build ports for all supported versions of Python,= use > the following in /etc/make.conf:: >=20 > BUILD_ALL_PYTHON_FLAVORS=3Dtrue >=20 > You *might* be able to restrict that to a specific package, like this::= >=20 > .if ${.CURDIR:M*/www/py-requests} > BUILD_ALL_PYTHON_FLAVORS=3Dtrue > .endif >=20 > According to the docs, `pkg` supports flavors. But I can't find anythin= g in > the manpage. portupgrade seams not to support this right now. pkg displays it. But pkg has it's own set of problems renders it practical impossible to use. portupgrade -fvvb py36-virtualenv ---> Session started at: Thu, 01 Feb 2018 16:49:02 +0100 [Reading data from pkg(8) ... - 959 packages found - done] ** Detected a package name change: py36-virtualenv (devel/py-virtualenv) -> 'py27-virtualenv' (devel/py-virtualenv) ---> Reinstallation of devel/py-virtualenv started at: Thu, 01 Feb 2018 16:49:05 +0100 ---> Reinstalling 'py36-virtualenv-15.1.0' (devel/py-virtualenv) ---> Build of devel/py-virtualenv started at: Thu, 01 Feb 2018 16:49:05 +0100 ---> Building '/usr/ports/devel/py-virtualenv' =3D=3D=3D> Cleaning for py27-virtualenv-15.1.0 =3D=3D=3D> Cleaning for py36-virtualenv-15.1.0 =3D=3D=3D> License MIT accepted by the user =3D=3D=3D> py27-virtualenv-15.1.0 depends on file: /usr/local/sbin/pkg = - found =3D=3D=3D> Fetching all distfiles required by py27-virtualenv-15.1.0 for = building =3D=3D=3D> Extracting for py27-virtualenv-15.1.0 =3D> SHA256 Checksum OK for pypa-virtualenv-15.1.0_GH0.tar.gz. =3D=3D=3D> Patching for py27-virtualenv-15.1.0 copy/convert test suite =3D=3D=3D> py27-virtualenv-15.1.0 depends on package: py27-setuptools>0= - found =3D=3D=3D> py27-virtualenv-15.1.0 depends on file: /usr/local/bin/pytho= n2.7 - found =3D=3D=3D> Configuring for py27-virtualenv-15.1.0 seams i have to do the updating of any python package by hand. Not much fun with 200+ FreeBSD Systems with differing python installations. Whould anybody be so kind to explain to me why this has to be changed. Loved working with FreeBSD and python for the last 15 Years. Never had any issues with the PYTHON_VERSION approach. And portupgrade did work with updating python3.6 packages while python2.7 was default. Regards Estartu --wlRL7T9Uq2F1pawXXghwKfTmriXnuO5wp-- --x3BTe5vDB5aX9wuwMmxiwoHUEeFbbwvpG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQJGBAEBCAAwFiEEPVa8SM32TGPJTcIIdNJDzEVwDaMFAlpzODASHHNjaG1pZHRA emUudHVtLmRlAAoJEHTSQ8xFcA2j6uAQAIo0UR/8fw2im/PXVrTY//p7pLlCf5u3 k1910SaWosVwOJ7bI4QaXonIHwlnFa+ojDUqBeKrz2QMmDiKEoeN/5lEyCdET7VB y71zKVXgXSXuCFcoX/YWrR99OKPPJeTMQfbjXtMBGNPcgRMNAp3IwvqIJ/3xABX3 pURViyLGcyYzxDkbxWvEGGdtYkMLRkIqU80P9Uvx1q5Q7ABgngQt03sYWwDa3aT0 pEx2Qyl3dnYvkCj6qL6H7/lgGm01XxhCfougse/WMuD/dYC3bueT34fzEQC7lD7i Ekq/mHQha+nMxSSzNKp4vuiTKCERXWo+0X16ITdx3cPKWlPIi1NB8cBFUbYkmDVS S20zZUBEDIFr8nbIvqjatrnuTxx0oAEStPaA4n8DYJMiPPmsFbka9ZmoZGXTpsh0 jXj80WrIhWh1L/eLuM5lMsgVlZSLPha4litXeHPRPx+Th+HCXHCEkmitao5yjvVG VTzzYtu3800GKdaeGmvclCDRbxltvc9q4Zo1lOEHRRQsp0jm19jaRpYb+6XtP4X4 zC+wyFtSl7eHk/XLSkY6LwIhhl0UDsjYG+XYah5mV7ZAckFNLx06fUWyQl7DjSv1 +GFPOXSYlESPyJpGojXAMXJ4DwKa4b2+3wFiouEPmdkA+Shq1GUJAxYTCk3qX/6H 2hCytqv58eoq =Sfxq -----END PGP SIGNATURE----- --x3BTe5vDB5aX9wuwMmxiwoHUEeFbbwvpG--