Bug 223136

Summary: databases/py-gdbm: Fix Python 3 support
Product: Ports & Packages Reporter: Val Packett <val>
Component: Individual Port(s)Assignee: Po-Chuan Hsieh <sunpoet>
Status: Closed FIXED    
Severity: Affects Only Me CC: arrowd
Priority: --- Flags: bugzilla: maintainer-feedback? (python)
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 223137    
Attachments:
Description Flags
py-gdbm.patch none

Description Val Packett 2017-10-20 21:11:01 UTC
Created attachment 187336 [details]
py-gdbm.patch

This tiny, one-character patch fixes Python 3 support :D

Python 3 expects the library to be named _gdbm, not just gdbm. After this change, 'import dbm.gnu as gdbm' no longer fails.
Comment 1 Val Packett 2017-12-19 14:44:16 UTC
ping. Can we get this merged soon??
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-12-29 18:48:08 UTC
A commit references this bug:

Author: sunpoet
Date: Fri Dec 29 18:47:42 UTC 2017
New revision: 457528
URL: https://svnweb.freebsd.org/changeset/ports/457528

Log:
  Fix _gdbm module for Python 3

  - Bump PORTREVISION for package change

  PR:		223136
  Submitted by:	Greg V <greg@unrelenting.technology>

Changes:
  head/databases/py-gdbm/Makefile
  head/databases/py-gdbm/files/setup3.py
Comment 3 Po-Chuan Hsieh freebsd_committer freebsd_triage 2017-12-29 18:53:34 UTC
Committed. Thanks!
Comment 4 Gleb Popov freebsd_committer freebsd_triage 2020-02-14 07:07:51 UTC
When trying to update net/py-avahi to use Python 3, I got the following error:

checking for python module gdbm... no
configure: error: Could not find Python module gdbm

The script searches for modules by running this python code

import <modulename>

After this PR, the module is named _gdbm, which seems to be the source of problem.

Is adding _ really proper solution? Or maybe it is avahi problem?