diff options
author | tarek <none@none> | 2009-11-11 19:39:04 +0100 |
---|---|---|
committer | tarek <none@none> | 2009-11-11 19:39:04 +0100 |
commit | 4072145aebca513ceaa0d25a64cb60d29842b300 (patch) | |
tree | 925ccdf895da4fda20814a9662dfb25aa2edd52c | |
parent | a0ca582da7e9322a6abc5d4ce028ee631ddbde70 (diff) | |
download | external_python_setuptools-4072145aebca513ceaa0d25a64cb60d29842b300.tar.gz external_python_setuptools-4072145aebca513ceaa0d25a64cb60d29842b300.tar.bz2 external_python_setuptools-4072145aebca513ceaa0d25a64cb60d29842b300.zip |
unknown setuptools version can be added in the working set, refs #90
--HG--
branch : distribute
extra : rebase_source : c0aabd45025465b61ffd23a2196994f4afece233
-rw-r--r-- | CHANGES.txt | 7 | ||||
-rw-r--r-- | distribute.egg-info/entry_points.txt | 1 | ||||
-rw-r--r-- | pkg_resources.py | 6 | ||||
-rw-r--r-- | setuptools/tests/test_resources.py | 15 |
4 files changed, 19 insertions, 10 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 0963b1d8..aa22f5f4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,13 @@ CHANGES ======= ----- +0.6.9 +----- + +* Issue 90: unknown setuptools version can be added in the working set +* + +----- 0.6.8 ----- diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index f4b74da0..1c9f123d 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -52,6 +52,7 @@ test_suite = setuptools.dist:check_test_suite eager_resources = setuptools.dist:assert_string_list zip_safe = setuptools.dist:assert_bool test_loader = setuptools.dist:check_importable +packages = setuptools.dist:check_packages convert_2to3_doctests = setuptools.dist:assert_string_list tests_require = setuptools.dist:check_requirements diff --git a/pkg_resources.py b/pkg_resources.py index 31d83554..96381932 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2253,7 +2253,11 @@ class Distribution(object): loc = loc or self.location if self.project_name == 'setuptools': - if '0.7' in self.version: + try: + version = self.version + except ValueError: + version = '' + if '0.7' in version: raise ValueError( "A 0.7-series setuptools cannot be installed " "with distribute") diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 6a89e8a8..d805d02a 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -203,15 +203,12 @@ class DistroTests(TestCase): version="0.6c9") ws.add(d2) - - - - - - - - - + # a unexisting version needs to work + ws = WorkingSet([]) + d3 = Distribution( + "/some/path", + project_name="setuptools") + ws.add(d3) class EntryPointTests(TestCase): |