[lucid] installs old version of setuptools

Bug #517390 reported by Andrew Straw
This bug report is a duplicate of:  Bug #485944: [FFe] Upgrade to virtualenv 1.4.5. Edit Remove
38
This bug affects 8 people
Affects Status Importance Assigned to Milestone
python-virtualenv (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: python-virtualenv

python-virtualenv 1.3.3-1ubuntu1 in lucid installs an old version of setuptools:

astraw@computer:~$ dpkg -L python-virtualenv | grep setuptools
/usr/share/pyshared/support-files/setuptools-0.6c9-py2.6.egg
/usr/share/pyshared/support-files/setuptools-0.6c9-py2.5.egg

astraw@computer:~$ apt-cache show python-setuptools | grep Version
Version: 0.6.10-1ubuntu1
Python-Version: 2.5, 2.6

Running the following script results in a traceback.

------------- start of test script

#!/bin/bash
set -e

TARGET=PYst

rm -rf foo
rm -rf $TARGET

cat > setup.py <<EOF
from setuptools import setup

setup(name='foo',
      version='1.0',
      packages=['foo'],
      zip_safe=False,
      )
EOF

mkdir foo
touch foo/__init__.py

virtualenv $TARGET

$TARGET/bin/python setup.py install

------------- end of test script

The traceback is:

Traceback (most recent call last):
  File "setup.py", line 6, in <module>
    zip_safe=False,
  File "/usr/lib/python2.6/distutils/core.py", line 113, in setup
    _setup_distribution = dist = klass(attrs)
  File "/tmp/PYst/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/dist.py", line 223, in __init__
  File "/usr/lib/python2.6/distutils/dist.py", line 270, in __init__
    self.finalize_options()
  File "/tmp/PYst/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/dist.py", line 256, in finalize_options
  File "/tmp/PYst/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/pkg_resources.py", line 1918, in load
    while parts and parts[-1]=='00000000':
ImportError: <module 'setuptools.dist' from '/tmp/PYst/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/dist.py'> has no 'check_packages' attribute

Rebuilding virtualenv 1.3.3-1ubuntu1 does not fix the issue, but installing virtualenv 1.4.5 fixes the issue. (I used 1.4.5-1 from my PPA.)

Revision history for this message
Kai Steverding (kai-steverding) wrote :

This bug can be resolved by switching the setuptools egg which is distributed with the virtualenv package. A quick workaround is builind the package from source copying the setuptools-0.6c10 egg. over the included setuptools-0.6c9 , but this is quite dirty

Revision history for this message
Scott Robinson (scott-ubuntu) wrote :

This issue actually makes Lucid virtualenv unusable because distribute setuptools vs. old-setuptools setuptools clash.

Revision history for this message
Benoit Chesneau (bchesneau) wrote :

i have this bug here too on lucid :

(mtcompono)benoitc@benoitc-desktop:~/work/mtcompono/src/restkit$ python setup.py develpop
/home/benoitc/work/mtcompono/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/sdist.py:4: UserWarning: Module pkg_resources was already imported from /home/benoitc/work/mtcompono/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/pkg_resources.py, but /usr/lib/python2.6/dist-packages is being added to sys.path
/home/benoitc/work/mtcompono/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/sdist.py:4: UserWarning: Module setuptools was already imported from /home/benoitc/work/mtcompono/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/__init__.py, but /usr/lib/python2.6/dist-packages is being added to sys.path
/home/benoitc/work/mtcompono/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/sdist.py:4: UserWarning: Module site was already imported from /home/benoitc/work/mtcompono/lib/python2.6/site.pyc, but /usr/lib/python2.6/dist-packages is being added to sys.path
Traceback (most recent call last):
  File "setup.py", line 55, in <module>
    test_suite = 'nose.collector',
  File "/usr/lib/python2.6/distutils/core.py", line 113, in setup
    _setup_distribution = dist = klass(attrs)
  File "/home/benoitc/work/mtcompono/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/dist.py", line 223, in __init__
  File "/usr/lib/python2.6/distutils/dist.py", line 270, in __init__
    self.finalize_options()
  File "/home/benoitc/work/mtcompono/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/dist.py", line 256, in finalize_options
  File "/home/benoitc/work/mtcompono/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/pkg_resources.py", line 1918, in load
    while parts and parts[-1]=='00000000':
ImportError: <module 'setuptools.dist' from '/home/benoitc/work/mtcompono/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/dist.py'> has no 'check_packages' attribute

Revision history for this message
alien8 (fb-alien8) wrote :

The bug is still there.

Revision history for this message
Māris Fogels (mars) wrote :

People affected by this bug in Lucid may also want to track Bug #485944, "Upgrade to virtualenv 1.4.5".

Revision history for this message
Barry Warsaw (barry) wrote :

@Maris: in fact, I'm going to mark this one a duplicate of bug 485944, since syncing to Debian's 1.4.5 will fix this problem.

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.