From owner-freebsd-python@freebsd.org Mon Jun 20 03:41:29 2016 Return-Path: Delivered-To: freebsd-python@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A2EFA79096 for ; Mon, 20 Jun 2016 03:41:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 344F2130B for ; Mon, 20 Jun 2016 03:41:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 303A4A79095; Mon, 20 Jun 2016 03:41:29 +0000 (UTC) Delivered-To: python@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FE85A79094 for ; Mon, 20 Jun 2016 03:41:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FCEC130A for ; Mon, 20 Jun 2016 03:41:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u5K3fS7S060134 for ; Mon, 20 Jun 2016 03:41:28 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: python@FreeBSD.org Subject: [Bug 209551] Python bits ignore DEFAULT_VERSIONS Date: Mon, 20 Jun 2016 03:41:29 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Ports Framework X-Bugzilla-Version: Latest X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: FreeBSD@ShaneWare.Biz X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: python@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jun 2016 03:41:29 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D209551 Shane changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |FreeBSD@ShaneWare.Biz --- Comment #11 from Shane --- While I understand there is some confusion in this matter I don't see that adjusting default versions will do anything more than cause more trouble. Changing the default python version to build one port will only lead to breaking concurrent installs for other python versions. Setting DEFAULT_VERSIONS is used to determine naming and linking behavior. When a python port which uses concurrent installs bin/script then bin/script gets renamed to bin/script-2.7 and if PYTHON_VERSION equals DEFAULT_VERSION bin/script is added as a link to bin/script-2.7 By installing a port using the default of DEFAULT_VERSION=3Dpython=3D2.7 th= en when you install it again using DEFAULT_VERSIONS=3Dpython=3D3.5 it will conflict= with the existing install by also trying to install bin/script There are three ways a python port fails (apart from FreeBSD specific patching), a port doesn't support py3 or a port requires py3 and the default version prevents it's dependencies from building with the matching python version. The third failure is a port runs a script using python as the comm= and, not python${UNIQUE_SUFFIX} in which case the port should be adjusted by usi= ng shebangfix or patching. Fixing the first means making changes to the code to support py3. While por= ts are being duplicated to force a py3 dependent port, they are only making conflicts with existing installs and making temporary changes that will lat= er need to be undone. I expect the true fix for the ports that require py3 is adding support for VARIANTS to the ports infrastructure. So DEFAULT_VERSION should be set once in /etc/make.conf and left that way, = the same default for every port built. PYTHON_VERSION can then be used to build= a second version of a port for a non-default python version. Using `make PYTHON_VERSION=3D3.5 install` fails when dependent ports need t= o be built as they don't inherit the make variables from the initial port. Meani= ng `make PYTHON_VERSION=3D3.5 install` will build the current port using py3.5= but if a dependency needs to be built it will use DEFAULT_VERSION. The better way to install a port using a non-default python version is to u= se setenv PYTHON_VERSION 3.5;make install or for bash export PYTHON_VERSION=3D3.5;make install By setting an environment variable you are setting a variable that is also visible to every dependent port. This way if py27-dpendent is already insta= lled then py35-dependent will be built as a dependency. As well as the above manual method, to test and install multiple python por= ts I use poudriere, I setup different builds for each python version. I always l= eave DEFAULT_VERSION=3Dpython=3D2.7 in each build so that the packages can be in= stalled together. For each build I set PYTHON_VERSION to the desired version. --=20 You are receiving this mail because: You are the assignee for the bug.=