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

Bug #1122464 reported by yellowhat
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Terra Terminal Emulator
New
Undecided
Unassigned
python-distutils-extra
New
Undecided
Unassigned

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".
http://bazaar.launchpad.net/~ozcanesen/terra/trunk is permanently redirected to http://bazaar.launchpad.net/~ozcanesen/terra/trunk/changes
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 setup.py 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 "setup.py", line 97, in <module>
    cmdclass={'install': InstallAndUpdateDataDirectory}
  File "/usr/lib/python2.7/site-packages/DistUtilsExtra/auto.py", line 98, in setup
    __requires(attrs, src_all)
  File "/usr/lib/python2.7/site-packages/DistUtilsExtra/auto.py", line 470, in __requires
    __add_imports(imports, s, attrs)
  File "/usr/lib/python2.7/site-packages/DistUtilsExtra/auto.py", line 411, in __add_imports
    elif node.module and __external_mod(cur_module, node.module, attrs):
  File "/usr/lib/python2.7/site-packages/DistUtilsExtra/auto.py", line 353, in __external_mod
    mod = __import__(cur_module + '.' + module)
  File "/tmp/portage/x11-terms/terra-9999/work/terra-9999/terra/config.py", line 27, in <module>
    class ConfigManager():
  File "/tmp/portage/x11-terms/terra-9999/work/terra-9999/terra/config.py", line 42, in ConfigManager
    'shell': os.environ['SHELL'],
  File "/usr/lib/python2.7/UserDict.py", line 23, in __getitem__
    raise KeyError(key)
KeyError: 'SHELL'

Revision history for this message
Ö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: http://paste.ubuntu.com/1638056/

Revision history for this message
hasufell (jd-o) wrote :

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

Revision history for this message
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 http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-terms/terra/terra-9999.ebuild?view=markup

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
SHELL=/bin/bash
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']
'/bin/bash'

Revision history for this message
hasufell (jd-o) wrote :

reverting this change

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

     try:
         with open(file, 'rb') as f:
- tree = ast.parse(f.read().decode('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 = f.read()
+ else:
+ file_content = f.read().decode('UTF-8')
+ tree = ast.parse(file_content, file)

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

Revision history for this message
hasufell (jd-o) wrote :

in auto.py

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.