Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 272599 - x11-misc/driconf-0.9.1 fail to build: AttributeError: 'module' object has no attribute 'check_version'
Summary: x11-misc/driconf-0.9.1 fail to build: AttributeError: 'module' object has no ...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-04 12:05 UTC by Alessandro Surace
Modified: 2010-12-15 17:17 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,5.20 KB, text/plain)
2009-06-04 12:07 UTC, Alessandro Surace
Details
build.log (build.log,1.78 KB, text/plain)
2009-06-04 12:08 UTC, Alessandro Surace
Details
pygtk build.log (build.log,181.54 KB, text/plain)
2009-06-23 08:09 UTC, Alessandro Surace
Details
/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/ content (dir_content.txt,1.23 KB, text/plain)
2009-09-14 09:42 UTC, Alessandro Surace
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alessandro Surace 2009-06-04 12:05:45 UTC
Hi Dear,
driconf fail to build because the attribute check_version is not in the gtk module (dev-python/pygtk-2.14.1).

Reproducible: Always

Steps to Reproduce:
1.emerge -v driconf
2.
3.




I think that the driconf's setup.py must be changed to understand which version is gtk in another way.
Comment 1 Alessandro Surace 2009-06-04 12:07:56 UTC
Created attachment 193506 [details]
emerge --info
Comment 2 Alessandro Surace 2009-06-04 12:08:12 UTC
Created attachment 193508 [details]
build.log
Comment 3 Mike Auty (RETIRED) gentoo-dev 2009-06-07 12:34:28 UTC
Are you sure python's installed and eselected correctly?  I'm running pygtk-2.14.1, ran python and typed the following:

import gtk
gtk.check_version(2, 4, 0)

