All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] setup.py: install prserv too
@ 2012-01-15 21:03 Martin Jansa
  2012-01-15 21:03 ` [PATCH 2/2] prserv: fix import of sqlite3 Martin Jansa
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Jansa @ 2012-01-15 21:03 UTC (permalink / raw)
  To: bitbake-devel

* otherwise cooker fails:
  Traceback (most recent call last):
    File /usr/bin/bitbake, line 39, in <module>
      from bb import cooker
    File /usr/lib64/python2.7/site-packages/bb/cooker.py, line 39, in <module>
      import prserv.serv
  ImportError: No module named prserv.serv

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 setup.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/setup.py b/setup.py
index 038dd87..7921811 100755
--- a/setup.py
+++ b/setup.py
@@ -54,9 +54,9 @@ setup(name='bitbake',
       requires = ["ply", "progressbar"],
       package_dir = {"": "lib"},
       packages = ["bb.server", "bb.parse.parse_py", "bb.parse", "bb.fetch",
-                  "bb.fetch2", "bb.ui.crumbs", "bb.ui", "bb.pysh", "bb"],
+                  "bb.fetch2", "bb.ui.crumbs", "bb.ui", "bb.pysh", "bb", "prserv"],
       py_modules = ["codegen"],
-      scripts = ["bin/bitbake", "bin/bitbake-layers", "bin/bitbake-diffsigs"],
+      scripts = ["bin/bitbake", "bin/bitbake-layers", "bin/bitbake-diffsigs", "bin/bitbake-prserv"],
       data_files = [("share/bitbake", glob("conf/*") + glob("classes/*")),
                   ("share/doc/bitbake-%s/manual" % __version__, glob("doc/manual/html/*"))],
       cmdclass = {
-- 
1.7.8.3




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] prserv: fix import of sqlite3
  2012-01-15 21:03 [PATCH 1/2] setup.py: install prserv too Martin Jansa
@ 2012-01-15 21:03 ` Martin Jansa
  2012-01-20 16:44   ` Richard Purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Jansa @ 2012-01-15 21:03 UTC (permalink / raw)
  To: bitbake-devel

* this is used in all other bitbake parts where sqlite3 is used, don't
  know why it wasn't used here, but it fails e.g. on Gentoo
  Traceback (most recent call last):
    File "bin/bitbake", line 39, in <module>
      from bb import cooker
    File "lib/bb/cooker.py", line 39, in <module>
      import prserv.serv
    File "lib/prserv/serv.py", line 4, in <module>
      import xmlrpclib,sqlite3
  ImportError: No module named sqlite3

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 lib/prserv/serv.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/lib/prserv/serv.py b/lib/prserv/serv.py
index a759fa7..fa437f9 100644
--- a/lib/prserv/serv.py
+++ b/lib/prserv/serv.py
@@ -1,7 +1,12 @@
 import os,sys,logging
 import signal, time, atexit, threading
 from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler
-import xmlrpclib,sqlite3
+import xmlrpclib
+
+try:
+    import sqlite3
+except ImportError:
+    from pysqlite2 import dbapi2 as sqlite3
 
 import bb.server.xmlrpc
 import prserv
-- 
1.7.8.3




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] prserv: fix import of sqlite3
  2012-01-15 21:03 ` [PATCH 2/2] prserv: fix import of sqlite3 Martin Jansa
@ 2012-01-20 16:44   ` Richard Purdie
  2012-01-20 17:01     ` Martin Jansa
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2012-01-20 16:44 UTC (permalink / raw)
  To: Martin Jansa; +Cc: bitbake-devel

On Sun, 2012-01-15 at 22:03 +0100, Martin Jansa wrote:
> * this is used in all other bitbake parts where sqlite3 is used, don't
>   know why it wasn't used here, but it fails e.g. on Gentoo
>   Traceback (most recent call last):
>     File "bin/bitbake", line 39, in <module>
>       from bb import cooker
>     File "lib/bb/cooker.py", line 39, in <module>
>       import prserv.serv
>     File "lib/prserv/serv.py", line 4, in <module>
>       import xmlrpclib,sqlite3
>   ImportError: No module named sqlite3
> 
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  lib/prserv/serv.py |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)

Merged to master along with 1/2.

Why this is needed I'm not sure since I thought sqlite3 was included in
python 2.6 onwards. Since you're running into it and it doesn't hurt
anything I've merged it though.

Cheers,

Richard




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] prserv: fix import of sqlite3
  2012-01-20 16:44   ` Richard Purdie
@ 2012-01-20 17:01     ` Martin Jansa
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Jansa @ 2012-01-20 17:01 UTC (permalink / raw)
  To: Richard Purdie; +Cc: bitbake-devel

[-- Attachment #1: Type: text/plain, Size: 1538 bytes --]

On Fri, Jan 20, 2012 at 04:44:47PM +0000, Richard Purdie wrote:
> On Sun, 2012-01-15 at 22:03 +0100, Martin Jansa wrote:
> > * this is used in all other bitbake parts where sqlite3 is used, don't
> >   know why it wasn't used here, but it fails e.g. on Gentoo
> >   Traceback (most recent call last):
> >     File "bin/bitbake", line 39, in <module>
> >       from bb import cooker
> >     File "lib/bb/cooker.py", line 39, in <module>
> >       import prserv.serv
> >     File "lib/prserv/serv.py", line 4, in <module>
> >       import xmlrpclib,sqlite3
> >   ImportError: No module named sqlite3
> > 
> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > ---
> >  lib/prserv/serv.py |    7 ++++++-
> >  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> Merged to master along with 1/2.
> 
> Why this is needed I'm not sure since I thought sqlite3 was included in
> python 2.6 onwards. Since you're running into it and it doesn't hurt
> anything I've merged it though.

In gentoo there is USE flag for sqlite support which is off by default,
so it's easy to get even newer python like 2.7 or 3* without sqlite
enabled by default and extra package dev-python/pysqlite providing
alternative.

I guess correct fix would be to change bitbake .ebuild to depend on
python with sqlite USE flag enabled, but as it was catched and fixed in
other places in bitbake code I've added it here too.

Cheers,

> 
> Cheers,
> 
> Richard
> 

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-01-20 17:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-15 21:03 [PATCH 1/2] setup.py: install prserv too Martin Jansa
2012-01-15 21:03 ` [PATCH 2/2] prserv: fix import of sqlite3 Martin Jansa
2012-01-20 16:44   ` Richard Purdie
2012-01-20 17:01     ` Martin Jansa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.