[CalendarServer-changes] [12203] twext/trunk

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


Revision: 12203
          http://trac.calendarserver.org//changeset/12203
Author:   wsanchez at apple.com
Date:     2013-12-23 16:37:41 -0800 (Mon, 23 Dec 2013)
Log Message:
-----------
setup_requirements isn't useful outside of setuptools...
test script now installs pyflakes for itself.

Modified Paths:
--------------
    twext/trunk/python
    twext/trunk/setup.py
    twext/trunk/test

Added Paths:
-----------
    twext/trunk/develop

Added: twext/trunk/develop
===================================================================
--- twext/trunk/develop	                        (rev 0)
+++ twext/trunk/develop	2013-12-24 00:37:41 UTC (rev 12203)
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+##
+# Copyright (c) 2005-2013 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.
+##
+
+set -e
+set -u
+
+wd="$(cd "$(dirname "$0")" && pwd)";
+
+if [ -n "${PYTHON:-}" ]; then
+  python="${PYTHON}";
+else
+  python=python;
+fi;
+
+##
+# Enable development mode
+##
+
+dev_root="${wd}/.develop";
+dev_libdir="${dev_root}/lib";
+dev_bindir="${dev_root}/bin";
+
+mkdir -p "${dev_root}";
+mkdir -p "${dev_libdir}";
+
+export PYTHONPATH="${dev_libdir}:${PYTHONPATH:-}"
+
+cd "${wd}" && ./setup.py develop  \
+  -d "${dev_libdir}"              \
+  -s "${dev_bindir}"              \
+  > "${dev_root}/setup.log" 2>&1;


Property changes on: twext/trunk/develop
___________________________________________________________________
Added: svn:executable
   + *

Modified: twext/trunk/python
===================================================================
--- twext/trunk/python	2013-12-23 23:44:54 UTC (rev 12202)
+++ twext/trunk/python	2013-12-24 00:37:41 UTC (rev 12203)
@@ -21,28 +21,6 @@
 
 wd="$(cd "$(dirname "$0")" && pwd)";
 
-if [ -n "${PYTHON:-}" ]; then
-  python="${PYTHON}";
-else
-  python=python;
-fi;
+. "${wd}/develop";
 
-##
-# Enable development mode
-##
-
-mkdir -p "${wd}/.develop";
-mkdir -p "${wd}/.develop/lib";
-
-export PYTHONPATH="${wd}/.develop/lib:${PYTHONPATH:-}"
-
-cd "${wd}" && ./setup.py develop  \
-  -d "${wd}/.develop/lib"         \
-  -s "${wd}/.develop/bin"         \
-  > "${wd}/.develop/setup.log" 2>&1;
-
-##
-# Run python
-##
-
 exec "${python}" "$@";

Modified: twext/trunk/setup.py
===================================================================
--- twext/trunk/setup.py	2013-12-23 23:44:54 UTC (rev 12202)
+++ twext/trunk/setup.py	2013-12-24 00:37:41 UTC (rev 12203)
@@ -105,7 +105,6 @@
 #
 
 setup_requirements = [
-    "pyflakes",
 ]
 
 install_requirements = [

Modified: twext/trunk/test
===================================================================
--- twext/trunk/test	2013-12-23 23:44:54 UTC (rev 12202)
+++ twext/trunk/test	2013-12-24 00:37:41 UTC (rev 12203)
@@ -21,6 +21,8 @@
 
 wd="$(cd "$(dirname "$0")" && pwd -L)";
 
+. "${wd}/develop";
+
 ##
 # Options
 ##
@@ -87,21 +89,6 @@
 
 
 ##
-# Enable development mode
-##
-
-mkdir -p "${wd}/.develop";
-mkdir -p "${wd}/.develop/lib";
-
-export PYTHONPATH="${wd}/.develop/lib:${PYTHONPATH:-}"
-
-cd "${wd}" && ./setup.py develop  \
-  -d "${wd}/.develop/lib"         \
-  -s "${wd}/.develop/bin"         \
-  > "${wd}/.develop/setup.log" 2>&1;
-
-
-##
 # Unit tests
 ##
 
@@ -124,8 +111,10 @@
 
 echo "";
 echo "Running pyflakes...";
+
+pip install pyflakes --target="${dev_libdir}" > "${dev_root}/pip_pyflakes.log";
 tmp="$(mktemp -t "twext_flakes.XXXXX")";
-cd "${wd}" && ./pyflakes ${test_modules} | tee "${tmp}" 2>&1;
+cd "${wd}" && "${python}" -m pyflakes ${test_modules} | tee "${tmp}" 2>&1;
 if [ -s "${tmp}" ]; then
   echo "**** Pyflakes says you have some code to clean up. ****";
   exit 1;
@@ -137,6 +126,8 @@
 # Empty files
 ##
 
+echo "";
+echo "Checking for empty files...";
 tmp="$(mktemp -t "twext_test_empty.XXXXX")";
 find "${wd}" '!' '(' -type d '(' -path '*/.*' -or -name data -or -name build ')' -prune ')' -type f -size 0 > "${tmp}";
 if [ -s "${tmp}" ]; then
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/64ef93ee/attachment.html>


More information about the calendarserver-changes mailing list