Date: Tue, 29 Mar 2011 11:48:58 +0400 From: Pan Tsu <inyaoo@gmail.com> To: Matthias Andree <mandree@FreeBSD.org> Cc: Pavel Volkov <pavelivolkov@googlemail.com>, Beat Gaetzi <beat@FreeBSD.org>, bug-followup@FreeBSD.org, freebsd-python@FreeBSD.org Subject: Re: ports/155971: [PATCH] databases/sqlite3: always enable EXTENSIONS Message-ID: <86tyem8iz9.fsf@gmail.com> In-Reply-To: <868vvyfqib.fsf@gmail.com> (Pan Tsu's message of "Tue, 29 Mar 2011 09:24:28 %2B0400") References: <201103280800.p2S80NRT048809@freefall.freebsd.org> <4D90740E.9010305@FreeBSD.org> <0a97b224749efa1cae65845675036f4d.squirrel@wmail.chruetertee.ch> <4D909E08.2080006@FreeBSD.org> <868vvyfqib.fsf@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Pan Tsu <inyaoo@gmail.com> writes: > Matthias Andree <mandree@FreeBSD.org> 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 ---
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86tyem8iz9.fsf>