You should get no response (you'll get a warning message if you put in something like 2,60,0).  That suggests that check_version is fine for figuring out the gtk version.  It means either you've got a different module being imported for gtk, or that your python installation has problems.

Please run a similar test and post the results back here, also please include the output of "eselect python list"...
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2009-06-11 06:09:13 UTC
Please reopen this bug report once you have provided the requested information.
Comment 5 Alessandro Surace 2009-06-17 12:44:28 UTC
Hi dear,
following what you ask.

supbig ~ # python
Python 2.6.2 (r262:71600, Jun  3 2009, 13:13:37) 
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk
>>> gtk.check_version(2, 4, 0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'check_version'
>>> gtk.check_version(2, 5, 0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'check_version'
>>> gtk.check_version(2, 6, 0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'check_version'


supbig ~ # eselect python list
Available python interpreters:
  [1]   python2.4
  [2]   python2.5
  [3]   python2.6 *

Comment 6 Mike Auty (RETIRED) gentoo-dev 2009-06-17 12:49:22 UTC
Ok, could you please run "eselect set 3" to ensure that all the appropriate symlinks for python are in place.  Then please try re-emerging pygtk.  If this doesn't solve your problems, please post the output of the following:

import gtk
dir(gtk)
Comment 7 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-06-17 17:15:49 UTC
(In reply to comment #6)
> Ok, could you please run "eselect set 3"

I guess you mean

  eselect python set 3

;)

Comment 8 Alessandro Surace 2009-06-18 15:33:53 UTC
Yes of course! Version 3.

supbig ~ # python
Python 2.6.2 (r262:71600, Jun  3 2009, 13:13:37)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk
>>> dir(gtk)
['__all__', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '_get_available_versions', '_our_dir', '_pygtk_2_0_dir', '_pygtk_dir_pat', '_pygtk_required_version', 'fnmatch', 'glob', 'os', 'require', 'require
20', 'sys']

Comment 9 Mike Auty (RETIRED) gentoo-dev 2009-06-18 21:14:40 UTC
Well, then I'm well and truly stumped...  Over to the python guys!
Comment 10 Alessandro Surace 2009-06-19 12:32:35 UTC
:-D 

The error persist:
creating build/scripts-2.6
copying and adjusting driconf -> build/scripts-2.6
changing mode of build/scripts-2.6/driconf from 644 to 755
Traceback (most recent call last):
  File "setup.py", line 63, in <module>
    if gtk.check_version(2, 4, 0):
AttributeError: 'module' object has no attribute 'check_version'
 * 
 * ERROR: x11-misc/driconf-0.9.1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2571:  Called distutils_src_compile
 *             environment, line  724:  Called die
 * The specific snippet of code:
 *       ${python} setup.py build "$@" || die "compilation failed"
 *  The die message:
 *   compilation failed
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/mnt/virtualfs/APPOGGIO/var_tmp/portage/x11-misc/driconf-0.9.1/temp/build.log'.
 * The ebuild environment file is located at '/mnt/virtualfs/APPOGGIO/var_tmp/portage/x11-misc/driconf-0.9.1/temp/environment'.
Comment 11 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-06-20 14:46:52 UTC
Rebuild dev-python/pygobject. If it doesn't help, attach build log of installation of dev-python/pygtk.
Comment 12 Alessandro Surace 2009-06-23 08:08:27 UTC
pygobject rebuilded but doesn't help.
pygtk rebuilded but doesn't help.
pygtk build.log in attachment.
Comment 13 Alessandro Surace 2009-06-23 08:09:09 UTC
Created attachment 195542 [details]
pygtk build.log
Comment 14 Nirbheek Chauhan (RETIRED) gentoo-dev 2009-06-24 13:05:04 UTC
(In reply to comment #13)
> Created an attachment (id=195542) [edit]
> pygtk build.log
> 

Files list matches fine, could you do `grep /usr/lib64/python2.6/site-packages/gtk-2.0/gtk/_gtk.so` and paste the output?
Comment 15 Alessandro Surace 2009-06-25 08:29:58 UTC
Grep What Where?
Comment 16 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-07-20 20:23:52 UTC
@nirbheek ?

FTR here I have
>>> len(dir(gtk))
1199
(python 2.6, pygtk-2.14)
Comment 17 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-08-26 20:44:44 UTC
I guess nirbheek meant:
$ egrep "check_version" /usr/lib64/python2.6/site-packages/gtk-2.0/gtk/_gtk.so
Comment 18 Alessandro Surace 2009-09-04 14:51:05 UTC
(In reply to comment #17)
> I guess nirbheek meant:
> $ egrep "check_version" /usr/lib64/python2.6/site-packages/gtk-2.0/gtk/_gtk.so
> 

The result is that is a bin files and matches...If I try to open like a text I get a lot of garbage!
Comment 19 Alessandro Surace 2009-09-11 13:37:12 UTC
Is sure a problem with python 2.6.0; I've changed to 2.4 and builded without problem; I've already contacted Tormod Volden that seem an active developer of driconf.

(In reply to comment #18)
> (In reply to comment #17)
> > I guess nirbheek meant:
> > $ egrep "check_version" /usr/lib64/python2.6/site-packages/gtk-2.0/gtk/_gtk.so
> > 
> 
> The result is that is a bin files and matches...If I try to open like a text I
> get a lot of garbage!
> 

Comment 20 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-09-12 20:44:47 UTC
Could you rebuild pygobject and pygtk with simple CFLAGS="-O2" , also could you try with pygtk-2.16.0-r1. This sounds like a local issue. Also what's the size of /usr/lib64/python2.6/site-packages/gtk-2.0/gtk/_gtk.so, I guess that given the lenght of your "dir" output, it can't be big.
Comment 21 Alessandro Surace 2009-09-14 09:41:47 UTC
(In reply to comment #20)
> Could you rebuild pygobject and pygtk with simple CFLAGS="-O2" , also could you
> try with pygtk-2.16.0-r1. This sounds like a local issue. Also what's the size
> of /usr/lib64/python2.6/site-packages/gtk-2.0/gtk/_gtk.so, I guess that given
> the lenght of your "dir" output, it can't be big.
> 

I've tried with the CFLAGS and different version suggested but without success; in attach the list of the dir.
Comment 22 Alessandro Surace 2009-09-14 09:42:36 UTC
Created attachment 204005 [details]
/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/ content
Comment 23 Gilles Dartiguelongue (RETIRED) gentoo-dev 2010-12-15 17:17:19 UTC
I'm sorry but it seems obvious by now that none of the CCed/assigned people managed to reproduce the problem. If you still have the problem, I guess we will have to arrange a debug session on irc.