Pan Tsu <[email protected]> writes:

> Matthias Andree <[email protected]> writes:
>
> [...]
>> How about the attached patch to www/firefox?  It performs this check in
>> pre-everything (in case sqlite3 is already installed) and again in
>> pre-build (if it got installed in the 'make depends' stage).
>
> Why are you trying to fix only firefox? Every user of py-sqlite3 is affected.
>
>   $ python -c 'import sqlite3'
>   Traceback (most recent call last):
>     File "<string>", line 1, in <module>
>     File "LOCALBASE/lib/python2.7/sqlite3/__init__.py", line 24, in <module>
>       from dbapi2 import *
>     File "LOCALBASE/lib/python2.7/sqlite3/dbapi2.py", line 27, in <module>
>       from _sqlite3 import *
>   ImportError: LOCALBASE/lib/python2.7/site-packages/_sqlite3.so: Undefined 
> symbol "sqlite3_load_extension"

Nevermind, py-sqlite3 has HAVE_LOAD_EXTENSION ifdef around that call.

--- a.diff begins here ---
Index: databases/py-sqlite3/Makefile
===================================================================
RCS file: /a/.cvsup/ports/databases/py-sqlite3/Makefile,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile
--- databases/py-sqlite3/Makefile       28 Oct 2010 21:00:08 -0000      1.8
+++ databases/py-sqlite3/Makefile       29 Mar 2011 07:40:40 -0000
@@ -7,7 +7,7 @@
 
 PORTNAME=      sqlite3
 PORTVERSION=   ${PYTHON_PORTVERSION}
-PORTREVISION=  1
+PORTREVISION=  2
 CATEGORIES=    databases python
 MASTER_SITES=  ${PYTHON_MASTER_SITES}
 MASTER_SITE_SUBDIR=    ${PYTHON_MASTER_SITE_SUBDIR}
Index: databases/py-sqlite3/files/setup.py
===================================================================
RCS file: /a/.cvsup/ports/databases/py-sqlite3/files/setup.py,v
retrieving revision 1.2
diff -u -p -r1.2 setup.py
--- databases/py-sqlite3/files/setup.py 7 Aug 2006 02:23:05 -0000       1.2
+++ databases/py-sqlite3/files/setup.py 29 Mar 2011 07:38:29 -0000
@@ -32,6 +32,12 @@ sqlite_srcs = [
 '_sqlite/statement.c',
 '_sqlite/util.c']
 
+try:
+    import ctypes
+    ctypes.CDLL("libsqlite3.so").sqlite3_load_extension
+except AttributeError:
+    macros.append(('SQLITE_OMIT_LOAD_EXTENSION', '1'))
+
 setup(name = "_sqlite3",
       description = "SQLite 3 extension to Python",
       
Index: databases/py-sqlite3/files/setup3.py
===================================================================
RCS file: /a/.cvsup/ports/databases/py-sqlite3/files/setup3.py,v
retrieving revision 1.1
diff -u -p -r1.1 setup3.py
--- databases/py-sqlite3/files/setup3.py        30 Jun 2009 21:51:53 -0000      
1.1
+++ databases/py-sqlite3/files/setup3.py        29 Mar 2011 07:40:50 -0000
@@ -31,6 +31,12 @@ sqlite_srcs = [
 '_sqlite/statement.c',
 '_sqlite/util.c']
 
+try:
+    import ctypes
+    ctypes.CDLL("libsqlite3.so").sqlite3_load_extension
+except AttributeError:
+    macros.append(('SQLITE_OMIT_LOAD_EXTENSION', '1'))
+
 setup(name = "_sqlite3",
       description = "SQLite 3 extension to Python",
       
--- a.diff ends here ---
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-python
To unsubscribe, send any mail to "[email protected]"

Reply via email to