Problems installing a package from PyPI: root files not installed

After installing the BitTorrent-bencode package, either via easy_install BitTorrent-bencode , or pip install BitTorrent-bencode , or downloading tarball and installing it via easy_install $tarball , I found that /usr/local/lib/python2.6/dist-packages/BitTorrent_bencode-5.0.8-py2.6.egg/ contains the directories EGG-INFO/ and test/ . Although both of these subdirectories contain files, there are no files in the BitTorr* directory BitTorr* . Tarball contains bencode.py , which is intended for the actual source for this package, but it is not installed by any of these utils.

I'm new to this, so I'm not sure if this is a problem with the package or with what I'm doing. The package was packaged some time ago (2007), so maybe it uses some outdated configuration aspect that I need to supply the command line flag.

I'm more interested in learning what is wrong with the package or my procedures than when installing this particular package; there is another package called hunnyb which seems to do a decent job of decoding data using bencoded. Basically, I would like to know how to deal with such problems in other packages. I would also like to inform the package developer about the need to update the package.

change

@Andrey Popp explains that the problem is probably related to the setup.py file. I guess the only way to get the answer to my question is actually R-ing TFM . However, since I probably won’t have time to do this until the end for some time, I placed the setup.py file here .

A quick look at the easy_install manual shows that the find_modules () function used by this setup.py module searches for files named __init__.py inside the package. The source file is called bencode.py , so maybe this is the problem: should it be called __init__.py ?

change 2

Now, having studied Python packaging, I realized that the problem is that this module uses setuptools.find_packages and has its source in the root of its directory structure, but did not pass anything to package_dir . It would seem that it was pretty trivial. However, the author cannot contact his PyPI contact information. The PyPI page of the module also indicates "owner of the package index." I'm not sure what this means, but I managed to get in touch with this person who, I think, cannot support the module. In any case, it is 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 is a suitable replacement for it in hunnyb , I agreed that @andreypopp's answer is about as good as what I'm going to get.

+4
source share
1 answer

This setup.py package seems to be broken - it does not determine the correct package to distribute. I think you need to check setup.py in the original version, and if it is true, report the error to the author of this package.

+1
source

Source: https://habr.com/ru/post/1311691/


All Articles