[CalendarServer-changes] [12438] twext/trunk/bin

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


Revision: 12438
          http://trac.calendarserver.org//changeset/12438
Author:   wsanchez at apple.com
Date:     2014-01-23 17:43:49 -0800 (Thu, 23 Jan 2014)
Log Message:
-----------
More work on build tools

Modified Paths:
--------------
    twext/trunk/bin/_build.sh
    twext/trunk/bin/pyflakes
    twext/trunk/bin/python
    twext/trunk/bin/test
    twext/trunk/bin/trial
    twext/trunk/bin/twistd

Modified: twext/trunk/bin/_build.sh
===================================================================
--- twext/trunk/bin/_build.sh	2014-01-23 23:53:58 UTC (rev 12437)
+++ twext/trunk/bin/_build.sh	2014-01-24 01:43:49 UTC (rev 12438)
@@ -100,8 +100,15 @@
 
   mkdir -p "${dep_sources}";
 
+  # Set up virtual environment
+
+  "${bootstrap_python}" -m virtualenv "${dev_root}";
+
+  python="${dev_bindir}/python";
+
   # These variables are defaults for things which might be configured by
   # environment; only set them if they're un-set.
+
   conditional_set wd "$(pwd)";
 
   # Find some hashing commands
@@ -497,9 +504,6 @@
 # Build Python dependencies
 #
 py_dependencies () {
-  mkdir -p "${dev_root}";
-  mkdir -p "${dev_libdir}";
-
   # export PYTHONPATH="${dev_libdir}:${PYTHONPATH:-}"
 
   # export              PATH="${dev_root}/bin:${PATH}";
@@ -510,13 +514,8 @@
   # export DYLD_LIBRARY_PATH="${dev_root}/lib:${dev_root}/lib64:${DYLD_LIBRARY_PATH:-}";
   # export PKG_CONFIG_PATH="${dev_root}/lib/pkgconfig:${PKG_CONFIG_PATH:-}";
 
-  cd "${wd}";
+  # cd "${wd}";
 
-
-  "${bootstrap_python}" -m virtualenv "${dev_root}";
-
-  python="${dev_bindir}/python";
-
   for requirements in "${wd}/requirements/"*; do
 
     ruler "Preparing Python requirements: ${requirements}";

Modified: twext/trunk/bin/pyflakes
===================================================================
--- twext/trunk/bin/pyflakes	2014-01-23 23:53:58 UTC (rev 12437)
+++ twext/trunk/bin/pyflakes	2014-01-24 01:43:49 UTC (rev 12438)
@@ -25,7 +25,13 @@
 
 . "${wd}/bin/_build.sh";
 
-develop;
+init_build > /dev/null;
 
-pip install pyflakes --no-use-wheel --upgrade --target="${dev_libdir}" > "${dev_root}/pip_pyflakes.log" || true;
+if [ $# -eq 0 ]; then
+  set - calendarserver contrib twisted twistedcaldav txdav txweb2;
+fi;
+
+"${python}" -m pip install pyflakes --upgrade >> "${dev_home}/setup.log";
+
+echo "Checking modules:" "$@";
 exec "${python}" -m pyflakes "$@";

Modified: twext/trunk/bin/python
===================================================================
--- twext/trunk/bin/python	2014-01-23 23:53:58 UTC (rev 12437)
+++ twext/trunk/bin/python	2014-01-24 01:43:49 UTC (rev 12438)
@@ -25,6 +25,8 @@
 
 . "${wd}/bin/_build.sh";
 
-develop;
+init_build > /dev/null;
+c_dependencies >> "${dev_root}/setup.log";
+py_dependencies >> "${dev_root}/setup.log";
 
 exec "${python}" "$@";

Modified: twext/trunk/bin/test
===================================================================
--- twext/trunk/bin/test	2014-01-23 23:53:58 UTC (rev 12437)
+++ twext/trunk/bin/test	2014-01-24 01:43:49 UTC (rev 12438)
@@ -25,7 +25,9 @@
 
 . "${wd}/bin/_build.sh";
 
-develop;
+init_build > /dev/null;
+c_dependencies >> "${dev_home}/setup.log";
+py_dependencies >> "${dev_home}/setup.log";
 
 ##
 # Options

Modified: twext/trunk/bin/trial
===================================================================
--- twext/trunk/bin/trial	2014-01-23 23:53:58 UTC (rev 12437)
+++ twext/trunk/bin/trial	2014-01-24 01:43:49 UTC (rev 12438)
@@ -1,13 +1,13 @@
-#!/usr/bin/env python
+#!/bin/sh
 
 ##
-# Copyright (c) 2006-2014 Apple Inc. All rights reserved.
+# Copyright (c) 2005-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
+#     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,
@@ -16,24 +16,17 @@
 # limitations under the License.
 ##
 
-from __future__ import print_function
+set -e
+set -u
 
-import sys
-import os
+wd="$(cd "$(dirname "$0")/.." && pwd)";
 
-#PYTHONPATH
+export TWEXT_DEVELOP="true";
 
-if __name__ == "__main__":
-    if "PYTHONPATH" in globals():
-        sys.path.insert(0, PYTHONPATH)
-    else:
-        try:
-            import _twext_preamble
-        except ImportError:
-            sys.exc_clear()
+. "${wd}/bin/_build.sh";
 
-    for name, value in os.environ.items():
-        print("{0}={1}".format(name, value))
+init_build > /dev/null;
+c_dependencies >> "${dev_home}/setup.log";
+py_dependencies >> "${dev_home}/setup.log";
 
-    from twisted.scripts.trial import run
-    run()
+exec "${dev_bindir}/trial" "$@";

Modified: twext/trunk/bin/twistd
===================================================================
--- twext/trunk/bin/twistd	2014-01-23 23:53:58 UTC (rev 12437)
+++ twext/trunk/bin/twistd	2014-01-24 01:43:49 UTC (rev 12438)
@@ -1,13 +1,13 @@
-#!/usr/bin/env python
+#!/bin/sh
 
 ##
-# Copyright (c) 2006-2014 Apple Inc. All rights reserved.
+# Copyright (c) 2005-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
+#     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,
@@ -16,18 +16,17 @@
 # limitations under the License.
 ##
 
-import sys
+set -e
+set -u
 
-#PYTHONPATH
+wd="$(cd "$(dirname "$0")/.." && pwd)";
 
-if __name__ == "__main__":
-    if "PYTHONPATH" in globals():
-        sys.path.insert(0, PYTHONPATH)
-    else:
-        try:
-            import _twext_preamble
-        except ImportError:
-            sys.exc_clear()
+export TWEXT_DEVELOP="true";
 
-    from twisted.scripts.twistd import run
-    run()
+. "${wd}/bin/_build.sh";
+
+init_build > /dev/null;
+c_dependencies >> "${dev_home}/setup.log";
+py_dependencies >> "${dev_home}/setup.log";
+
+exec "${dev_bindir}/twistd" "$@";
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/150344fb/attachment.html>


More information about the calendarserver-changes mailing list