New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Buildout 2 should have a clearer warning when run with setuptools #82
Comments
👍 for clear error messages. The code itself could look something like has_distribute = pkg_resources.working_set.find(
pkg_resources.Requirement.parse('distribute')) is not None
has_setuptools = pkg_resources.working_set.find(
pkg_resources.Requirement.parse('setuptools')) is not None
if has_setuptools and not has_distribute:
sys.exit("zc.buildout 2.0.0 needs distribute, not setuptools."
" Are you using an outdated bootstrap.py? Make sure"
" you have the latest version downloaded from"
" http://downloads.buildout.org/2/bootstrap.py") |
Now I've got to find a way to test this :-) I get the feeling more and more that it would be handy to add https://pypi.python.org/pypi/mock as a test dependency. |
Yeah that would help greatly... ran into this a couple of times now already. |
I copied Marius' code into #84 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Buildout 2 requires distribute instead of setuptools. The bootstrap guarantees distribute, but we cannot guarantee that the correct bootstrap is being used.
See #81 for how easy it is to miss it and how unclear the error message is:
AttributeError: 'NoneType' object has no attribute 'location'
.Would a special try/except like the following be a good idea?
The text was updated successfully, but these errors were encountered: