[CalendarServer-changes] [12260] CalendarServer/trunk/support/py.sh

source_changes at macosforge.org source_changes at macosforge.org
Wed Mar 12 11:24:24 PDT 2014


Revision: 12260
          http://trac.calendarserver.org//changeset/12260
Author:   wsanchez at apple.com
Date:     2014-01-07 14:11:40 -0800 (Tue, 07 Jan 2014)
Log Message:
-----------
Use pkg_resources for look up module versions.
Author: tk at giga.or.at
Fixes (part of) #821

Modified Paths:
--------------
    CalendarServer/trunk/support/py.sh

Modified: CalendarServer/trunk/support/py.sh
===================================================================
--- CalendarServer/trunk/support/py.sh	2014-01-07 22:03:49 UTC (rev 12259)
+++ CalendarServer/trunk/support/py.sh	2014-01-07 22:11:40 UTC (rev 12260)
@@ -110,6 +110,9 @@
     done;
 
     if [ -z "${module_version}" ]; then
+      module_version=$("${python}" -c 'import pkg_resources; print pkg_resources.get_distribution("'"${module}"'").version;');
+    fi;
+    if [ -z "${module_version}" ]; then
       if ! "${print_path}"; then
         echo "Unable to determine version for ${module}.";
       fi;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/d30c3471/attachment.html>


More information about the calendarserver-changes mailing list