Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1850 (closed defect: fixed)

Opened 11 years ago

Last modified 10 years ago

2.0b5 broken with py2.4 Was:Quickstarted project requires pysqlite

Reported by: chrismiles Owned by: anonymous
Priority: highest Milestone: 2.0b6
Component: Installation Version: trunk
Severity: major Keywords: sprint
Cc:

Description

A quickstarted tg2 project is configured to use sqlite. However, pysqlite2 is not marked as a dependency of any tg2 package and so is not automatically installed. A quickstarted project will not run if the user hasn't installed pysqlite2 themselves.

If we expect tg2 quickstarted projects to work out-of-the-box then we need to make sure that pysqlite2 is installed along with tg2.

Change History

comment:1 Changed 11 years ago by mramm

  • Milestone changed from 2.0 to 2.0-preview-1

comment:2 Changed 11 years ago by mramm

The dependencies for quickstarted projects should be added to tg.devtools not to tg proper.

We should also make sure that we're injecting all the important dependencies into the quickstarted project's setup.py.

comment:3 Changed 11 years ago by mramm

One question, I have is how to do this effectively since sqlite is in 2.5 by default, and has different names between 2.4 and 2.5....

comment:4 Changed 11 years ago by mramm

  • Milestone changed from 2.0-preview-1 to 2.0-preview-2

comment:5 Changed 11 years ago by mramm

  • Milestone changed from 2.0-preview-2 to 2.0

comment:6 Changed 11 years ago by mramm

  • Keywords sprint added

comment:7 Changed 11 years ago by mramm

  • Summary changed from Quickstarted project requires pysqlite to Quickstarted project requires pysqlit

comment:8 Changed 11 years ago by Chris Arndt

  • Summary changed from Quickstarted project requires pysqlit to Quickstarted project requires pysqlite

Look at how it is done in the TG 1.x setup.py file.

comment:9 Changed 10 years ago by lszyba1

So i finally figure out that in python 2.4 you need to do: easy_install pysqlite even do the error says cannot import pysqlite2

comment:10 Changed 10 years ago by jorge.vargas

I'm -1 on this, all tutorials say that you should install pysqlite (and anyone semi-familiar with python should know it isn't a build in module in <2.4.

comment:11 follow-up: ↓ 13 Changed 10 years ago by lszyba1

Not sure if we are on the same page. What I'm saying is that import error is: "cannot find module pysqlite2", but to fix it you install pysqlite, correct? I've tried installing pysqlite2 but no such package exists.

comment:12 Changed 10 years ago by mramm

  • Milestone changed from 2.0 to 2.0b4

comment:13 in reply to: ↑ 11 Changed 10 years ago by jorge.vargas

Replying to lszyba1:

Not sure if we are on the same page. What I'm saying is that import error is: "cannot find module pysqlite2", but to fix it you install pysqlite, correct? I've tried installing pysqlite2 but no such package exists.

lszyba1, please use the mailing list for support.

The package is named pysqlite, the non-py25 module is named pysqlite2, the py25 module is named sqlite. All the name changes are due to the upstream package so there is nothing we can do about it.

comment:14 Changed 10 years ago by Chris Arndt

Well, could always put something like

install_requires = [...]

if sys.version_info[:2] <= (2,4):
   install_requires += ["pysqlite"]


setup(
   ...
   install_requires=install_requires,
   ...
)

into the setup.py of a quickstarted project.

comment:15 Changed 10 years ago by mramm

  • Status changed from new to closed
  • Resolution set to fixed

fixed in #6215 -- thanks Chris!

comment:16 Changed 10 years ago by jorge.vargas

  • Status changed from closed to reopened
  • Resolution fixed deleted

I tested this and it doesn't works on py2.4

comment:17 Changed 10 years ago by jorge.vargas

This is the traceback from yuhl from IRC. I manage to get the same error.  http://pastebin.com/d43e6664

comment:18 Changed 10 years ago by jorge.vargas

  • Milestone changed from 2.0b5 to 2.0b6
  • Severity changed from normal to major
  • Summary changed from Quickstarted project requires pysqlite to py2.4 broken with 2.0b5 Was:Quickstarted project requires pysqlite

I believe I found the cause of the bug according to  the build from source guide you need a C compiler and sqlite but that is failing with py2.4 and latest versions

in ubuntu 8.10, in a fresh virtual machine

sudo apt-get install sqlite3 buildessencials
~/tg2.0b5-py24$ easy_install -i http://www.turbogears.org/2.0/downloads/current/index tg.devtools

Therefore as I said above I think we should skip this dependency and revert r6215 and document the fact, after all the goal of adding it to setup.py is to avoid the external step that is needed anyway. The problem here is analogical to mysqldb.

comment:19 Changed 10 years ago by jorge.vargas

  • Summary changed from py2.4 broken with 2.0b5 Was:Quickstarted project requires pysqlite to 2.0b5 broken with py2.4 Was:Quickstarted project requires pysqlite

comment:20 Changed 10 years ago by mramm

Ok, works for me. But we should mention the fact that quickstarted projects assume sqlite is there on the download/install page.

comment:21 Changed 10 years ago by mramm

  • Priority changed from normal to highest

comment:22 Changed 10 years ago by mramm

  • Status changed from reopened to closed
  • Resolution set to fixed

docs updated in r6271, and requirement reverted in r6270

Note: See TracTickets for help on using tickets.