lundi 12 octobre 2015

pysqlite will not work with fts3/fts4 on windows

I've compiled pysqlite 2.7.0 (2.8.1 seems to have compilation issues with Python 2.7) on Linux and Mac succesfully and was able to use fts (full text search), however using the exact same compilation steps on windows results in having pysqlite compiled but fts3 and fts4 will not work.

Compilation steps:

  1. Checked out pysqlite
  2. Extracted sqlite algamation to src
  3. Extracted sqlite3.def to src (from precompiled sqlite for windows, linux and osx don't need this)
  4. ran setup.py install, also tried variations, eg. setup.py build_ext install and setup.py build_static install
  5. Invoked python shell and ran the following:

    from pysqlite2 import dbapi2 as sqlite3
    con = sqlite3.connect(":memory:")
    con.execute("create virtual table recipe using fts3(name, ingredients)")
    
    

On Linux and Mac this works, on Windows it fails with no such module: fts3.

What extra step am I missing on Windows? Unfortunately pysqlite provides zero documentation for building pysqlite (or I am simply unable to find it).

Aucun commentaire:

Enregistrer un commentaire