Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 539624 - app-portage/layman-2.3.0 - src_compile(): python setup.py setup_plugins: ImportError: No module named 'sslfetch'
Summary: app-portage/layman-2.3.0 - src_compile(): python setup.py setup_plugins: Impo...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Layman Overlay Manager project
URL:
Whiteboard:
Keywords: InVCS
: 539966 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-02-10 14:45 UTC by PM
Modified: 2017-02-02 00:59 UTC (History)
7 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 PM 2015-02-10 14:45:33 UTC
>>> Emerging (1 of 1) app-portage/layman-2.3.0::gentoo
 * layman-2.3.0.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                                 [ ok ]
>>> Unpacking source...
>>> Unpacking layman-2.3.0.tar.gz to /var/tmp/portage/app-portage/layman-2.3.0/work
>>> Source unpacked in /var/tmp/portage/app-portage/layman-2.3.0/work
>>> Preparing source in /var/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'

Reproducible: Always
Comment 1 Brian Dolbec (RETIRED) gentoo-dev 2015-02-10 16:17:02 UTC
2 options, Since ssl-fetch is likely merged now, just re-emerge layman-2.3.0.

I have already fixed DEPENDS to ensure ssl-fetch is merged before layman is started.  If you re-sync the ebuild has been fixed.
Comment 2 PM 2015-02-13 10:17:32 UTC
I have dev-python/ssl-fetch-0.3 installed, but layman still won't build due to this error.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2015-02-13 11:30:43 UTC
*** Bug 539966 has been marked as a duplicate of this bug. ***
Comment 4 Ben Kohler gentoo-dev 2015-02-13 17:21:39 UTC
(In reply to PM from comment #2)
> I have dev-python/ssl-fetch-0.3 installed, but layman still won't build due
> to this error.

This seems odd/unlikely.  Can you attach a full build.log for layman-2.3.0 and a comment with the output of "qlist ssl-fetch"?
Comment 5 Brian Dolbec (RETIRED) gentoo-dev 2015-02-13 21:28:33 UTC
OK, I can reproduce the error when the eselected python version doesn't not match a python version in PYTHON_COMPAT for ssl-fetch and layman.

I'll work on a fix.

BUT you should be running a common list of python versions to install portage, layman, and other portage tools into.  Plus you should have one of those versions eselected for normal operations.

eselect a non-standard version for certain development testing reasons for some other app, then reset it back.
Comment 6 PM 2015-02-16 11:22:07 UTC
Yeah, I wasn't aware python 3.4 is still "experimental" or something. Switching to 3.3 by eselect fixed this issue.
Comment 7 Brian Dolbec (RETIRED) gentoo-dev 2015-02-16 16:33:29 UTC
Python 3.4 is not experimental, it is stable for many arches already.

The problem was you were running py-3.4 but ssl-fetch was not installed to py-3.4 and layman was not set to install to 3.4.

You should set all portage tools to the same 
PYTHON_TARGETS list that you install portage to to avoid these types of problems.

But like I said, I'll work on a solution that avoids the issue you encountered.
Comment 8 Chloe 2015-02-23 05:15:37 UTC
A possible (todo) fix would be to automatically detect PYTHON_TARGETS (and RUBY_TARGETS). Setting those manually would be supported for special cases. This would avoid future issues like that and simplify setting some things up (single target would still be a thing, obviously).
This would prevent future possible issues like this.
Comment 9 Brian Dolbec (RETIRED) gentoo-dev 2015-02-23 05:41:37 UTC
No, the solution has been committed to git already.  I've moved a master api class out of the init so that it does not cause it to merge all the other modules, just because it wanted to import the version.  The next layman release should not have that same problem.

To work around the problem for the current layman-2.3.0, make sure you have eselected a python version that layman/ssl-fetch is installing it's modules to.
Comment 10 N. Andrew Walsh 2015-02-23 13:24:37 UTC
ssl-fetch does not appear to support python-3.4. I see this message at the end of the build:

* Building package for python3.3 only while python3.4 is active.
 * Please consider switching the active Python 3 interpreter:
 * 
 *      eselect python set --python3 python3.3
 * 
 * Please note that after switching the active Python interpreter,
 * you may need to run 'python-updater' to rebuild affected packages.
 * 
 * For more information on PYTHON_TARGETS and python.eclass
 * compatibility, please see the relevant Wiki article [1].

Since py-3.4 has been stable for a while now, any word on when ssl-fetch can build to it?
Comment 11 Brian Dolbec (RETIRED) gentoo-dev 2015-02-23 14:21:42 UTC
All ssl-fetch ebuilds have 3.4 enabled and is installed to it on my system.

PYTHON_COMPAT=(python{2_7,3_3,3_4} pypy)

Perhaps you have a package.mask entry for it somewhere.

Please show your "emerge --info ssl-fetch"
Comment 12 Devan Franchini (RETIRED) gentoo-dev 2017-02-02 00:59:52 UTC
It's been two years since this bug has been open. We're well past the point of SSLFetch not being stable or widely used enough. I'm closing this out.