Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 585282 - dev-python/pbr-1.10.0 ImporError in distutils-r1_python_compile
Summary: dev-python/pbr-1.10.0 ImporError in distutils-r1_python_compile
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Matthew Thode ( prometheanfire )
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-07 12:39 UTC by Tiziano Müller (RETIRED)
Modified: 2016-06-07 20:56 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 Tiziano Müller (RETIRED) gentoo-dev 2016-06-07 12:39:20 UTC
I get the following during src_compile:

>>> Starting src_compile
 * python2_7: running distutils-r1_run_phase distutils-r1_python_compile
/usr/bin/python2.7 setup.py build
Traceback (most recent call last):
  File "setup.py", line 22, in <module>
    **util.cfg_to_args())
  File "/var/tmp/paludis/dev-python-pbr-1.10.0/work/pbr-1.10.0/pbr/util.py", line 264, in cfg_to_args
    wrap_commands(kwargs)
  File "/var/tmp/paludis/dev-python-pbr-1.10.0/work/pbr-1.10.0/pbr/util.py", line 566, in wrap_commands
    cmdclass = ep.resolve()
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 2208, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
ImportError: No module named release

!!! ERROR in dev-python/pbr-1.10.0::gentoo:
!!! In esetup.py at line 2644
!!! (no message provided)

!!! Call stack:
!!!    * esetup.py (/var/tmp/paludis/dev-python-pbr-1.10.0/temp/loadsaveenv:2644)
!!!    * distutils-r1_python_compile (/var/tmp/paludis/dev-python-pbr-1.10.0/temp/loadsaveenv:1278)
!!!    * distutils-r1_run_phase (/var/tmp/paludis/dev-python-pbr-1.10.0/temp/loadsaveenv:1403)
!!!    * _python_multibuild_wrapper (/var/tmp/paludis/dev-python-pbr-1.10.0/temp/loadsaveenv:924)
!!!    * _multibuild_run (/var/tmp/paludis/dev-python-pbr-1.10.0/temp/loadsaveenv:3648)
!!!    * multibuild_foreach_variant (/var/tmp/paludis/dev-python-pbr-1.10.0/temp/loadsaveenv:3650)
!!!    * python_foreach_impl (/var/tmp/paludis/dev-python-pbr-1.10.0/temp/loadsaveenv:4732)
!!!    * _distutils-r1_run_foreach_impl (/var/tmp/paludis/dev-python-pbr-1.10.0/temp/loadsaveenv:591)
!!!    * distutils-r1_src_compile (/var/tmp/paludis/dev-python-pbr-1.10.0/temp/loadsaveenv:1412)
!!!    * src_compile (/var/tmp/paludis/dev-python-pbr-1.10.0/temp/loadsaveenv:5209)
!!!    * ebuild_f_compile (/usr/libexec/paludis/2/src_compile.bash:56)
!!!    * ebuild_main (/usr/libexec/paludis/ebuild.bash:675)
!!!    * main (/usr/libexec/paludis/ebuild.bash:698)

diefunc: making ebuild PID 13540 exit with error
die trap: exiting with error.
Comment 1 Tiziano Müller (RETIRED) gentoo-dev 2016-06-07 12:41:22 UTC
... but also packages using the currently installed pbr (dev-python/pbr-1.8.1-r1) fail with a similar message (here from testtools-2.2.0):

>>> Starting src_compile
 * python2_7: running distutils-r1_run_phase distutils-r1_python_compile
/usr/bin/python2.7 setup.py build
ERROR:root:Error parsing
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/pbr/core.py", line 109, in pbr
    attrs = util.cfg_to_args(path)
  File "/usr/lib64/python2.7/site-packages/pbr/util.py", line 261, in cfg_to_args
    wrap_commands(kwargs)
  File "/usr/lib64/python2.7/site-packages/pbr/util.py", line 541, in wrap_commands
    for cmd, _ in dist.get_command_list():
  File "/usr/lib64/python2.7/site-packages/setuptools/dist.py", line 447, in get_command_list
    cmdclass = ep.resolve()
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 2208, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
ImportError: No module named release
error in setup command: Error parsing /var/tmp/paludis/dev-python-testtools-2.2.0/work/testtools-2.2.0/setup.cfg: ImportError: No module named release

!!! ERROR in dev-python/testtools-2.2.0::gentoo:
!!! In esetup.py at line 2645
!!! (no message provided)
Comment 2 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2016-06-07 14:22:56 UTC
I'm not able to reproduce this in normal portage, are you able to reproduce it there?
Comment 3 Tiziano Müller (RETIRED) gentoo-dev 2016-06-07 18:50:35 UTC
(In reply to Matthew Thode ( prometheanfire ) from comment #2)
> I'm not able to reproduce this in normal portage, are you able to reproduce
> it there?

even better, I can reproduce it without any package manager:

~/work/gentoo/pbr-1.10.0 $ python2.7 setup.py build
Traceback (most recent call last):
  File "setup.py", line 22, in <module>
    **util.cfg_to_args())
  File "/home/tiziano/work/gentoo/pbr-1.10.0/pbr/util.py", line 264, in cfg_to_args
    wrap_commands(kwargs)
  File "/home/tiziano/work/gentoo/pbr-1.10.0/pbr/util.py", line 566, in wrap_commands
    cmdclass = ep.resolve()
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 2208, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
ImportError: No module named release
Comment 4 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2016-06-07 19:02:57 UTC
     for ep in pkg_resources.iter_entry_points('distutils.commands'):                                                     
         if ep.name not in dist.cmdclass:                                                                                 
             if hasattr(ep, 'resolve'):
                 cmdclass = ep.resolve()                                                                                  
             else:                                                                                                        
                 # Old setuptools does not have ep.resolve, and load with                                                 
                 # arguments is depricated in 11+.  Use resolve, 12+, if we                                               
                 # can, otherwise fall back to load.                                                                      
                 # Setuptools 11 will throw a deprication warning, as it                                                  
                 # uses _load instead of resolve.                                                                         
                 cmdclass = ep.load(False)                                                                                
             dist.cmdclass[ep.name] = cmdclass

not sure why that code is not working...
Comment 5 Tiziano Müller (RETIRED) gentoo-dev 2016-06-07 20:45:19 UTC
Ok, I found the culprit:
One package installs a broken entry_points.txt /usr/lib64/python2.7/site-packages/rocket_errbot-1.2.5-py2.7.egg-info/entry_points.txt with the following content:

[distutils.commands]
build_monolithic = monolithic:build_monolithic
build_release = release:build_release

... and pbr checks all entry points at some point.

Once those bogus entry_points.txt are gone for all python versions, pbr (and testtools) install fine.
Comment 6 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2016-06-07 20:56:09 UTC
ok, going to close as invalid, let me know if this isn't correct