Nicer error when problem in install_requires

#130 Declined
Repository
pypa
Branch
default
Author
  1. Marc Abramowitz
Reviewers
Description

Nicer error when problem in install_requires in setup.py

Instead of:

$ python setup.py egg_info
error in adminweb setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers

We now have the more helpful:

$ python setup.py egg_info
error in adminweb setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers.
Error: Expected version spec in smsdk.authsvc>=0.0.8,2.0 at 2.0

It took me longer than it should to find the problem with the old error message. The new error message would've helped greatly.

Comments (2)

  1. Jason R. Coombs

    Hmm. I also wonder about the newline in the message. I don't see any other usage of passing a newline in a DistutilsSetupError. I suspect it would be better to omit the newline for consistency.

  2. Marc Abramowitz author

    Looks good to me now. Thanks!

    $ python setup.py egg_info
    error in adminweb setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected version spec in smlib.validate>=1.1.1,2.0 at 2.0