Commit 03a95e19 authored by Reinout van Rees's avatar Reinout van Rees

an error is raised when installing a 0.7 setuptools with distribute

--HG--
branch : distribute
extra : rebase_source : f68fe9818972a09d858f2bb59ef47682353f600d
parent dd2b4ffb
......@@ -7,7 +7,8 @@ CHANGES
-----
* Distribute no longer shadows setuptools if we require a 0.7-series
setuptools.
setuptools. And an error is raised when installing a 0.7 setuptools with
distribute.
* When run from within buildout, no attempt is made to modify an existing
setuptools egg, whether in a shared egg directory or a system setuptools.
......
......@@ -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
......
......@@ -187,10 +187,21 @@ class DistroTests(TestCase):
)
self.assertRaises(UnknownExtra, d.requires, ["foo"])
def testSetuptoolsDistributeCombination(self):
# Ensure that installing a 0.7-series setuptools fails. PJE says that
# it will not co-exist.
ws = WorkingSet([])
d = Distribution(
"/some/path",
project_name="setuptools",
version="0.7a1")
self.assertRaises(ValueError, ws.add, d)
# A 0.6-series is no problem
d2 = Distribution(
"/some/path",
project_name="setuptools",
version="0.6c9")
ws.add(d2)
......
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