I attempted to install sys-process/htop-1.0.3 on a new Gentoo system that only had Python 3.4 installed. Instead of pulling in Python 2.7 as a dependency, the compilation failed from failing to find any supported Python version. However, I was able to clone the htop repository from git://github.com/hishamhm/htop.git and compile it myself without any problems. The single Python script that's part of htop (scripts/MakeHeader.py) works correctly under both Python 2 and 3, so I propose expanding the required Python versions in the ebuild to include 3.x (or perhaps "any Python version", if that's possible). Reproducible: Always Steps to Reproduce: 1. Start with Gentoo installation lacking Python 2 2. Run 'emerge htop' 3. Note compilation failure Expected Results: Recognized Python 3 as suitable for running the single Python file in htop's source code
I looked over the MakeHeader.py script, it is using print as a function without from __future__ import print_function. so at the very least it should drop py-2.6 support. Especially since it is no longer in the tree. I also did not see any python-2 specific code, so will likely work correctly. Matt, to test it properly, please make a copy of htop into a local overlay and change the PYTHON_COMPAT= to PYTHON_COMPAT=( python{2_7,3_3,3_4} ) then generate a new manifest for it by running the following in the same directory as the modified ebuild. repoman manifest Then re-emerge it and test.
You probably want to add ${PYTHON_DEPS} to the DEPEND to make sure that one of the listed python implementations is installed at build time.
*** This bug has been marked as a duplicate of bug 558108 ***