Issue101

Title Remove setuptools-specific traceback lines for setup script errors
Priority feature Status chatting
Superseder Nosy List pje, techtonik
Assigned To Keywords

Created on 2010-01-03.10:42:55 by techtonik, last changed 2010-02-01.18:14:09 by pje.

Messages
msg497 (view) Author: pje Date: 2010-02-01.18:14:09
In that case, you have reported a bug to the wrong tracker.  ;-) The error has nothing to do with setuptools, it is simply that there is no os.symlink function on Windows, and the readline package's setup.py does not check for this.  There is no way for setuptools to trap every possible error that might be generated by a setup script.

It is also an intentional design choice that broken setup scripts break in a way that does not interfere with the original setup script author finding the problem, by still including the original error message.  If setuptools tried to clean up the error message too much, it would actually be more likely that package authors would think the error was in setuptools, rather than in their setup script.

That being said, it might be useful in the case of errors like this one to shorten the traceback, such that none of the setuptools part is included.  In the current case, perhaps something like:

Error running setup script:
  File "setup.py", line 93, in <module>
AttributeError: 'module' object has no attribute 'symlink'

would suffice, since all the other traceback lines would be the same every time a setup script error occurs.

So, you make a good point.  I'm refiling this as a feature request, and changing the issue title to reflect the actual work to be done.  Thanks!
msg490 (view) Author: techtonik Date: 2010-02-01.17:46:28
The problem is not with readline, but with stack trace. There should be a sane user friendly error message.
msg486 (view) Author: pje Date: 2010-02-01.17:16:49
The readline package does not run on Windows; note that its PyPI homepage recommends using the pyreadline package instead.
msg484 (view) Author: techtonik Date: 2010-01-03.10:42:54
Python 2.6 on Vista

C:\Python26\Scripts>python -m easy_install readline
Searching for readline
Reading http://pypi.python.org/simple/readline/
Reading http://www.python.org/
Best match: readline 2.6.4
Downloading http://pypi.python.org/packages/source/r/readline/readline-2.6.4.tar.gz#md5=7568e8b78f383443ba57c9afec6f4285
Processing readline-2.6.4.tar.gz
Running readline-2.6.4\setup.py -q bdist_egg --dist-dir c:\users\myuser\appdata\local\temp\easy_install-yxalev\readline-2.6.4\egg-dist-tmp-7rtcal
The system cannot find the path specified.
Traceback (most recent call last):
  File "C:\Python26\lib\runpy.py", line 122, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\Python26\lib\runpy.py", line 34, in _run_code
    exec code in run_globals
  File "C:\Python26\lib\site-packages\setuptools-0.6c11-py2.6.egg\easy_install.py", line 5, in <module>
  File "C:\Python26\lib\site-packages\setuptools-0.6c11-py2.6.egg\setuptools\command\easy_install.py", line 1712, in main
  File "C:\Python26\lib\site-packages\setuptools-0.6c11-py2.6.egg\setuptools\command\easy_install.py", line 1700, in with_ei_usage
  File "C:\Python26\lib\site-packages\setuptools-0.6c11-py2.6.egg\setuptools\command\easy_install.py", line 1716, in <lambda>
  File "C:\Python26\lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "C:\Python26\lib\distutils\dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "C:\Python26\lib\distutils\dist.py", line 995, in run_command
    cmd_obj.run()
  File "C:\Python26\lib\site-packages\setuptools-0.6c11-py2.6.egg\setuptools\command\easy_install.py", line 211, in run
  File "C:\Python26\lib\site-packages\setuptools-0.6c11-py2.6.egg\setuptools\command\easy_install.py", line 446, in easy_install
  File "C:\Python26\lib\site-packages\setuptools-0.6c11-py2.6.egg\setuptools\command\easy_install.py", line 476, in install_item
  File "C:\Python26\lib\site-packages\setuptools-0.6c11-py2.6.egg\setuptools\command\easy_install.py", line 655, in install_eggs
  File "C:\Python26\lib\site-packages\setuptools-0.6c11-py2.6.egg\setuptools\command\easy_install.py", line 930, in build_and_install
  File "C:\Python26\lib\site-packages\setuptools-0.6c11-py2.6.egg\setuptools\command\easy_install.py", line 919, in run_setup
  File "C:\Python26\lib\site-packages\setuptools-0.6c11-py2.6.egg\setuptools\sandbox.py", line 62, in run_setup
  File "C:\Python26\lib\site-packages\setuptools-0.6c11-py2.6.egg\setuptools\sandbox.py", line 105, in run
  File "C:\Python26\lib\site-packages\setuptools-0.6c11-py2.6.egg\setuptools\sandbox.py", line 64, in <lambda>
  File "setup.py", line 93, in <module>
AttributeError: 'module' object has no attribute 'symlink'
History
Date User Action Args
2010-02-01 18:14:09pjesetmessages: + msg497
title: Traceback when installing readline -> Remove setuptools-specific traceback lines for setup script errors
2010-02-01 17:47:21sridsetpriority: bug -> feature
nosy: - srid
2010-02-01 17:46:28techtoniksetstatus: resolved -> chatting
messages: + msg490
2010-02-01 17:16:50pjesetstatus: unread -> resolved
nosy: + pje
messages: + msg486
2010-01-05 06:45:51sridsetnosy: + srid
2010-01-03 10:42:55techtonikcreate