From owner-freebsd-python@freebsd.org Sun Jun 19 07:28:28 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 B1EFDA7AE63 for ; Sun, 19 Jun 2016 07:28:28 +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 9C21327EF for ; Sun, 19 Jun 2016 07:28:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 9B7B2A7AE61; Sun, 19 Jun 2016 07:28:28 +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 9B294A7AE60 for ; Sun, 19 Jun 2016 07:28:28 +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 8B05C27EE for ; Sun, 19 Jun 2016 07:28:28 +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 u5J7SS6p079753 for ; Sun, 19 Jun 2016 07:28:28 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: python@FreeBSD.org Subject: [Bug 209204] Changing default Python version unduly difficult Date: Sun, 19 Jun 2016 07:28:28 +0000 X-Bugzilla-Reason: CC 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: needs-qa X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: iblis@hs.ntnu.edu.tw X-Bugzilla-Status: Closed X-Bugzilla-Resolution: DUPLICATE X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: dbn@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created 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: Sun, 19 Jun 2016 07:28:28 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D209204 --- Comment #13 from Iblis Lin --- Created attachment 171563 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D171563&action= =3Dedit propose patch Please give this patch a try, It follows the rule i proposed in bug 209551, comment 1. Here describe the testing flow: 1. prepare a new jail 2. check the current priority of `${LOCALBASE}/bin/python` $ pkg install python # should create a symlink `/usr/local/bin/python` $ cd /usr/ports/databases/py-sqlite3 $ make -V PYTHON_VERSION DEFAULT_VERSIONS=3Dpython=3D3.5 python2.7 # the symlink win now 3. apply this patch 4. check that DEFAULT_VERSIONS got higher priority $ cd /usr/ports/databases/py-sqlite3 $ make -V PYTHON_VERSION python2.7 $ make -V PYTHON_VERSION DEFAULT_VERSIONS=3Dpython=3D3.5 python3.5 5. one more check for priority of symlink `/usr/local/bin/python` $ pkg delete python $ pkg install python3 # we will get python3.4 installed $ cd /usr/local/bin $ ln -s python3 python $ ls -l python lrwxr-xr-x 1 root wheel 7 Jun 19 14:16 python@ -> python3 $ cd /usr/ports/databases/py-sqlite3 $ make -V PYTHON_VERSION DEFAULT_VERSIONS=3Dpython=3D3.5 python3.5 $ make -V PYTHON_VERSION python3.4 # ya! symlink auto-detect correct! --=20 You are receiving this mail because: You are on the CC list for the bug.=