Bug 172455

Summary: [new port] databases/py-fdb: Firebird RDBMS bindings for Python.
Product: Ports & Packages Reporter: jjachuf
Component: Individual Port(s)Assignee: Ruslan Makhmatkhanov <rm>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.shar
none
1.shar.txt none

Description jjachuf 2012-10-07 16:40:11 UTC
Simply a new port that is useful to users Python and FirebirdSQL.

FBD is the official driver firebird-python community

It works well, but has a problem when uninstalling.

# make deinstall
===>  Deinstalling for databases/py-fdb
===>   Deinstalling py27-fdb-0.9
pkg_delete: file '/usr/local/lib/python2.7/site-packages/fdb-0.9-py2.7.egg-info' doesn't exist
pkg_delete: couldn't entirely delete package `py27-fdb-0.9'
(perhaps the packing list is incorrectly specified?)

In pkg-plist I have not included the file:
/usr/local/lib/python2.7/site-packages/fdb-0.9-py2.7.egg-info

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-10-07 16:40:21 UTC
Class Changed
From-To: maintainer-update->change-request

Fix category (new ports should be change-requests) (via the GNATS Auto 
Assign Tool)
Comment 2 R.Mahmatkhanov 2012-10-08 13:14:32 UTC
Hi Jose,

please review the attached shar. It is fixing some of the problems in 
original submission:

- use new-style Makefile header
- limit python version to 2.x only (see [1]) and remove "Python3 ready"
- the port needs setuptools, not distutils, so change USE_PYDISTUTILS
   to easy_install
- add firebird client as build dependency (see traceback at [2])
- add WWW into pkg-descr and align the text at 80-char border
- use PYEASYINSTALL_EGG in pkg-plist instead of hardcoded egg-filename

[1] That's what I got when trying to build it with python32:
"""
===>  Configuring for py32-fdb-0.9
Traceback (most recent call last):
   File "setup.py", line 7, in <module>
     from fdb import __version__
   File "/work/a/ports/databases/py-fdb/work/fdb-0.9/fdb/__init__.py", 
line 25, in <module>
     from fdb import services
   File "/work/a/ports/databases/py-fdb/work/fdb-0.9/fdb/services.py", 
line 57
     CAPABILITY_MULTI_CLIENT = 0x2L
                                  ^
SyntaxError: invalid syntax
*** Error code 1
"""
[2] That's what I got when trying to build it w/o firebird-client installed:
"""
===>  Configuring for py27-fdb-0.9
Traceback (most recent call last):
   File "setup.py", line 7, in <module>
     from fdb import __version__
   File "/work/a/ports/databases/py-fdb/work/fdb-0.9/fdb/__init__.py", 
line 23, in <module>
     from fdb.fbcore import *
   File "/work/a/ports/databases/py-fdb/work/fdb-0.9/fdb/fbcore.py", 
line 26, in <module>
     from . import ibase
   File "/work/a/ports/databases/py-fdb/work/fdb-0.9/fdb/ibase.py", line 
1139, in <module>
     isc_attach_database = fb_library.isc_attach_database
   File "/usr/local/lib/python2.7/ctypes/__init__.py", line 378, in 
__getattr__
     func = self.__getitem__(name)
   File "/usr/local/lib/python2.7/ctypes/__init__.py", line 383, in 
__getitem__
     func = self._FuncPtr((name_or_ordinal, self))
AttributeError: Undefined symbol "isc_attach_database"
*** Error code 1
"""

So, if you approve the changes, I'll commit this.

-- 
Regards,
Ruslan

Tinderboxing kills... the drives.
Comment 3 Ruslan Makhmatkhanov freebsd_committer freebsd_triage 2012-10-08 19:58:53 UTC
Responsible Changed
From-To: freebsd-ports-bugs->rm

I will take it.
Comment 4 Ruslan Makhmatkhanov freebsd_committer freebsd_triage 2012-10-11 21:19:40 UTC
State Changed
From-To: open->closed

Committed, thank you!