Issue #286 duplicate

[distribute-0.6.27/setuptools/dist.py(line:103)] incompatibility bug for Python 3.x (with patch)

Anonymous created an issue

is: {{{ except ValueError, e: }}} should be (for all versions of Python): {{{ import sys ... except ValueError: e = sys.exc_info()[1] }}}

Best regards

Adam Karpierz

python@python.pl

Comments (9)

  1. Jason R. Coombs

    Distribute runs 2to3 on all modules before installing on Python 3, which should translate the code to run on Python 3. Are you finding that after installing distribute on Python 3 using the prescribed methods that there is invalid syntax?

  2. Anonymous

    Are you finding that after installing distribute on Python 3 using the prescribed methods that there is invalid syntax?

    Yes. I am sure (for pip) :(. The file is exactly: C:\Python27\Lib\site-packages\setuptools\dist.py

    Full screenshoot:

    C:\>C:\Python32\Scripts\pip install --upgrade distribute
    Downloading/unpacking distribute
      Downloading distribute-0.6.27.tar.gz (624Kb): 624Kb downloaded
      Running setup.py egg_info for package distribute
        Traceback (most recent call last):
          File "<string>", line 3, in <module>
          File "setuptools\__init__.py", line 2, in <module>
            from setuptools.extension import Extension, Library
          File "setuptools\extension.py", line 5, in <module>
            from setuptools.dist import _get_unpatched
          File "setuptools\dist.py", line 103
            except ValueError, e:
                             ^
        SyntaxError: invalid syntax
        Complete output from command python setup.py egg_info:
        Traceback (most recent call last):
    
      File "<string>", line 3, in <module>
    
      File "setuptools\__init__.py", line 2, in <module>
    
        from setuptools.extension import Extension, Library
    
      File "setuptools\extension.py", line 5, in <module>
    
        from setuptools.dist import _get_unpatched
    
      File "setuptools\dist.py", line 103
    
        except ValueError, e:
    
                         ^
    
    SyntaxError: invalid syntax
    
    ----------------------------------------
    Command python setup.py egg_info failed with error code 1
    Storing complete log in C:\Users\adam\AppData\Roaming\pip\pip.log
    
  3. Anonymous

    ..and last part ffom: C:\Users\adam\AppData\Roaming\pip\pip.log (I use pip v.1.1):

    ----------------------------------------
    Command python setup.py egg_info failed with error code 1
    Exception information:
    Traceback (most recent call last):
      File "C:\Python32\lib\site-packages\pip\basecommand.py", line 126, in main
        self.run(options, args)
      File "C:\Python32\lib\site-packages\pip\commands\install.py", line 223, in run
        requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
      File "C:\Python32\lib\site-packages\pip\req.py", line 986, in prepare_files
        req_to_install.run_egg_info()
      File "C:\Python32\lib\site-packages\pip\req.py", line 222, in run_egg_info
        command_desc='python setup.py egg_info')
      File "C:\Python32\lib\site-packages\pip\__init__.py", line 255, in call_subprocess
        % (command_desc, proc.returncode))
    pip.exceptions.InstallationError: Command python setup.py egg_info failed with error code 1
    
  4. Anonymous

    I get the same error when I try to run easy-install.py. Tried fixing it by editing dist.py and putting (ValueError, e), but then I just got a new error, and so on, all things that are 2.x, like the above, leading 0's, exec without brackets,... I installed with "python setup.py install"

  5. Anonymous

    Btw, I tagged all the corrections I have done so far, if it helps, I can make a list of them?

  6. Anonymous

    Well, turns out I'm doing 2to3's work manually here... For some reason nothing got converted?

  7. Log in to comment