From owner-freebsd-python@FreeBSD.ORG Tue Mar 29 07:49:06 2011 Return-Path: Delivered-To: freebsd-python@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4415A1065670; Tue, 29 Mar 2011 07:49:06 +0000 (UTC) (envelope-from inyaoo@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4E29B8FC15; Tue, 29 Mar 2011 07:49:04 +0000 (UTC) Received: by fxm11 with SMTP id 11so4229815fxm.13 for ; Tue, 29 Mar 2011 00:49:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=ELt77oE3cHlFYThBBRtqW2UJbXv8YM4l2VtvlIBSt7k=; b=tUCGh5RzlgGl3bX3VGjjlvXefY0r3jh+04sC/F5Pa+6p74uagx0MDzX/4JzkHRbdfr lMmiuuIMF22CLbQC6Xr3irbZBagyi1YHU0tHUPoSWn37qCEDKhwuLQYn1DtTshrT6TDQ LZrHQHPJf4KbhjuCKll3Ai6ASip2AS3JM8eps= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=FtrpS3wDIvfHHA3pRYe04ACsp14LRskofnNAQ4V1iaeULekKtENmHTIm83hJV7Nds4 yDQ1F5C0oQ2NSoFWpafA8+WQ79mI/BRfQE8VKxDDJDRSt9Q57beHGbiUpl5Jzs/0SBYP NuN+rqKSxJSqYJgYZbQXmgNXXzygiPZIbGTOc= Received: by 10.223.126.140 with SMTP id c12mr5524851fas.31.1301384944240; Tue, 29 Mar 2011 00:49:04 -0700 (PDT) Received: from localhost (spftor2.privacyfoundation.de [62.141.58.13]) by mx.google.com with ESMTPS id f15sm1811146fax.34.2011.03.29.00.49.01 (version=SSLv3 cipher=OTHER); Tue, 29 Mar 2011 00:49:01 -0700 (PDT) From: Pan Tsu To: Matthias Andree References: <201103280800.p2S80NRT048809@freefall.freebsd.org> <4D90740E.9010305@FreeBSD.org> <0a97b224749efa1cae65845675036f4d.squirrel@wmail.chruetertee.ch> <4D909E08.2080006@FreeBSD.org> <868vvyfqib.fsf@gmail.com> Date: Tue, 29 Mar 2011 11:48:58 +0400 In-Reply-To: <868vvyfqib.fsf@gmail.com> (Pan Tsu's message of "Tue, 29 Mar 2011 09:24:28 +0400") Message-ID: <86tyem8iz9.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: Pavel Volkov , Beat Gaetzi , bug-followup@FreeBSD.org, freebsd-python@FreeBSD.org Subject: Re: ports/155971: [PATCH] databases/sqlite3: always enable EXTENSIONS X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Mar 2011 07:49:06 -0000 Pan Tsu writes: > Matthias Andree 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 "", line 1, in > File "LOCALBASE/lib/python2.7/sqlite3/__init__.py", line 24, in > from dbapi2 import * > File "LOCALBASE/lib/python2.7/sqlite3/dbapi2.py", line 27, in > 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 ---