Hello Python Team, Is this problem Debian specific? The package is installing its modules under /usr/lib/python2.6/dist-packages, which as Forest mentions, is not handled by pydoc currently. Ritesh -------- Original Message --------
Hi Ritesh, Looks like this is generated in pydoc.py from the standard library: def getdocloc(self, object): """Return the location of module docs or None""" try: file = inspect.getabsfile(object) except TypeError: file = '(built-in)' docloc = os.environ.get("PYTHONDOCS", "http://docs.python.org/library") docdir = '/usr/share/doc/python%s/html/library' % sys.version[:3] if not os.environ.has_key("PYTHONDOCS") and os.path.isdir(docdir): docloc = docdir basedir = os.path.join(sys.exec_prefix, "lib", "python"+sys.version[0:3]) if (isinstance(object, type(os)) and (object.__name__ in ('errno', 'exceptions', 'gc', 'imp', 'marshal', 'posix', 'signal', 'sys', 'thread', 'zipimport') or (file.startswith(basedir) and not file.startswith(os.path.join(basedir, 'site-packages'))))): if docloc.startswith("http://"): docloc = "%s/%s" % (docloc.rstrip("/"), object.__name__) else: docloc = os.path.join(docloc, object.__name__ + ".html") else: docloc = None return docloc I don't see it because I have inotifyx installed in my home directory at the moment and that affects the return value of this function. I think this is a bug in Debian's Python package. That function checks for the "site-packages" directory, but it should also check for the "dist-packages" directory since that's what Debian uses. What do you think? Thanks, Forest -- Forest Bond http://www.alittletooquiet.net http://www.rapidrollout.com On Wed, Aug 10, 2011 at 07:32:25PM +0530, Ritesh Raj Sarraf wrote: > On 08/10/2011 07:07 PM, Forest Bond wrote: > > I am midway through inotifyx packaging and have some questions for you. > > > > In the previous releases, I was using epydoc to generate some docs for > > inotifyx.py. Now that that is gone, I'm going to drop it. > > Okay. I don't know epydoc at all, but I would think you'd still be able to > > generate documentation with the new code organization. > epydoc can generate documentation off of a python .py module. That was > something I added extra. Since inotifyx.py is not shipped anymore, I'll > just drop that from my build config. > >> When you do a help(inotifyx), it links: > >> > >> MODULE DOCS > >> http://docs.python.org/library/inotifyx > >> > >> for documentation. This is incorrect and we should fix this? > > Curious, I don't see this. > > > > Did you download the tarball from PyPI? There was a bad tarball available there > > for a few days, which I've since removed. This was an unexpected side effect of > > publishing the code on PyPI instead of only on Launchpad. Can you check if > > using the official release tarball fixes things? > Nope. I downloaded the tarball from launchpad today. Built the package > and during testing it, I noticed. > I've attached a screenshot of the problem. > > -- > Ritesh Raj Sarraf > RESEARCHUT - http://www.researchut.com > "Necessity is the mother of invention." |
Attachment:
signature.asc
Description: OpenPGP digital signature