[CalendarServer-changes] [14593] CalendarServer/trunk/setup.py
source_changes at macosforge.org
source_changes at macosforge.org
Fri Mar 13 15:36:11 PDT 2015
Revision: 14593
http://trac.calendarserver.org//changeset/14593
Author: sagen at apple.com
Date: 2015-03-13 15:36:11 -0700 (Fri, 13 Mar 2015)
Log Message:
-----------
lstrip doesn't work that way
Modified Paths:
--------------
CalendarServer/trunk/setup.py
Modified: CalendarServer/trunk/setup.py
===================================================================
--- CalendarServer/trunk/setup.py 2015-03-13 22:33:29 UTC (rev 14592)
+++ CalendarServer/trunk/setup.py 2015-03-13 22:36:11 UTC (rev 14593)
@@ -18,11 +18,12 @@
from __future__ import print_function
+import os
from os.path import dirname, basename, abspath, join as joinpath, normpath
+import subprocess
+
+import errno
from setuptools import setup, find_packages as setuptools_find_packages
-import errno
-import os
-import subprocess
from xml.etree import ElementTree
base_version = "7.0"
@@ -72,8 +73,11 @@
entry = info.find("entry")
url = entry.find("url")
root = entry.find("repository").find("root")
- location = url.text.lstrip(root.text)
- project, branch = location.split("/", 1)
+ if url.text.startswith(root.text):
+ location = url.text[len(root.text):].strip("/")
+ else:
+ location = url.text.strip("/")
+ project, branch = location.split("/")
return dict(
root=root.text,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150313/1b3de87f/attachment.html>
More information about the calendarserver-changes
mailing list