Date: Mon, 20 Jun 2016 03:41:29 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 209551] Python bits ignore DEFAULT_VERSIONS Message-ID: <bug-209551-13-7ZvnMD5VLs@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-209551-13@https.bugs.freebsd.org/bugzilla/> References: <bug-209551-13@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D209551 Shane <FreeBSD@ShaneWare.Biz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |FreeBSD@ShaneWare.Biz --- Comment #11 from Shane <FreeBSD@ShaneWare.Biz> --- 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 on the CC list for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-209551-13-7ZvnMD5VLs>