dev-python/python-distutils-extra-2.37 regression

Bug #1122464 reported by yellowhat on 2013-02-11
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Terra Terminal Emulator

Bug Description

Hi all,
I am trying to compile on my gentoo box (~x86) but I am getting this error emerging against dev-python/python-distutils-extra-2.37, downgrading to 2.33 seems to work:

>>> Emerging (1 of 1) x11-terms/terra-9999
>>> Unpacking source...
 * bzr pull start -->
 * repository: lp:terra
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data. See "bzr help launchpad-login". is permanently redirected to
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data. See "bzr help launchpad-login".
No revisions or tags to pull.
 * exporting ...
 * revision 15 is now in /tmp/portage/x11-terms/terra-9999/work/terra-9999
>>> Source unpacked in /tmp/portage/x11-terms/terra-9999/work
>>> Preparing source in /tmp/portage/x11-terms/terra-9999/work/terra-9999 ...
>>> Source prepared.
>>> Configuring source in /tmp/portage/x11-terms/terra-9999/work/terra-9999 ...
>>> Source configured.
>>> Compiling source in /tmp/portage/x11-terms/terra-9999/work/terra-9999 ...
 * python2.7: running distutils-r1_run_phase distutils-r1_python_compile
/usr/bin/python2.7 build build --build-base /tmp/portage/x11-terms/terra-9999/work/terra-9999-python2_7 --build-lib /tmp/portage/x11-terms/terra-9999/work/terra-9999-python2_7/lib --build-scripts /tmp/portage/x11-terms/terra-9999/work/terra-9999-python2_7/scripts
Traceback (most recent call last):
  File "", line 97, in <module>
    cmdclass={'install': InstallAndUpdateDataDirectory}
  File "/usr/lib/python2.7/site-packages/DistUtilsExtra/", line 98, in setup
    __requires(attrs, src_all)
  File "/usr/lib/python2.7/site-packages/DistUtilsExtra/", line 470, in __requires
    __add_imports(imports, s, attrs)
  File "/usr/lib/python2.7/site-packages/DistUtilsExtra/", line 411, in __add_imports
    elif node.module and __external_mod(cur_module, node.module, attrs):
  File "/usr/lib/python2.7/site-packages/DistUtilsExtra/", line 353, in __external_mod
    mod = __import__(cur_module + '.' + module)
  File "/tmp/portage/x11-terms/terra-9999/work/terra-9999/terra/", line 27, in <module>
    class ConfigManager():
  File "/tmp/portage/x11-terms/terra-9999/work/terra-9999/terra/", line 42, in ConfigManager
    'shell': os.environ['SHELL'],
  File "/usr/lib/python2.7/", line 23, in __getitem__
    raise KeyError(key)
KeyError: 'SHELL'

Özcan ESEN (ozcanesen) wrote :

Hey i'm not gentoo user but error says python can't find 'SHELL' environment variable, i tested it on gentoo vps and worked for me, will you test your system like this:

hasufell (jd-o) wrote :

which dev-python/python-distutils-extra version were you running when you tested it?

yellowhat (yellowhat46) wrote :

If I have version 2.37 I get this error, downgrading to 2.33 it works. Infact now with latest revision of the ebuild version >2.34 has been masked. This is the ebuild

This is my system:
vasco@yellowhat ~ $ uname -a
Linux yellowhat 3.8.0-rc7 #1 SMP PREEMPT Sun Feb 10 18:42:01 CET 2013 i686 AMD Athlon(tm) 64 X2 Dual Core Processor 5000+ AuthenticAMD GNU/Linux
vasco@yellowhat ~ $ python --version
Python 3.2.3
vasco@yellowhat ~ $ env | grep SHELL
vasco@yellowhat ~ $ python
Python 3.2.3 (default, Dec 14 2012, 19:39:30)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.environ['SHELL']

hasufell (jd-o) wrote :

reverting this change

@@ -378,7 +390,13 @@

         with open(file, 'rb') as f:
- tree = ast.parse('UTF-8'), file)
+ # send binary blob for python2, otherwise sending an unicode object with
+ # "encoding" directive makes ast triggering an exception in python2
+ if(sys.version_info[0] < 3):
+ file_content =
+ else:
+ file_content ='UTF-8')
+ tree = ast.parse(file_content, file)

which occurs in python-distutils-extra-2.34 first seems to fix the issue

hasufell (jd-o) wrote :


To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers