From 03a95e191c1e128a04911ae415a36cbcb6ab1901 Mon Sep 17 00:00:00 2001 From: Reinout van Rees Date: Wed, 14 Oct 2009 15:22:44 +0200 Subject: an error is raised when installing a 0.7 setuptools with distribute --HG-- branch : distribute extra : rebase_source : f68fe9818972a09d858f2bb59ef47682353f600d --- pkg_resources.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'pkg_resources.py') diff --git a/pkg_resources.py b/pkg_resources.py index 510be536..c0371864 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2239,8 +2239,11 @@ class Distribution(object): loc = loc or self.location - # TODO: raise error if we're adding setuptools >= 0.7 as that is - # guaranteed to be incompatible with distribute. + if self.project_name == 'setuptools': + if '0.7' in self.version: + raise ValueError( + "A 0.7-series setuptools cannot be installed " + "with distribute") if not loc: return -- cgit v1.2.1