Issue #104 resolved

AssertionError for _python_cmd('setup.py', 'install')

Thijs Triemstra
created an issue

I just downloaded Python 2.7a1 and compiled it on a OSX 10.5.8 macbook pro. I then did:

{{{

!sh

$ curl -O http://python-distribute.org/distribute_setup.py $ sudo python2.7 distribute_setup.py }}}

And it failed with the following error:

{{{

!python

Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.8.tar.gz Extracting in /tmp/tmpPYVXGb Now working in /tmp/tmpPYVXGb/distribute-0.6.8 Installing Distribute Traceback (most recent call last): File "setup.py", line 41, in <module> from setuptools import setup, find_packages File "/private/tmp/tmpPYVXGb/distribute-0.6.8/setuptools/init.py", line 2, in <module> from setuptools.extension import Extension, Library File "/private/tmp/tmpPYVXGb/distribute-0.6.8/setuptools/extension.py", line 2, in <module> from setuptools.dist import _get_unpatched File "/private/tmp/tmpPYVXGb/distribute-0.6.8/setuptools/dist.py", line 7, in <module> from setuptools.command.sdist import sdist File "/private/tmp/tmpPYVXGb/distribute-0.6.8/setuptools/command/sdist.py", line 4, in <module> import os, re, sys, pkg_resources File "/private/tmp/tmpPYVXGb/distribute-0.6.8/pkg_resources.py", line 2656, in <module> add_activation_listener(lambda dist: dist.activate()) File "/private/tmp/tmpPYVXGb/distribute-0.6.8/pkg_resources.py", line 647, in subscribe callback(dist) File "/private/tmp/tmpPYVXGb/distribute-0.6.8/pkg_resources.py", line 2656, in <lambda> add_activation_listener(lambda dist: dist.activate()) File "/private/tmp/tmpPYVXGb/distribute-0.6.8/pkg_resources.py", line 2162, in activate self.insert_on(path) File "/private/tmp/tmpPYVXGb/distribute-0.6.8/pkg_resources.py", line 2258, in insert_on "A 0.7-series setuptools cannot be installed " ValueError: A 0.7-series setuptools cannot be installed with distribute Traceback (most recent call last): File "distribute_setup.py", line 458, in <module> main(sys.argv[1:]) File "distribute_setup.py", line 454, in main _install(tarball) File "distribute_setup.py", line 82, in _install assert _python_cmd('setup.py', 'install') AssertionError }}}

That AssertionError shouldn't be there if you ask me.

Comments (4)

  1. Tarek Ziadé repo owner

    "A 0.7-series setuptools cannot be installed " means that Distribute detected a setuptools 0.7.x version. In that case Distrbute is not installed, to avoid conflicts.

    Can you check that your python doesn't have Setuptools installed ?

  2. Thijs Triemstra reporter

    Hm, that's odd, looks like I did have setuptools installed. But I also previously installed distribute though:

    $ ls -l /usr/local/lib/python2.7/site-packages/
    total 584
    drwxr-xr-x   4 root  501     136 25 Sep 00:50 Django-1.1-py2.7.egg
    -rw-r--r--   1 root  501      35 25 Sep 00:48 PyAMF.egg-link
    -rw-r--r--   1 root  501     119  7 Dec 20:43 README
    drwxr-xr-x  13 root  501     442  7 Dec 20:45 distribute-0.6.2dev-py2.7.egg
    drwxr-xr-x  13 root  501     442  7 Dec 20:45 distribute-0.6.6-py2.7.egg
    -rw-r--r--   1 root  501     356 19 Oct 16:53 easy-install.pth
    -rw-r--r--   1 root  501     143 25 Sep 00:34 setuptools-0.6c9-py2.7.egg-info
    drwxr-xr-x   3 root  501     102 25 Sep 00:34 setuptools-0.7a1dev_r0-py2.7.egg
    -rw-r--r--   1 root  501  273474 24 Sep 22:00 setuptools-0.7a1dev_r0-py2.7.egg.OLD.1253835272.23
    -rw-r--r--   1 root  501      46  7 Jul 21:19 setuptools.egg-link
    -rw-r--r--   1 root  501      29 19 Oct 16:53 setuptools.pth
    drwxr-xr-x   4 root  501     136 25 Sep 00:35 zope.interface-3.5.2-py2.7-macosx-10.4-i386.egg
    

    I thought distribute basically disabled setuptools for me? It did it before at least.. I guess ill have to get rid of those setuptools eggs. I guess this ticket is more about getting rid of that AssertionError then, cause it seems like a bug to the end-user imo.

  3. Tarek Ziadé repo owner

    Distribute doesn't try to patch setuptools 0.7a1dev because it's a drop-in replacement for 0.6.x only. But this "Don't touch setuptools 0.7" behaviour was introduced some times ago so it probably means that this renaming occured in the past with a previous version.

    I am not sure why at this stage, 0.7 is still detected here.. What version do you have in "setuptools-0.7a1dev_r0-py2.7.egg" ?

    I guess ill have to get rid of those setuptools eggs. I guess this ticket is more about getting rid of that AssertionError then, cause it seems like a bug to the end-user imo.

    Agreed

  4. Log in to comment