On 12/31/05, Phillip J. Eby <[EMAIL PROTECTED]> wrote:
> At 10:04 AM 12/30/2005 -0500, Kevin Dangoor wrote:
> >The "tg-admin sql" command uses sqlobject which, in turn uses egg
> >metadata. Something I just noticed is that these commands are no
> >longer working on a project i have called "Wiki-20". They *used* to
> >work. Now they get a "DistributionNotFound" error for Wiki-20.
> >...
> >I had also tried to just do "pkg_resources.require("WIki-20")" from
> >the Python shell, but that didn't work either. This is new behavior
> >between a8 and a9. Let me know if there's anything else I can tell you
> >about the problem...> Otherwise, recent versions of setuptools > will think the '-' is the separator between the project name and version > number, leading to problems like the ones described by Kevin above. There is a standard regular expression that can be used to split out N-V which is a pretty common thing in deb/rpm. (ie. python-foo). I use the following in some py scripts to manage these pairings for my rpm repo: '(?i)(.*)-([^-]*)-(([^-]*)\.([^-]*)\.%s)(.*)' Which is N-V-R.dist.repo.ext The form that you might want would be: '(.*)-([^-]*)' Name-Version This would allow Name to have -. Obviously, - cannot be used in Version. Also, two side notes, 1) it's kind of annoying that package names interchange between `-' and `_', one in the file name of the archive and one used in the extracted directory name. 2) I've also see the use of `_' in versioning, such as json.py. I also highly discourage that practice. -- -jeff _______________________________________________ Distutils-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/distutils-sig
