mobiusklein / pysqlite

A fork of pysqlite to support an updated version of SQLite3.9 for Python 2.7
zlib License
2 stars 0 forks source link

Package rename causing problems using the library #1

Open Vultaire opened 8 years ago

Vultaire commented 8 years ago

While I can build using Python 2.7.6+ using this repo (yay!), it seems that the package name was renamed from pysqlite2 to pysqlite. This causes problems as code within the module expects the pysqlite2 name.

C:\Users\pdgoins\code\meh\pysqlite>python -c "from pysqlite import dbapi2 as sqlite3"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Python27-64\lib\site-packages\pysqlite-2.8.1-py2.7-win-amd64.egg\pysqlite\dbapi2.py", line 28, in <module>
    from pysqlite2._sqlite import *
ImportError: No module named pysqlite2._sqlite
mobiusklein commented 8 years ago

I must have thought I had changed the name of the package while doing some testing. I think I've fixed it. Let me know if it fails. I was confused by the package name being pysqlite but the module imported being pysqlite2

Vultaire commented 8 years ago

Getting closer, but _sqlite.py and _sqlite.pyd are still going into pysqlite rather than pysqlite2.

Vultaire commented 8 years ago

The above being said - things seem to work after copying those files into the pysqlite2 directory.

C:\Users\pdgoins\code\meh\pysqlite>python -c "from pysqlite2 import dbapi2 as sqlite3; print (sqlite3.version, sqlite3.sqlite_version)"
('2.8.1', '3.9.2')
mobiusklein commented 8 years ago

It was another suffix missing in the setup script, repeated for specifying the extension module. I've fixed it in the latest commit.