Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 291109 - logging requires multiprocessing which is available only in dev-lang/python[threads]
Summary: logging requires multiprocessing which is available only in dev-lang/python[t...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal
Assignee: Python Gentoo Team
URL: http://svn.python.org/view?view=rev&r...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-30 06:09 UTC by Daniel Black (RETIRED)
Modified: 2009-11-07 23:19 UTC (History)
2 users (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 Daniel Black (RETIRED) gentoo-dev 2009-10-30 06:09:01 UTC
dev-python/setuptools fails to compile when python-2.6  or 3.1 is eselected with the following error.

 * Building of dev-python/setuptools-0.6.6 with Python 3.1...                                                        
python3.1 setup.py build -b ..........
/shlib_test                                                       
copying tests/shlib_test/hellolib.c -> build/src/tests/shlib_test                                                    
copying tests/shlib_test/hello.pyx -> build/src/tests/shlib_test                                                     
copying tests/api_tests.txt -> build/src/tests                                                                       
Traceback (most recent call last):                                                                                   
  File "setup.py", line 25, in <module>                                                                              
    main('lib2to3.fixes', ['-wd', os.path.join(tmp_src, 'tests', 'api_tests.txt')])                                  
  File "/usr/lib64/python3.1/lib2to3/main.py", line 150, in main                                                     
    options.nobackups, not options.no_diffs)                                                                         
  File "/usr/lib64/python3.1/lib2to3/main.py", line 32, in __init__                                                  
    super(StdoutRefactoringTool, self).__init__(fixers, options, explicit)                                           
  File "/usr/lib64/python3.1/lib2to3/refactor.py", line 609, in __init__                                             
    super(MultiprocessRefactoringTool, self).__init__(*args, **kwargs)                                               
  File "/usr/lib64/python3.1/lib2to3/refactor.py", line 203, in __init__                                             
    self.pre_order, self.post_order = self.get_fixers()                                                              
  File "/usr/lib64/python3.1/lib2to3/refactor.py", line 234, in get_fixers                                           
    self.log_message("Skipping implicit fixer: %s", fix_name)                                                        
  File "/usr/lib64/python3.1/lib2to3/refactor.py", line 258, in log_message                                          
    self.logger.info(msg)                                                                                            
  File "/usr/lib64/python3.1/logging/__init__.py", line 1046, in info                                                
    self._log(INFO, msg, args, **kwargs)                                                                             
  File "/usr/lib64/python3.1/logging/__init__.py", line 1158, in _log                                                
    record = self.makeRecord(self.name, level, fn, lno, msg, args, exc_info, func, extra)                            
  File "/usr/lib64/python3.1/logging/__init__.py", line 1133, in makeRecord                                          
    rv = LogRecord(name, level, fn, lno, msg, args, exc_info, func)                                                  
  File "/usr/lib64/python3.1/logging/__init__.py", line 275, in __init__                                             
    from multiprocessing import current_process                                                                      
ImportError: No module named multiprocessing                                                                         
 * ERROR: dev-python/setuptools-0.6.6 failed:                                                                        
 *   Building failed with Python 3.1 in building() function         

=================================================================
                        Package Settings
=================================================================

dev-lang/python-2.5.4-r3 was built with the following:
USE="berkdb gdbm ipv6 (multilib) ncurses readline sqlite ssl threads tk xml -build -doc -examples -ucs2 -wininst"
LDFLAGS="-Wl,-O1 -L."


dev-lang/python-2.6.2-r1 was built with the following:
USE="berkdb gdbm ipv6 (multilib) ncurses readline sqlite ssl threads tk xml -build -doc -examples -ucs2 -wininst"
LDFLAGS="-Wl,-O1 -L."


dev-lang/python-3.1.1-r1 was built with the following:
USE="doc examples gdbm ipv6 (multilib) ncurses readline sqlite ssl tk xml -build -threads -ucs2 -wininst"
LDFLAGS="-Wl,-O1 -L."

after emerging python-3.1.1-r1 with USE=threads setuptools compiles ok.
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-11-03 21:49:48 UTC
The traceback shows that it's actually lib2to3 which requires multiprocessing...
Comment 2 Benjamin Peterson 2009-11-07 05:04:13 UTC
Technically it's the logging package which is importing multiprocessing. Upstream this has been fixed by checking if the multiprocessing module is in sys.modules first.
Comment 3 Richard Foulkes 2009-11-07 08:47:41 UTC
This still fails on x86 with python-2.6.2-r1, no matter if python (and the rest of world) is built with USE="threads" or not. I'm unsure whether latest portage has issues with python 3.1 or not.

It only seems to be pulled in with USE="doc", so i've disabled that for now, which is a shame.
Comment 4 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-11-07 23:19:26 UTC
Fixed.