[PythonCE] SQLite for PythonCE
swida at aragorn.pb.bialystok.pl
Thu Sep 2 21:16:08 CEST 2004
On Thu, 2 Sep 2004 17:25:54 +0300, Paul Sokolovsky wrote
> Hello Oskar,
> Wednesday, September 1, 2004, 7:38:29 PM, you wrote:
> OS> Hi,
> OS> First of all thanks for your great work and bringing Python to WINCE!
> OS> And my message:
> OS> Using source tree from David Kashtan page, I've managed to
> compile PySQLite OS> module for PythonCE. I've run some simply tests
> and it seems it is working, OS> but anyone interested - please check
> it. OS> Precompiled binaries are available at: OS>
I think Huy (<huymail at swiftdsl.com.au>) gave a beautiful tutorial in last
post, I've done it quite magically, but I'll try to explain - forgive me my
English - I'm not a native speaker.
This is last version of pysqlite (0.5.1 if I remember) and no patches are
required. I've made a makefiles in PythonCE tree under "External-Components"
directory, similar to PyWin32 structure.
Makefiles are available at:
Compiling is rather simple:
1. Get PySQLite sources and unpack them in some directory,
2. Copy my makefiles into PythonCE tree (say in External-Components\pysqlite )
3. Modify main makefile in PCBuild\WinCE adding new external component - look
at PyWin32 for an example
4. Define PYSQLITEROOT variable in wcearm.bat(wcearm300.bat) pointing to
pysqlite sources directory
5. Run wcearm.bat
6. Run "nmake all"
Now you have "pysqlite.pyd" in your binaries and you can add it to your
PythonCE distribution (actually this file should be named "_sqlite.pyd" - but
these makefiles produce "pysqlite.pyd" - this was my first idea and I forgot
to change makefiles, but you can change them or simply rename "pysqlite.pyd"
For distribution you also need files from "sqlite" directory under pysqlite
sources - there are two files "__init__.py" and "main.py" just copy them to
your distribution along with directory.
Additionally need copy of sqlite DLL library, which can be compiled from
sources available at: http://sqlite-wince.sourceforge.net/
When you have installed all the files, you can use "import sqlite" directive
in your scripts.
NOTE: all binaries available at my site are for Pocket PC 2002 and made
by eVC 3.0, but I suppose the procedure for Pocket PC 2003 will be the same.
More information about the PythonCE