OoO Peu avant le début de l'après-midi du mercredi 27 août 2008, vers 13:12, Josselin Mouette <joss@debian.org> disait : >> > import sys,new,os; p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('recaptcha',)); ie = os.path.exists(os.path.join(p,'__init__.py')); m = not ie and sys.modules.setdefault('recaptcha',new.module('recaptcha')); mp = (m or []) and m.__dict__.setdefault('__path__',[]); (p not in mp) and mp.append(p) >> > /var/lib/python-support/python2.5/import sys,new,os; p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('recaptcha',)); ie = os.path.exists(os.path.join(p,'__init__.py')); m = not ie and sys.modules.setdefault('recaptcha',new.module('recaptcha')); mp = (m or []) and m.__dict__.setdefault('__path__',[]); (p not in mp) and mp.append(p) > This one should be nominated for the OMGWTF python package of the day. It is generated by setuptools in fact. And a missing new line render it unusable. >> > This snippet can be found in recaptcha_client-1.0.2-py2.5-nspkg.pth that >> > is generated at compile time. I don't know why this is >> > generated. Moreover, this file seems a bit useless. What is the cleanest >> > way to get rid of it and all the egg stuff? >> >> I am not sure what was the precise action that fixed this thing, but my >> last commit was able to get rid of the problem. If someone has some >> explanations, I will welcome them. >> >> BTW, while searching a bit about this problem, I have found this bug: >> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=475440 >> >> Is it a bug in python-support? > This looks like just another design flaw in setuptools. > Please, think of the kittens. Don’t use setuptools. Well, people use setuptools and it does not work with python-support. What should we do? Move the egg by hand in a more correct location? Or maybe python-support could put it by itself in a correct location? -- BOFH excuse #368: Failure to adjust for daylight savings time.
Attachment:
pgpok0M33uIO_.pgp
Description: PGP signature