SliTaz SliTaz Forum

You are not logged in.

#1 2012-06-05 12:01:14

pipein
Member
Registered: 2012-05-30
Posts: 46

incomplete sqlite3 module in python-2.7.2 package (Slitaz 4.0)

Hi,

It seems that the python 2.7.2 package for SliTaz 4.0 (and Cooking as at 5-June-2012) is missing the _sqlite3.so file from /usr/lib/python2.7/sqlite3

This could be the result of compiling python without the sqlite3-dev package installed for the sqlite3.h header file.

The python package receipt for SliTaz 4.0 lists sqlite in the DEPENDS line, but does not list sqlite-dev in the BUILD_DEPENDS line.  i.e.

[c]# SliTaz package receipt.

PACKAGE="python"

VERSION="2.7.2"

...

DEPENDS="openssl bzlib readline sqlite zlib ncursesw"

BUILD_DEPENDS="openssl-dev bzip2-dev readline-dev ncursesw-dev"

...[/c]

Same thing in the python package receipt from Cooking (12-April-2012)

[c]# SliTaz package receipt.

PACKAGE="python"

VERSION="2.7.2"

...

DEPENDS="openssl bzlib readline sqlite zlib ncursesw"

BUILD_DEPENDS="openssl-dev bzip2-dev readline-dev ncursesw-dev tcl-dev \

tk-dev"

...[/c]

The latest Cook log for the python package (12-April-2012) says at the end of the compile stage:

[c]...

Python build finished, but the necessary bits to build these modules were not found:

_bsddb             _sqlite3           bsddb185

dbm                sunaudiodev

...[/c]

Perhaps this could explain the python error ImportError: No module named _sqlite3 people have encountered.

Offline

#2 2012-06-05 15:12:40

pipein
Member
Registered: 2012-05-30
Posts: 46

Re: incomplete sqlite3 module in python-2.7.2 package (Slitaz 4.0)

I added sqlite-dev to the BUILD_DEPENDS line in a copy of the python package receipt, then I used that receipt to cook a new python package locally on my machine.  The resulting package has identical files to the official package, plus this additional file:

[c]/usr/lib/python2.7/lib-dynload/_sqlite3.so[/c]

