Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 541948 - sys-process/htop-1.0.3 can be compiled with Python 3
Summary: sys-process/htop-1.0.3 can be compiled with Python 3
Status: RESOLVED DUPLICATE of bug 558108
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Christian Ruppert (idl0r)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-02 20:22 UTC by Matt Ruffalo
Modified: 2015-09-10 08:37 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Ruffalo 2015-03-02 20:22:44 UTC
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
Comment 1 Brian Dolbec (RETIRED) gentoo-dev 2015-03-03 04:35:57 UTC
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.
Comment 2 Patrick McLean gentoo-dev 2015-06-10 23:59:30 UTC
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.
Comment 3 Christian Ruppert (idl0r) gentoo-dev 2015-09-10 08:37:01 UTC

*** This bug has been marked as a duplicate of bug 558108 ***