Edgewall Software

Changes between Version 65 and Version 66 of PySqlite


Ignore:
Timestamp:
Dec 31, 2015, 7:34:30 PM (23 months ago)
Author:
Christian Boos
Comment:

#BuildingonWindows is not completely straightforward, add some tips

Legend:

Unmodified
Added
Removed
Modified
  • PySqlite

    v65 v66  
    8585}}}
    8686
     87===== Building on Windows
     88[https://github.com/ghaering/pysqlite/issues/89 pysqlite issue 89] lists the trouble you'd get when trying to build PySqlite on Windows. Either follow the advice found there, or use the somewhat simpler steps described below.
     89
     90First you need to obtain the SQLite amalgamation source files.
     91The simplest way to do this is to use the amalgamation .zip you'll find in http://www.sqlite.org/download.html, but that will only work if you want the latest released version of SQLite, which is the typical use case.
     92
     93If you need another version, you can get it from the SQLite source repository:
     94 1. retrieve the code from [http://www.sqlite.org/getthecode.html the fossil repository]
     95 2. prepare the amalgamation source, as explained in [http://www.sqlite.org/amalgamation.html#amalgbuild Building The Amalgamation From Canonical Source Code]
     96
     97At this point you have the `sqlite3.h` and `sqlite3.c` source files.
     98
     991. Extract the .tar.gz distribution of PySqlite, or clone the repository, to a `pysqlite` directory
     1002. In `pysqlite`, create a subdirectory named "internal"
     1013. Copy the amalgamation files `sqlite3.h` and `sqlite3.c` into that directory
     1024. Change directory to `pysqlite/internal`, build the amalgamation static library (assuming you have the shell set up correctly to use `cl` and `lib`):
     103   {{{#!shell
     104   cl -c sqlite3.c
     105   lib sqlite3.obj -out:sqlite3.lib
     106   }}}
     1075. Now go back to the `pysqlite` directory and build the standard way: `python setup.py install`: due to a bug explained in the issue 89, the "internal" directory is present in both the include path and the library path... Crude but it works ;-)
     108
     109
    87110== Upgrading SQLite
    88111