aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools
diff options
context:
space:
mode:
authorReinout van Rees <reinout@vanrees.org>2009-10-14 14:39:55 +0200
committerReinout van Rees <reinout@vanrees.org>2009-10-14 14:39:55 +0200
commitdd2b4ffb2f582bf8270c0ceed490bf035a9e553b (patch)
treed36166d4eaf3131aa1d204c81ad6335e535a038f /setuptools
parentf0daab74fc160d92ff534af1097c892140f6a46b (diff)
downloadexternal_python_setuptools-dd2b4ffb2f582bf8270c0ceed490bf035a9e553b.tar.gz
external_python_setuptools-dd2b4ffb2f582bf8270c0ceed490bf035a9e553b.tar.bz2
external_python_setuptools-dd2b4ffb2f582bf8270c0ceed490bf035a9e553b.zip
Distribute no longer shadows setuptools if we require a 0.7-series
setuptools. Added _override_setuptools() checker method and calling it in two places that checks whether we request a setuptools from the 0.7 series. Including test. --HG-- branch : distribute extra : rebase_source : 51c89e02721de2e31c9392d1ead76ac1e828810c
Diffstat (limited to 'setuptools')
-rw-r--r--setuptools/tests/test_resources.py24
1 files changed, 22 insertions, 2 deletions
diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py
index d53aef56..c9236e88 100644
--- a/setuptools/tests/test_resources.py
+++ b/setuptools/tests/test_resources.py
@@ -354,8 +354,28 @@ class RequirementsTests(TestCase):
self.failUnless(d("foo-0.3a3.egg") in r2)
self.failUnless(d("foo-0.3a5.egg") in r2)
-
-
+ def testDistributeSetuptoolsOverride(self):
+ # Plain setuptools or distribute mean we return distribute.
+ self.assertEqual(
+ Requirement.parse('setuptools').project_name, 'distribute')
+ self.assertEqual(
+ Requirement.parse('distribute').project_name, 'distribute')
+ # setuptools lower than 0.7 means distribute
+ self.assertEqual(
+ Requirement.parse('setuptools==0.6c9').project_name, 'distribute')
+ self.assertEqual(
+ Requirement.parse('setuptools==0.6c10').project_name, 'distribute')
+ self.assertEqual(
+ Requirement.parse('setuptools>=0.6').project_name, 'distribute')
+ self.assertEqual(
+ Requirement.parse('setuptools < 0.7').project_name, 'distribute')
+ # setuptools 0.7 and higher means setuptools.
+ self.assertEqual(
+ Requirement.parse('setuptools == 0.7').project_name, 'setuptools')
+ self.assertEqual(
+ Requirement.parse('setuptools == 0.7a1').project_name, 'setuptools')
+ self.assertEqual(
+ Requirement.parse('setuptools >= 0.7').project_name, 'setuptools')