1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
Index: /trunk/yolk/yolklib.py
===================================================================
--- /trunk/yolk/yolklib.py (revision 98)
+++ /trunk/yolk/yolklib.py (revision 116)
@@ -91,7 +91,13 @@
-def get_highest_installed(project_name):
- """Return highest version of installed package"""
- return pkg_resources.require(project_name)[0].version
+ def get_highest_installed(self, project_name):
+ """Return highest version of installed package"""
+ #http://tools.assembla.com/yolk/ticket/17
+ #try:
+ # return pkg_resources.require(project_name)[0].version
+ #except pkg_resources.DistributionNotFound:
+ # Do something like:
+ # return "Error: Possibly corrupt egg."
+ return self.environment[project_name][0].version
Index: /trunk/yolk/cli.py
===================================================================
--- /trunk/yolk/cli.py (revision 107)
+++ /trunk/yolk/cli.py (revision 116)
@@ -31,5 +31,5 @@
from yolk import __version__
from yolk.metadata import get_metadata
-from yolk.yolklib import get_highest_installed, get_highest_version, Distributions
+from yolk.yolklib import get_highest_version, Distributions
from yolk.pypi import CheeseShop
from yolk.setuptools_support import get_download_uri
@@ -69,5 +69,5 @@
for pkg in get_pkglist():
for (dist, active) in dists.get_distributions("all", pkg,
- get_highest_installed(pkg)):
+ dists.get_highest_installed(pkg)):
(project_name, versions) = \
pypi.query_versions_pypi(dist.project_name, True)
|