[CalendarServer-changes] [13078] CalendarServer/branches/users/sagen/move2who-4/bin/ _calendarserver_preamble.py
source_changes at macosforge.org
source_changes at macosforge.org
Mon Mar 31 18:41:02 PDT 2014
Revision: 13078
http://trac.calendarserver.org//changeset/13078
Author: wsanchez at apple.com
Date: 2014-03-31 18:41:02 -0700 (Mon, 31 Mar 2014)
Log Message:
-----------
obsolete
Removed Paths:
-------------
CalendarServer/branches/users/sagen/move2who-4/bin/_calendarserver_preamble.py
Deleted: CalendarServer/branches/users/sagen/move2who-4/bin/_calendarserver_preamble.py
===================================================================
--- CalendarServer/branches/users/sagen/move2who-4/bin/_calendarserver_preamble.py 2014-04-01 01:23:40 UTC (rev 13077)
+++ CalendarServer/branches/users/sagen/move2who-4/bin/_calendarserver_preamble.py 2014-04-01 01:41:02 UTC (rev 13078)
@@ -1,73 +0,0 @@
-##
-# Copyright (c) 2011-2014 Apple Inc. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-##
-
-"""
-This module is the shared preamble for all calendarserver shell commands to set
-up their environment properly. It's explicitly not installed along with the
-code, and is used only to initialize the environment for a development checkout
-of the code.
-"""
-
-import sys
-from os.path import dirname, abspath, join, split, exists
-from subprocess import Popen, PIPE
-
-
-
-def bootstrap():
- """
- If this is a development checkout, run the 'run' script to discover the
- correct value for sys.path.
- """
-
- home = dirname(dirname(abspath(__file__)))
- pythonWrapper = join(home, "bin", "python")
-
- if not exists(pythonWrapper) or not exists(join(home, "setup.py")):
- # This doesn't look enough like a development checkout; let's not mess
- # with anything.
- return
-
- child = Popen(
- (pythonWrapper, "-c", "import sys; print sys.path"),
- stdout=PIPE
- )
- stdout, _ignore_stderr = child.communicate()
- stdout = stdout.rstrip("\n")
-
- try:
- sysPath = eval(stdout)
- except SyntaxError:
- return
-
- sys.path[0:0] = sysPath
-
- noConfigOption = [
- "calendarserver_bootstrap_database",
- "calendarserver_load_augmentdb",
- "calendarserver_manage_augments",
- "calendarserver_manage_postgres",
- "calendarserver_manage_timezones",
- "icalendar_split",
- "twistd", "trial",
- ]
-
- if split(sys.argv[0])[-1] not in noConfigOption:
- sys.argv[1:1] = ["-f", join(home, "conf", "caldavd-dev.plist")]
-
-
-
-bootstrap()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140331/2d390354/attachment.html>
More information about the calendarserver-changes
mailing list