Commit 28ff4a9a authored by Jim Fulton's avatar Jim Fulton

Merge pull request #84 from reinout/setuptools-warning

Warn when using an outdated bootstrap that gives you setuptools, fixes 82
parents 380bae09 b4cbb763
...@@ -56,6 +56,17 @@ if is_jython: ...@@ -56,6 +56,17 @@ if is_jython:
import java.lang.System import java.lang.System
jython_os_name = (java.lang.System.getProperties()['os.name']).lower() jython_os_name = (java.lang.System.getProperties()['os.name']).lower()
# Make sure we're not being run with an older bootstrap.py that gives us
# setuptools instead of distribute
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 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")
distribute_loc = pkg_resources.working_set.find( distribute_loc = pkg_resources.working_set.find(
pkg_resources.Requirement.parse('distribute') pkg_resources.Requirement.parse('distribute')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment