Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 539966 - app-portage/layman-2.3.0 - python setup.py setup_plugins: ImportError: No module named sslfetch.connections
Summary: app-portage/layman-2.3.0 - python setup.py setup_plugins: ImportError: No mod...
Status: RESOLVED DUPLICATE of bug 539624
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Brian Dolbec
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-13 11:21 UTC by Steffen Hau
Modified: 2015-02-13 11:30 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 Steffen Hau 2015-02-13 11:21:23 UTC
Layman 2.3.0 fails in preapre phase with:

>>> Unpacking source...
>>> Unpacking layman-2.3.0.tar.gz to /home/gentoo/tmp/portage/app-portage/layman-2.3.0/work
>>> Source unpacked in /home/gentoo/tmp/portage/app-portage/layman-2.3.0/work
>>> Preparing source in /home/gentoo/tmp/portage/app-portage/layman-2.3.0/work/layman-2.3.0 ...
python setup.py setup_plugins
!!! Layman API imports failed.Traceback (most recent call last):
  File "setup.py", line 12, in <module>
    from layman.version import VERSION
  File "./layman/__init__.py", line 13, in <module>
    from layman.api import LaymanAPI
  File "./layman/api.py", line 25, in <module>
    from layman.remotedb        import RemoteDB
  File "./layman/remotedb.py", line 46, in <module>
    from   sslfetch.connections     import Connector
ImportError: No module named sslfetch.connections
 * ERROR: app-portage/layman-2.3.0::gentoo failed (prepare phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called src_prepare
 *   environment, line 4480:  Called distutils-r1_src_prepare
 *   environment, line 1371:  Called python_prepare_all
 *   environment, line 4218:  Called esetup.py 'setup_plugins'
 *   environment, line 1822:  Called die
 * The specific snippet of code:
 *       "${@}" || die
 * 

I see that there is an new esetup.py call in 2.3.0 ebuild, which is missing in 2.2.0-r7 ebuild. sslfetch is installed with only Python 3.4 enabled:
[ebuild   R    ] dev-python/ssl-fetch-0.3::gentoo  PYTHON_TARGETS="python3_4 -pypy -python2_7 -python3_3" 0 KiB

My System python is currently set to Python 2.7:
Available Python interpreters:
  [1]   python2.7 *
  [2]   python3.4

So I took a look in distutils-r1 eclass to see what esetup.py does. It says:
# Run setup.py using currently selected Python interpreter
# (if ${PYTHON} is set; fallback 'python' otherwise).

It looks like the layman ebuild does not set $PYTHON according to the enabled $PYTHON_TARGETS. If I temporary change the system interpreter with eselect to Python 3.4, layman installs fine. Perhaps the layman ebuild is missing some other eclass which sets up $PYTHON correctly.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2015-02-13 11:30:43 UTC

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