title: Spatialite with Python 2 and 3
body: <p>I am attempting to use <code>spatialite</code> with both Python 2 and 3 on Windows 7. </p>
  
  <p>Rather than try to patch <code>pyspatialite</code> for Python 3, I decided to use the <code>load_extension</code> approach with <code>sqlite3</code> Python built-in package, similar to how is done here: <a href="https://stackoverflow.com/q/8590599/2741329">Sqlite load_extension fail for spatialite in Python</a> and here: <a href="https://stackoverflow.com/q/27907818/2741329">Use spatialite extension for SQLite on Windows</a>.</p>
  
  <p>But, on the official (C)Python 2.7 installer, the <code>load_extension</code> was disabled for an issue related to MacOS. This is not with the counterpart for Python 3.4. Furthermore, both installers are built without <code>SQLITE_ENABLE_RTREE=1</code> (that I'd also like to have).</p>
  
  <p>At first, for Python 2.7, a workaround was to build <code>pysqlite</code> tweaking the setup files to have both R*Tree and extensions. This way does not work for Python 3, since it does not seem to be supported by the current <code>setup.py</code>. From my understand, this is because the package moved to the core Python repository: <a href="https://github.com/ghaering/pysqlite/issues/72#issuecomment-94319589" rel="nofollow noreferrer">https://github.com/ghaering/pysqlite/issues/72#issuecomment-94319589</a> </p>
  
  <p>My current solution was to re-build both Python 2.7 and 3.4 with required settings for <code>sqlite3</code> package. It worked, and I was able to load <code>spatialite</code> as an extension and to create R*Tree. </p>
  
  <p>Does it exist an alternative <em>simpler</em> solution? Did somebody find an alternative solution by working on the <code>setup.py</code> of <code>pyspatialite</code> or <code>pysqlite</code>?</p>