pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: django/python missing sqlite
On Sun 12 Apr 2009 at 01:27:42 PM +0200, Joerg Sonnenberger wrote:
>On Sun, Apr 12, 2009 at 01:17:54PM +0200, Joerg Sonnenberger wrote:
>> On Sun, Apr 12, 2009 at 12:17:52AM -0700, George Georgalis wrote:
>> > Not sure what you're getting at here. As far as I can tell/tried. Can you
>> > be more specific about what you want me to do?
>>
>> OK, let's make it simpler. Just apply the attached patch in
>> www/py-django and rebuild. It should make it work without py-sqlite3.
This looks like the same original patch. Thanks for making the md5 et al,
but I'm still not seeing any change.
PKG_OPTIONS.django=sqlite is required to get the default django
configuration; fine. Though, a file or configure output, indicating
the default is a non-standard config might be helpful when trying to
know that for the first time. I was reading upstream django docs BTW,
and the django list said there was a problem with my python 2.5...
With the patch(es), that config option still installs the sqlite2 dependency
and without a manual sqlite3 install the missing sqlite3 exception still
comes up.
Not sure the big picture, just trying to help... but doesn't this version
of django simply require sqlite3 in the options.mk file?
.if !empty(PKG_OPTIONS:Msqlite)
DEPENDS+= ${PYPKGPREFIX}-sqlite2-[0-9]*:../../databases/py-sqlite2
PLIST.sqlite= yes
.endif
It does seem like a python25 issue to me. Even the readme says:
The version of pysqlite2 that's including in Python needs sqlite3 3.0.8
or later. setup.py attempts to check that it can find a correct version.
lang/python25/work/Python-2.5.2/README
so not sure what the right thing here is. sqlite option and sqlite3
install solves my problem but seems something in deps/options is more
complicated than necessary. happy to test further.
--George
>Index: Makefile
>===================================================================
>RCS file: /home/joerg/repo/netbsd/pkgsrc/www/py-django/Makefile,v
>retrieving revision 1.15
>diff -u -p -r1.15 Makefile
>--- Makefile 29 Jan 2009 09:35:54 -0000 1.15
>+++ Makefile 12 Apr 2009 11:16:20 -0000
>@@ -21,7 +21,7 @@ DEPENDS+= ${PYPKGPREFIX}-flup-[0-9]*:../
>
> .include "options.mk"
>
>-post-extract:
>+pre-configure:
> rm -r ${WRKSRC}/django/db/backends/oracle
> .if empty(PKG_OPTIONS:Mmysql)
> rm -r ${WRKSRC}/django/db/backends/mysql
>Index: distinfo
>===================================================================
>RCS file: /home/joerg/repo/netbsd/pkgsrc/www/py-django/distinfo,v
>retrieving revision 1.8
>diff -u -p -r1.8 distinfo
>--- distinfo 17 Dec 2008 19:55:38 -0000 1.8
>+++ distinfo 12 Apr 2009 11:16:44 -0000
>@@ -4,3 +4,4 @@ SHA1 (Django-1.0.2-final.tar.gz) = f2d90
> RMD160 (Django-1.0.2-final.tar.gz) = 0cfea620df0831310da4ef51ef6ee4ef1b65974e
> Size (Django-1.0.2-final.tar.gz) = 4649433 bytes
> SHA1 (patch-aa) = 54a532d9c6761f80a10c633bb6192faccb5ab64b
>+SHA1 (patch-ab) = 620e958ab3b4c3cf7ceb507b52ac64b522a6e4a8
>Index: patches/patch-ab
>===================================================================
>RCS file: patches/patch-ab
>diff -N patches/patch-ab
>--- /dev/null 1 Jan 1970 00:00:00 -0000
>+++ patches/patch-ab 12 Apr 2009 11:16:42 -0000
>@@ -0,0 +1,25 @@
>+$NetBSD$
>+
>+--- django/db/backends/sqlite3/base.py.orig 2009-04-11 22:01:24.000000000
>+0200
>++++ django/db/backends/sqlite3/base.py
>+@@ -12,18 +12,11 @@ from django.db.backends.sqlite3.creation
>+ from django.db.backends.sqlite3.introspection import DatabaseIntrospection
>+
>+ try:
>+- try:
>+- from sqlite3 import dbapi2 as Database
>+- except ImportError, e1:
>+- from pysqlite2 import dbapi2 as Database
>++ from pysqlite2 import dbapi2 as Database
>+ except ImportError, exc:
>+ import sys
>+ from django.core.exceptions import ImproperlyConfigured
>+- if sys.version_info < (2, 5, 0):
>+- module = 'pysqlite2'
>+- else:
>+- module = 'sqlite3'
>+- exc = e1
>++ module = 'pysqlite2'
>+ raise ImproperlyConfigured, "Error loading %s module: %s" % (module, exc)
>+
>+ try:
--
George Georgalis <george%galis.org@localhost>, Information Systems <IXOYE><
SEEKING EMPLOYMENT OPPORTUNITIES, specialties: BSD/Linux, HPC,
security/VPN, data warehousing, virtualization, validation,
decision tree analysis, unit testing and change control.
Home |
Main Index |
Thread Index |
Old Index