diff options
| author | Marc Abramowitz <marc@marc-abramowitz.com> | 2015-05-01 08:23:57 -0700 |
|---|---|---|
| committer | Marc Abramowitz <marc@marc-abramowitz.com> | 2015-05-01 08:23:57 -0700 |
| commit | 33544f0bf806d73495b00b9f8a0e45c25742fbc1 (patch) | |
| tree | 8fa3fc27efbea6a9e206bdae10c047bdafa813f8 /setuptools/dist.py | |
| parent | 13a5cc5bf546b3fcfe7988680e63f680cf8db385 (diff) | |
| download | python-setuptools-git-33544f0bf806d73495b00b9f8a0e45c25742fbc1.tar.gz | |
Nicer error when problem in install_requires
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.
Diffstat (limited to 'setuptools/dist.py')
| -rw-r--r-- | setuptools/dist.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/setuptools/dist.py b/setuptools/dist.py index ffbc7c48..220bcf8c 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -122,11 +122,15 @@ def check_requirements(dist, attr, value): """Verify that install_requires is a valid requirements list""" try: list(pkg_resources.parse_requirements(value)) - except (TypeError,ValueError): + except (TypeError, ValueError) as e: raise DistutilsSetupError( "%r must be a string or list of strings " - "containing valid project/version requirement specifiers" % (attr,) + "containing valid project/version requirement specifiers.\n" + "Error: %s" + % (attr, ' '.join(e.args)) ) + + def check_entry_points(dist, attr, value): """Verify that entry_points map is parseable""" try: |
