[CalendarServer-changes] [15746] CalendarServer/trunk/bin/_build.sh

source_changes at macosforge.org source_changes at macosforge.org
Thu Jul 7 08:51:15 PDT 2016


Revision: 15746
          http://trac.calendarserver.org//changeset/15746
Author:   cdaboo at apple.com
Date:     2016-07-07 08:51:15 -0700 (Thu, 07 Jul 2016)
Log Message:
-----------
Make sure Twisted patch is applied when the version changes. Remove deprecated pip options.

Modified Paths:
--------------
    CalendarServer/trunk/bin/_build.sh

Modified: CalendarServer/trunk/bin/_build.sh
===================================================================
--- CalendarServer/trunk/bin/_build.sh	2016-07-07 01:36:45 UTC (rev 15745)
+++ CalendarServer/trunk/bin/_build.sh	2016-07-07 15:51:15 UTC (rev 15746)
@@ -717,9 +717,11 @@
 
   ruler "Patching Python requirements";
   echo "";
-  if [ ! -e "${py_virtualenv}/lib/python2.7/site-packages/twisted/.patch_applied" ]; then
+  twisted_version=$("${python}" -c 'from twisted._version import version; print version.base()');
+  if [ ! -e "${py_virtualenv}/lib/python2.7/site-packages/twisted/.patch_applied.${twisted_version}" ]; then
     apply_patches "Twisted" "${py_virtualenv}/lib/python2.7/site-packages"
-    touch "${py_virtualenv}/lib/python2.7/site-packages/twisted/.patch_applied";
+    find "${py_virtualenv}/lib/python2.7/site-packages/twisted" -type f -name '.patch_applied*' -print0 | xargs -0 rm -f;
+    touch "${py_virtualenv}/lib/python2.7/site-packages/twisted/.patch_applied.${twisted_version}";
   fi;
 
   echo "";
@@ -760,7 +762,7 @@
   "${python}" -m pip install               \
     --disable-pip-version-check            \
     --download="${dev_home}/pip_downloads" \
-    --pre --allow-all-external             \
+    --pre                                  \
     --no-cache-dir                         \
     --log-file="${dev_home}/pip.log"       \
     "$@";
@@ -770,7 +772,7 @@
 pip_install_from_cache () {
   "${python}" -m pip install                 \
     --disable-pip-version-check              \
-    --pre --allow-all-external               \
+    --pre                                    \
     --no-index                               \
     --no-cache-dir                           \
     --find-links="${dev_patches}"            \
@@ -783,7 +785,7 @@
 pip_download_and_install () {
   "${python}" -m pip install                 \
     --disable-pip-version-check              \
-    --pre --allow-all-external               \
+    --pre                                    \
     --no-cache-dir                           \
     --find-links="${dev_patches}"            \
     --log-file="${dev_home}/pip.log"         \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20160707/75d094c7/attachment.html>


More information about the calendarserver-changes mailing list