On 3/26/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > > i think using entry points to load in external database dialects is a > great idea. > > though the current six core dialects i think i still want to load via > __import__ though since im a big fan of running SA straight out of > the source directory (and therefore thered be no entry points for > those in that case).
For what it's worth it's perfectly possible to use entry points when running the project from its own source directory. I do it all the time, but I'm not sure what is the exact condition for that to work. Simply having in your source directory a directory named anything.egg-info containing an entry_points.txt file seem to be enough. > so probably a check via __import__('sqlalchemy.databases') first, > then an entry point lookup. does that work ? > > > On Mar 26, 2007, at 11:45 AM, Monty Taylor wrote: > > > > > Hey all, > > > > I wanted to check and see if a patch would be considered (before I > > spend > > any time on it) to replace this: > > > > return getattr(__import__('sqlalchemy.databases.%s' % > > self.drivername).databases, self.drivername) > > > > from sqlalchemy.engine.url > > > > with something using the pkg_resources plugin stuff from setuptools? > > > > I ask, because I'm trying to write a new database engine that's a > > fairly > > heavy write. (this is the NDB API thing that doesn't use SQL) I'm not > > touching any code so far that isn't in a single file in the databases > > dir, but there are a couple of us who are trying to work on the > > project > > together. I'd really like to just version control that one file so we > > don't have to branch the whole sqlalchemy source. I also think it > > might > > be nice to be able to distribute a sqlalchemy database engine without > > having to get it committed to the trunk. > > > > HOWEVER - I recognize that no one else might care about either of > > these > > things. I don't think it will be a hard patch or one that will be > > disruptive to the current way of doing things, but I wanted to > > check if > > it would be rejected out of hand before I bothered....? > > > > Thanks! > > Monty > > > > > > > > > > -- Gaƫtan de Menten http://openhex.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---