Bug 233104 - databases/py-pg8000: Add missing devel/py-six dependency
Summary: databases/py-pg8000: Add missing devel/py-six dependency
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Wen Heping
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-10 08:13 UTC by Jeremy Chadwick
Modified: 2018-11-14 02:35 UTC (History)
7 users (show)

See Also:
koobs: maintainer-feedback+
koobs: merge-quarterly+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Chadwick 2018-11-10 08:13:37 UTC
The databases/py-pg8000 port requires devel/py-six to properly work.

I have not tested Python 2.x, but this is definitely the case for Python 3.6.

Example:

$ python3 -V
Python 3.6.7
$ python3
Python 3.6.7 (default, Oct 28 2018, 01:11:16)
[GCC 4.2.1 Compatible FreeBSD Clang 6.0.0 (tags/RELEASE_600/final 326565)] on freebsd11
Type "help", "copyright", "credits" or "license" for more information.
>>> import pg8000
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/site-packages/pg8000/__init__.py", line 1, in <module>
    from pg8000.core import (
  File "/usr/local/lib/python3.6/site-packages/pg8000/core.py", line 10, in <module>
    from six.moves import map
ModuleNotFoundError: No module named 'six'

Details:

https://github.com/mfenniak/pg8000/blob/1.11.0/pg8000/core.py#L11

 Looking through git history shows that the six dependency is *at least* 2 years old (likely longer but I didn't feel like going through all their old commits):

https://github.com/mfenniak/pg8000/blame/1.11.0/pg8000/core.py#L11

Maybe maintainer's system already has py-six installed, thus they didn't notice this problem?

Solution/workaround:

$ sudo pkg install -y py36-six
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        py36-six: 1.11.0

Number of packages to be installed: 1

18 KiB to be downloaded.
[1/1] Fetching py36-six-1.11.0.txz: 100%   18 KiB  18.2kB/s    00:01
Checking integrity... done (0 conflicting)
[1/1] Installing py36-six-1.11.0...
[1/1] Extracting py36-six-1.11.0: 100%
$ python3
Python 3.6.7 (default, Oct 28 2018, 01:11:16)
[GCC 4.2.1 Compatible FreeBSD Clang 6.0.0 (tags/RELEASE_600/final 326565)] on freebsd11
Type "help", "copyright", "credits" or "license" for more information.
>>> import pg8000
>>>
Comment 1 Jeremy Chadwick 2018-11-11 07:55:58 UTC
The patch should be pretty self-explanatory: add the below to the appropriate place in the Makefile (right above USES):

RUN_DEPENDS=${PYTHON_PKGNAMEPREFIX}six>=0:devel/py-six@${PY_FLAVOR}
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-11-11 10:30:43 UTC
A commit references this bug:

Author: wen
Date: Sun Nov 11 10:30:27 UTC 2018
New revision: 484681
URL: https://svnweb.freebsd.org/changeset/ports/484681

Log:
  - Add missing RUN_DEPENDS

  PR:		233104
  Submitted by:	jdc@koitsu.org

Changes:
  head/databases/py-pg8000/Makefile
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2018-11-13 02:00:48 UTC
Re-open for MFH, port-secteam has been contacted (out of band, via email) for approval/merge
Comment 4 Mark Felder freebsd_committer freebsd_triage 2018-11-13 14:31:36 UTC
This MFH should be covered under the blanket
Comment 5 commit-hook freebsd_committer freebsd_triage 2018-11-13 21:06:56 UTC
A commit references this bug:

Author: feld
Date: Tue Nov 13 21:06:38 UTC 2018
New revision: 484898
URL: https://svnweb.freebsd.org/changeset/ports/484898

Log:
  MFH: r484681

  - Add missing RUN_DEPENDS

  PR:		233104
  Submitted by:	jdc@koitsu.org

Changes:
_U  branches/2018Q4/
  branches/2018Q4/databases/py-pg8000/Makefile
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2018-11-14 02:35:10 UTC
Thank you Mark