diff options
| author | tarek <none@none> | 2009-10-13 17:25:42 +0200 |
|---|---|---|
| committer | tarek <none@none> | 2009-10-13 17:25:42 +0200 |
| commit | 4390fda55407b0fec9cedecc119381a51df09534 (patch) | |
| tree | dd77742a28e6045f6ded26d0cc00023afe0290e3 /pkg_resources.py | |
| parent | 18ab43df7b80c452bdfd3c574f2f6aaf9d0056f8 (diff) | |
| download | python-setuptools-git-4390fda55407b0fec9cedecc119381a51df09534.tar.gz | |
fixed the parsed api when dealing with setuptools name
--HG--
branch : distribute
extra : rebase_source : 9490c98e075e2473c7a7310822103f375d5f3832
Diffstat (limited to 'pkg_resources.py')
| -rw-r--r-- | pkg_resources.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pkg_resources.py b/pkg_resources.py index baee6fc7..2712e9f1 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2497,11 +2497,12 @@ class Requirement: # and if distribute is installed, we want to give # distribute instead if founded_req.project_name == 'setuptools': - try: - return self.parse('distribute') - except ValueError: - return founded_req - return founded_req + distribute = list(parse_requirements('distribute')) + if len(distribute) == 1: + return distribute[0] + return founded_req + else: + return founded_req raise ValueError("Expected only one requirement", s) raise ValueError("No requirements found", s) |
