Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Jun 2016 07:41:12 +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-tGCAdfw43w@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

--- Comment #4 from Iblis Lin <iblis@hs.ntnu.edu.tw> ---
Created attachment 171564
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D171564&action=
=3Dedit
propose patch: keep PYTHON_VERSION

The PYTHON_VERSION will be handy for install non-conclict python package
(e.g. py27-sqlite3 + py34-sqlite3). Please consider to keep it!

I make a patch following the rule in comment #1

Here describe the testing flow for this patch:

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.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-209551-13-tGCAdfw43w>