Skip to content
Snippets Groups Projects
Commit 20d438c6 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Updated bootstrap for compatibility with setuptools

parent da1700f5
No related branches found
No related tags found
No related merge requests found
...@@ -35,7 +35,7 @@ Bootstraps a buildout-based project. ...@@ -35,7 +35,7 @@ Bootstraps a buildout-based project.
Simply run this script in a directory containing a buildout.cfg, using the Simply run this script in a directory containing a buildout.cfg, using the
Python that you want bin/buildout to use. Python that you want bin/buildout to use.
Note that by using --find-links to point to local resources, you can keep Note that by using --find-links to point to local resources, you can keep
this script from going over the network. this script from going over the network.
''' '''
...@@ -90,6 +90,19 @@ except ImportError: ...@@ -90,6 +90,19 @@ except ImportError:
if path not in pkg_resources.working_set.entries: if path not in pkg_resources.working_set.entries:
pkg_resources.working_set.add_entry(path) pkg_resources.working_set.add_entry(path)
######################################################################
# Try to best guess the version of buildout given setuptools
if options.version is None:
try:
from distutils.version import LooseVersion
package = pkg_resources.require('setuptools')[0]
v = LooseVersion(package.version)
if v < LooseVersion('0.7'):
options.version = '2.1.1'
except:
pass
###################################################################### ######################################################################
# Install buildout # Install buildout
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment