After installing the BitTorrent-bencode package, either via easy_install BitTorrent-bencode
or pip install BitTorrent-bencode
, or by downloading the tarball and installing that via easy_install $tarball
, I discover that /usr/local/lib/python2.6/dist-packages/BitTorrent_bencode-5.0.8-py2.6.egg/
contains EGG-INFO/
and test/
directories. Although both of these subdirectories contain files, there are no files in the BitTorr*
directory itself. The tarball does contain bencode.py
, which is meant to be the actual source for this package, but it's not installed by either of those utils.
I'm pretty new to all of this so I'm not sure if this is a problem with the package or with what I'm doing. The package was packaged a while ago (2007), so perhaps it's using some deprecated configuration aspect that I need to supply a command-line flag for.
I'm more interested in learning what's wrong with either the package or my procedures than in getting this particular package installed; there is another package called hunnyb that seems to do a decent enough job of decoding bencoded data. Mostly I'd like to know how to deal with such problems in other packages. I'd also like to let the package maintainer know if the package needs updating.
edit
@Andrey Popp explains that the problem is likely with the setup.py file. I guess the only way I can really get an answer to my question is by actually R-ing TFM. However since I likely won't have time to do that thoroughly for a while yet, I've posted the setup.py file here.
A quick browse through the easy_install manual reveals that the function find_modules(), which this module's setup.py makes use of, searches for files named __init__.py
within the package. The source code file in question is named bencode.py
, so perhaps this is the problem: it should be named __init__.py
?
edit 2
Having now learned Python packaging, I gather that the problem is that this module is using setuptools.find_packages
, and has its source at the root of its directory structure, but hasn't passed anything in package_dir
. It would seem to be fairly trivial to fix. However, the author is not reachable by his PyPI contact info. The module's PyPI page lists a "Package Index Owner" as well. I'm not sure what that's supposed to mean, but I did manage to get in touch with that person, who I think is maybe not in a position to maintain the module. In any case, it's still in the same state as when I posted this question back in June.
Given that the module seems to be more or less abandoned, and that there's a suitable replacement for it in hunnyb, I've accepted that @andreypopp's answer is about as good of one as I'm going to get.