pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: django/python missing sqlite



On Sat 11 Apr 2009 at 10:02:49 PM +0200, Joerg Sonnenberger wrote:
>On Sat, Apr 11, 2009 at 12:23:29PM -0700, George Georgalis wrote:
>> On Sat 11 Apr 2009 at 09:07:43 PM +0200, Joerg Sonnenberger wrote:
>> >On Sat, Apr 11, 2009 at 11:55:24AM -0700, George Georgalis wrote:
>> >> ( cd /usr/pkgsrc/www/py-django/ && bmake deinstall clean )
>> >> ( cd /usr/pkgsrc/databases/py-sqlite2 && bmake deinstall clean )
>> >> ( cd /usr/pkgsrc/databases/py-sqlite3 && bmake install )
>> >> ( cd /usr/pkgsrc/www/py-django/ && bmake install 
>> >> PKG_OPTIONS.django=sqlite )
>> >> 
>> >> but py-django still installs py-sqlite2:
>> >
>> >Yes, that is expected. The question is: does it work for you after you
>> >installed py-sqlite3?
>> 
>> Doh! Success, I had stopped the py-django build when I saw it
>> building py-sqlite2, but seems okay with the py-sqlite3 installed.
>> Thanks!
>
>OK, can you now deinstall py-sqlite3 again and apply the attached patch?
>
>Joerg

>$NetBSD$
>
>--- db/backends/sqlite3/base.py.orig   2009-04-11 22:01:24.000000000 +0200
>+++ 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:


because that path is only in py-django and it doesn't seem to help make sqlite3 
work
and requires bmake patch to generate the final directory... I'm not sure what
you are trying to do. Maybe I'm not invoking as you expected, but don't see that
it does anything.

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? and expected result. I'm a little
confused about patching that file. You want it after make clean patch of both
packages and before make install py-django?

-g


Home | Main Index | Thread Index | Old Index