[CalendarServer-changes] [3924] CalendarServer/trunk

source_changes at macosforge.org source_changes at macosforge.org
Thu Mar 26 16:43:58 PDT 2009


Revision: 3924
          http://trac.macosforge.org/projects/calendarserver/changeset/3924
Author:   wsanchez at apple.com
Date:     2009-03-26 16:43:58 -0700 (Thu, 26 Mar 2009)
Log Message:
-----------
User version.py

Modified Paths:
--------------
    CalendarServer/trunk/setup.py
    CalendarServer/trunk/support/Makefile.Apple

Modified: CalendarServer/trunk/setup.py
===================================================================
--- CalendarServer/trunk/setup.py	2009-03-26 23:30:32 UTC (rev 3923)
+++ CalendarServer/trunk/setup.py	2009-03-26 23:43:58 UTC (rev 3924)
@@ -19,57 +19,10 @@
 import sys
 import os
 
-#
-# Compute the version number.
-#
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), "support"))
 
-base_version = "2.2"
+from version import version
 
-branches = (
-    "tags/release/CalendarServer-" + base_version,
-    "branches/release/CalendarServer-" + base_version + "-dev",
-    "trunk",
-)
-
-for branch in branches:
-    cmd = "svnversion -n %r %s" % (os.path.dirname(__file__), branch)
-    svnversion = os.popen(cmd)
-    svn_revision = svnversion.read()
-    svnversion.close()
-
-    if "S" in svn_revision:
-        continue
-
-    if branch == "trunk":
-        base_version = "trunk"
-    elif branch.endswith("-dev"):
-        base_version += "-dev"
-
-    if svn_revision == "exported":
-        if "RC_JASPER" in os.environ:
-            # Weird Apple thing: Get the B&I version number from the path
-            if __file__.startswith(os.path.sep):
-                project_name = os.path.basename(os.path.dirname(__file__))
-            else:
-                wd = os.path.dirname(__file__)
-                if wd:
-                    os.chdir(wd)
-                project_name = os.path.basename(os.getcwd())
-
-            prefix = "CalendarServer-"
-
-            if project_name.startswith(prefix):
-                version = version = "%s (%s)" % (base_version, project_name[len(prefix):])
-                break
-
-        version = "%s (unknown)" % (base_version,)
-    else:
-        version = "%s (r%s)" % (base_version, svn_revision)
-
-    break
-else:
-    version = "unknown (%s :: %s)" % (base_version, svn_revision)
-
 def find_modules():
     modules = [
         "twisted.plugins",
@@ -104,8 +57,9 @@
 # Write version file
 #
 
+version_string = "%s (%s)" % version()
 version_file = file(os.path.join("twistedcaldav", "version.py"), "w")
-version_file.write('version = "%s"\n' % (version,))
+version_file.write('version = "%s"\n' % version_string)
 version_file.close()
 
 #
@@ -133,7 +87,7 @@
 
 dist = setup(
     name             = "twistedcaldav",
-    version          = version,
+    version          = version_string,
     description      = description,
     long_description = long_description,
     url              = None,

Modified: CalendarServer/trunk/support/Makefile.Apple
===================================================================
--- CalendarServer/trunk/support/Makefile.Apple	2009-03-26 23:30:32 UTC (rev 3923)
+++ CalendarServer/trunk/support/Makefile.Apple	2009-03-26 23:43:58 UTC (rev 3924)
@@ -125,7 +125,7 @@
 $(BuildDirectory)/$(Project):
 	@echo "Copying source for $(Project)..."
 	$(_v) $(MKDIR) -p "$@"
-	$(_v) pax -rw bin conf Makefile lib-patches setup.py kqreactor.py calendarserver twistedcaldav twext twisted "$@/"
+	$(_v) pax -rw bin conf Makefile lib-patches setup.py kqreactor.py calendarserver twistedcaldav twext twisted support "$@/"
 
 $(BuildDirectory)/%: %.tgz
 	@echo "Extracting source for $(notdir $<)..."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090326/992fa1db/attachment-0001.html>


More information about the calendarserver-changes mailing list