Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 349159 - dev-python/virtualenv-1.4.9 breaks with dev-lang/python-2.7.1
Summary: dev-python/virtualenv-1.4.9 breaks with dev-lang/python-2.7.1
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL: https://bitbucket.org/ianb/virtualenv...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-20 02:10 UTC by Lukasz Ligowski
Modified: 2010-12-20 15:30 UTC (History)
0 users

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 Lukasz Ligowski 2010-12-20 02:10:16 UTC
With upgrade from python-2.7 to python-2.7.1, something changes and virtualenv breaks. Upstream knows about this. virtualenv-1.5.1 that is in portage is unaffected.




Reproducible: Always

Steps to Reproduce:
1. install python 2.7.1
2. try to create virtual environment


Actual Results:  
spotter@battleship ~ $ virtualenv axx
New python executable in axx/bin/python2.7
Also creating executable in axx/bin/python
Traceback (most recent call last):
  File "/home/spotter/axx/lib64/python2.7/site.py", line 67, in <module>
    import os
  File "/home/spotter/axx/lib64/python2.7/os.py", line 398, in <module>
    import UserDict
  File "/home/spotter/axx/lib64/python2.7/UserDict.py", line 83, in <module>
    import _abcoll
  File "/home/spotter/axx/lib64/python2.7/_abcoll.py", line 11, in <module>
    from abc import ABCMeta, abstractmethod
  File "/home/spotter/axx/lib64/python2.7/abc.py", line 8, in <module>
    from _weakrefset import WeakSet
ImportError: No module named _weakrefset
ERROR: The executable axx/bin/python2.7 is not functioning
ERROR: It thinks sys.prefix is '/home/spotter' (should be '/home/spotter/axx')
ERROR: virtualenv is not compatible with this system or executable

Expected Results:  
spotter@battleship ~ $ virtualenv aaa
New python executable in aaa/bin/python2.7
Also creating executable in aaa/bin/python
Installing setuptools........................done.


solution:
1. upgrade to virtualenv-1.5.1
2. apply patch (from https://bitbucket.org/ianb/virtualenv/issue/63/now-python27-requires-_weakrefset):

--- a/virtualenv.py        2010-09-14 21:48:58.078562930 +0200
+++ b/virtualenv.py        2010-09-14 21:46:20.650769346 +0200
@@ -51,6 +51,8 @@ REQUIRED_FILES = ['lib-dynload', 'config
 
 if sys.version_info[:2] >= (2, 6):
     REQUIRED_MODULES.extend(['warnings', 'linecache', '_abcoll', 'abc'])
+    if sys.version_info[:2] >= (2, 7):
+        REQUIRED_MODULES.extend(['_weakrefset'])
 if sys.version_info[:2] <= (2, 3):
     REQUIRED_MODULES.extend(['sets', '__future__'])
 if is_pypy:
Comment 1 Lukasz Ligowski 2010-12-20 02:11:28 UTC
1. and 2. in solution are alternatives
Comment 2 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-12-20 15:30:35 UTC
You shouldn't mix stable versions (dev-python/virtualenv-1.4.9) with unstable versions (dev-lang/python-2.7.1).