[Bug 209551] Python bits ignore DEFAULT_VERSIONS

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Jun 19 07:41:13 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209551

--- Comment #4 from Iblis Lin <iblis at hs.ntnu.edu.tw> ---
Created attachment 171564
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=171564&action=edit
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=python=3.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=python=3.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=python=3.5
   python3.5
   $ make -V PYTHON_VERSION
   python3.4  # ya! symlink auto-detect correct!

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-python mailing list