(so the _sqlite3.so file doesn't belong in /usr/lib/python2.7/sqlite3/ as suggested in the previous post)

It seems to be working fine so far and there are no more occurences of ImportError: No module named _sqlite3 here.

Offline

#3 2012-06-05 15:26:09

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: incomplete sqlite3 module in python-2.7.2 package (Slitaz 4.0)

Providing the package would be nice - alternatively just providing the missing file might be smaller and an easier fix.

Offline

#4 2012-06-05 16:44:50

bxscle
Member
Registered: 2012-05-16
Posts: 3

Re: incomplete sqlite3 module in python-2.7.2 package (Slitaz 4.0)

@pipein & @Trixar_za: can you post link or attach that new package python2.7 or sqlite3.so file, please?

Offline

#5 2012-06-05 17:05:41

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: incomplete sqlite3 module in python-2.7.2 package (Slitaz 4.0)

I found one more missing build dependency that is needed: db-dev - In the end you're just left with the last 2, dbm and sunaudiodev, not being built. Incidentally, I compiled from scratch too, so I have a working version that includes tk/tcl support too.

Offline

#6 2012-06-05 17:26:51

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: incomplete sqlite3 module in python-2.7.2 package (Slitaz 4.0)

Yet another untested package that may or may not work: http://www.trixarian.net/downloads/python-fix.tazpkg - Enjoy wink

Offline

#7 2012-06-05 18:00:35

pipein
Member
Registered: 2012-05-30
Posts: 46

Re: incomplete sqlite3 module in python-2.7.2 package (Slitaz 4.0)

@Trixar_za

Good work on the other missing dependency.  I half-looked at other dependencies too but I was really only after sqlite so far (and am trying to keep everything small without breaking anything... insert feeble excuse #212 here...). 

Really, SliTaz is fantastic for its size (actually, regardless of its size) and we all should be thankful of the effort that has gone in.

I thought posting a package (the very first one I'd Cooked... great tools!) might not be much help without a better eye cast over it.  I've attached the _sqlite3.so file though and have tested this within an install of the official python-2.7.2.tazpkg from SliTaz 4.0. The testing has been limited to the testall.py suite in the python package, as well as using some python based applications.

The results from testall.py (with and without _sqlite3.so) are at the bottom of this post for comparison.  Only difference is +1 on the "tests OK" and -1 on "tests skipped" as sqlite now passes.

@bxscle

the _sqlite3.so file is attached and should be located like this:

/usr/lib/python2.7/lib-dynload/_sqlite3.so

I have only tested this in SliTaz 4.0 with the standard python-2.7.2.tazpkg.

testall.py results

standard python-2.7.2.tazpkg

[c]343 tests OK.

2 tests failed:

    test_argparse test_httpservers

42 tests skipped:

    test_aepack test_al test_applesingle test_bsddb test_bsddb185

    test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk

    test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses

    test_dbm test_gdb test_gdbm test_gl test_imgfile test_kqueue

    test_linuxaudiodev test_macos test_macostools test_msilib

    test_ossaudiodev test_py3kwarn test_scriptpackages test_smtpnet

    test_socketserver test_sqlite test_startfile test_sunaudiodev

    test_tcl test_timeout test_tk test_ttk_guionly test_ttk_textonly

    test_urllib2net test_urllibnet test_winreg test_winsound

    test_zipfile64

9 skips unexpected on linux2:

    test_bsddb test_bsddb3 test_dbm test_gdb test_gdbm test_tcl

    test_tk test_ttk_guionly test_ttk_textonly[/c]

testall.py results

standard python-2.7.2.tazpkg

[c]344 tests OK.

2 tests failed:

    test_argparse test_httpservers

41 tests skipped:

    test_aepack test_al test_applesingle test_bsddb test_bsddb185

    test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk

    test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses

    test_dbm test_gdb test_gdbm test_gl test_imgfile test_kqueue

    test_linuxaudiodev test_macos test_macostools test_msilib

    test_ossaudiodev test_py3kwarn test_scriptpackages test_smtpnet

    test_socketserver test_startfile test_sunaudiodev test_tcl

    test_timeout test_tk test_ttk_guionly test_ttk_textonly

    test_urllib2net test_urllibnet test_winreg test_winsound

    test_zipfile64

9 skips unexpected on linux2:

    test_bsddb test_bsddb3 test_dbm test_gdb test_gdbm test_tcl

    test_tk test_ttk_guionly test_ttk_textonly[/c]

Offline

#8 2012-06-05 18:08:34

pipein
Member
Registered: 2012-05-30
Posts: 46

Re: incomplete sqlite3 module in python-2.7.2 package (Slitaz 4.0)

@self - oops

of course in the previous post the heading for the second set of testall.py result should say:

testall.py results

standard python-2.7.2.tazpkg PLUS _sqlite3.so

Offline

#9 2012-06-06 05:42:16

bxscle
Member
Registered: 2012-05-16
Posts: 3

Re: incomplete sqlite3 module in python-2.7.2 package (Slitaz 4.0)

Great work guys! Big thank you ... bleachbit is working now ... big_smile

Offline

#10 2012-06-06 07:42:47

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: incomplete sqlite3 module in python-2.7.2 package (Slitaz 4.0)

I'll take that as confirmation that the _sqlite3.so part of http://www.trixarian.net/downloads/python-fix.tazpkg works. Now somebody just has to confirm that the Tk interface works too wink Possibly by trying PySolFC, which is a awesome Card Game collection that runs out of the box on any system with Python installed tongue

Offline

#11 2012-06-06 08:31:38

pipein
Member
Registered: 2012-05-30
Posts: 46

Re: incomplete sqlite3 module in python-2.7.2 package (Slitaz 4.0)

@Trixar_za

Didn't initially realise your package was a "delta" only.  Completely obvious now.

Haven't tested it apart from running the testall.py suite against it, (merged with standard python package).

Sqlite passed  (214 tests OK).

Tcl passed  (20 tests OK).

tk passed  (3 tests OK).

ttk_textonly passed  (13 test OK).

ttk_guionly  (57 tests OK, 1 failure)  - failure on test_widgets.py

The lib-tk tests come from the standard python package, not your package, so I don't know if thats related.

Also, in the receipt, did you mean to include sqlite3 in the DEPENDS line... instead of the standard sqlite tazpkg?

Offline

#12 2012-06-06 08:34:21

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: incomplete sqlite3 module in python-2.7.2 package (Slitaz 4.0)

Actually lib-tk does come with my package, but I may have stripped the tests. And yeah, I meant to make to the dependency sqlite and not sqlite3. I'll fix it now

Offline

#13 2012-06-06 08:38:16

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: incomplete sqlite3 module in python-2.7.2 package (Slitaz 4.0)

The dependency error in http://www.trixarian.net/downloads/python-fix.tazpkg should be fixed now tongue

Offline

#14 2012-06-06 08:38:37

pipein
Member
Registered: 2012-05-30
Posts: 46

Re: incomplete sqlite3 module in python-2.7.2 package (Slitaz 4.0)

@Trixar_za

you have stripped the tests from lib-tk in your package.

Offline

#15 2012-06-06 08:41:32

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: incomplete sqlite3 module in python-2.7.2 package (Slitaz 4.0)

The tests folder within lib-tk. By default this is stripped in the SliTaz package for Python to save space. It's not really needed by average users because it's mostly just examples.

BTW, you can get PySolFC @ http://pysolfc.sourceforge.net/ - which should a more extensive test.

Offline

#16 2012-06-06 09:00:52

pipein
Member
Registered: 2012-05-30
Posts: 46

Re: incomplete sqlite3 module in python-2.7.2 package (Slitaz 4.0)

Trizar_za Ok. Then test results are as stated for the moment.  I'll have to make some space (order take-away/beer) before I can look into PySoIFC... and "more than 1000 solitaire card games"... wow, I could be here for a while!

Will you look after updating the receipt so that these changes get cooked into the next version of the python tazpkg?

Offline

#17 2012-06-06 09:02:25

pipein
Member
Registered: 2012-05-30
Posts: 46

Re: incomplete sqlite3 module in python-2.7.2 package (Slitaz 4.0)

sorry about name typo Trixar_za

Offline

#18 2012-06-06 09:15:15

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: incomplete sqlite3 module in python-2.7.2 package (Slitaz 4.0)

I'll try. I may have dev access, but I'm still kind of new to using hg tongue

Offline

#19 2012-06-06 09:24:06

totoetsasoeur
Moderator
Registered: 2011-03-29
Posts: 247

Re: incomplete sqlite3 module in python-2.7.2 package (Slitaz 4.0)

Bellard is listening to you guys. ;-)

http://hg.slitaz.org/wok-stable/rev/fbe5ef3d3083

Great team! Clap-clap

Offline

#20 2012-06-06 09:26:08

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: incomplete sqlite3 module in python-2.7.2 package (Slitaz 4.0)

Lol, I see so. Saves me some effort wink (and another week or two of not bothering to learn hg tongue)

Offline

#21 2012-06-06 10:02:55

pipein
Member
Registered: 2012-05-30
Posts: 46

Re: incomplete sqlite3 module in python-2.7.2 package (Slitaz 4.0)

PySolFC looking good.  Tried various games, demo, about boxes, menu items, stats, saving/opening files and other controls, changing tiles and card decks, as well as playing etc.  No errors in that regard.  2 errors re: wav files, but probably environmental (me).

Thanks for the speedy-by-osmosis receipt updates.

Noticed the receipt adds db-dev to the BUILD_DEPENDS as well.  Just for the record, I don't think any testing included it so far, at least not intentionally.

This can be marked as Resolved then if you agree - fix exists for Slitaz 4.0 in this thread and future versions should be ok based on new recipt.

Can Resolve the loose Bleachbit topic too maybe - confirmed working in this topic by bxscle, but not by topic creator. Tagged with _sqlite or _sqlite3

PyNeighborhood topic re: _sqlite3 error needs topic creator to retest.

Offline

#22 2012-06-06 10:32:10

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: incomplete sqlite3 module in python-2.7.2 package (Slitaz 4.0)

Well, I use my own custom package of BleachBit, mostly because I added a shortcut to run Bleachbit as root using gksu. I can confirm it works. So does Blueman if you run it as root and have the bluetooth module (modprobe bluetooth) loaded and bluetoothd running.

As for PySolFC - yeah, it just needs a codec or package that can play wave files to work. I have VLC, mplayer and xine installed, so it probably came with that.

I'll mark the unresolved topics as resolved and add a link to here.

Offline

#23 2012-06-07 16:13:48

pipein
Member
Registered: 2012-05-30
Posts: 46

Re: incomplete sqlite3 module in python-2.7.2 package (Slitaz 4.0)

The official python package for SliTaz 4.0 has been rebuilt (6-June-2012) by the automatic process and it now includes the fixes discussed above.

Offline

#24 2012-06-07 18:11:44

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: incomplete sqlite3 module in python-2.7.2 package (Slitaz 4.0)

Let's just hope people remember to tazpkg recharge and tazpkg up to get it wink

Offline

#25 2012-06-07 18:48:53

pipein
Member
Registered: 2012-05-30
Posts: 46

Re: incomplete sqlite3 module in python-2.7.2 package (Slitaz 4.0)

@Trixar_za

Exactly.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.019 seconds, 8 queries executed - Memory usage: 1.59 MiB (Peak: 1.77 MiB) ]