Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 580690 - net-misc/gsutil: run fails with >=dev-python/oauth2client-2
Summary: net-misc/gsutil: run fails with >=dev-python/oauth2client-2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: SpanKY
URL: https://github.com/GoogleCloudPlatfor...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-20 23:15 UTC by Austin English (RETIRED)
Modified: 2016-04-21 05:20 UTC (History)
1 user (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 Austin English (RETIRED) gentoo-dev 2016-04-20 23:15:25 UTC
I emerged gsutil-4.16, which built fine, but trying to run (even --help) it fails:
hokan gsutil # gsutil --help
Traceback (most recent call last):
  File "/usr/lib/python-exec/python2.7/gsutil", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 3141, in <module>
    @_call_aside
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 3127, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 3154, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 640, in _build_master
    ws.require(__requires__)
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 941, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 828, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'SocksiPy-branch==1.01' distribution was not found and is required by gsutil

poking around, I found that the older 4.13 ebuild (renamed to gsutil-4.16.ebuild) works. The bundled-libs workaround in that ebuild still appears to be needed, as if I build 4.13 (or 4.16, with the renamed 4.13 ebuild) with USE="-bundled-libs", I get the same problem.
Comment 1 Zac Medico gentoo-dev 2016-04-21 00:13:58 UTC
(In reply to Austin English from comment #0)
> poking around, I found that the older 4.13 ebuild (renamed to
> gsutil-4.16.ebuild) works. The bundled-libs workaround in that ebuild still
> appears to be needed, as if I build 4.13 (or 4.16, with the renamed 4.13
> ebuild) with USE="-bundled-libs", I get the same problem.

The bundled-libs thing is actually a downstream modification that I made at our workplace.

Anyway, we should probably focus on the latest ebuild, which is currently 4.18 (though 4.19 has been released upstream). Version 4.18 fails for me as follows:

$ gsutil --help
Traceback (most recent call last):
  File "/usr/lib/python-exec/python2.7/gsutil", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 3138, in <module>
    @_call_aside
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 3124, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 3151, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 661, in _build_master
    ws.require(__requires__)
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 962, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 849, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'SocksiPy-branch>=1.01' distribution was not found and is required by gcs-oauth2-boto-plugin
Comment 2 SpanKY gentoo-dev 2016-04-21 02:45:20 UTC
4.18 is the latest in the tree.  don't care much about older 4.x versions.

that SocksiPy-branch error shouldn't be there after the hack:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d593533fde76a219ed69143295c3cb525af43695

which also exists in the gsutil-4.18 ebuild.  it works for me:
$ gsutil version
gsutil version: 4.18
$ gsutil --help
...output...
Comment 3 Zac Medico gentoo-dev 2016-04-21 03:49:37 UTC
I got gsutil-4.18 working after I did the following:

1) Removed "SocksiPy-branch>=1.01" from /usr/lib64/python2.7/site-packages/gcs_oauth2_boto_plugin-1.12-py2.7.egg-info/requires.txt (installed by dev-python/gcs-oauth2-boto-plugin-1.12)

2) Downgraded from dev-python/oauth2client-2.0.1 to dev-python/oauth2client-1.5.2 in order to avoid the following error:

$ gsutil --help
Traceback (most recent call last):
  File "/usr/lib/python-exec/python2.7/gsutil", line 9, in <module>
    load_entry_point('gsutil==4.18', 'console_scripts', 'gsutil')()
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 568, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 2720, in load_entry_point
    return ep.load()
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 2380, in load
    return self.resolve()
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 2386, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib64/python2.7/site-packages/gslib/__main__.py", line 59, in <module>
    from gslib.command_runner import CommandRunner
  File "/usr/lib64/python2.7/site-packages/gslib/command_runner.py", line 30, in <module>
    from gslib.cloud_api_delegator import CloudApiDelegator
  File "/usr/lib64/python2.7/site-packages/gslib/cloud_api_delegator.py", line 23, in <module>
    from gslib.cs_api_map import ApiMapConstants
  File "/usr/lib64/python2.7/site-packages/gslib/cs_api_map.py", line 19, in <module>
    from gslib.boto_translation import BotoTranslation
  File "/usr/lib64/python2.7/site-packages/gslib/boto_translation.py", line 66, in <module>
    import gslib.devshell_auth_plugin  # pylint: disable=unused-import
  File "/usr/lib64/python2.7/site-packages/gslib/devshell_auth_plugin.py", line 22, in <module>
    import oauth2client.devshell as devshell
ImportError: No module named devshell
Comment 4 Zac Medico gentoo-dev 2016-04-21 03:59:07 UTC
(In reply to Zac Medico from comment #3)
> I got gsutil-4.18 working after I did the following:
> 
> 1) Removed "SocksiPy-branch>=1.01" from
> /usr/lib64/python2.7/site-packages/gcs_oauth2_boto_plugin-1.12-py2.7.egg-
> info/requires.txt (installed by dev-python/gcs-oauth2-boto-plugin-1.12)

I see bug 577892 already exists for this.

> 2) Downgraded from dev-python/oauth2client-2.0.1 to
> dev-python/oauth2client-1.5.2 in order to avoid the following error:

How about if we add a dependency like <dev-python/oauth2client-2 to the gsutil ebuild?
Comment 5 SpanKY gentoo-dev 2016-04-21 05:08:35 UTC
ok, so all the issues reported so far are old/invalid except the not working with dev-python/oauth2client-2+.  i had looked at that a bit but wasn't able to get it to work easily before i gave up :/.

i really hate adding < deps as it just screws with the installed tree and you end up with upgrade/downgrade cycles.