<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[13256] CalendarServer/trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.calendarserver.org//changeset/13256">13256</a></dd>
<dt>Author</dt> <dd>wsanchez@apple.com</dd>
<dt>Date</dt> <dd>2014-04-10 17:05:17 -0700 (Thu, 10 Apr 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add pip_download().
Rename ${py_modules} -&gt; ${py_virtualenv}.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#CalendarServertrunkbin_buildsh">CalendarServer/trunk/bin/_build.sh</a></li>
<li><a href="#CalendarServertrunksupportApplemake">CalendarServer/trunk/support/Apple.make</a></li>
<li><a href="#CalendarServertrunksupportsubmit">CalendarServer/trunk/support/submit</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalendarServertrunkbin_buildsh"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/bin/_build.sh (13255 => 13256)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/bin/_build.sh        2014-04-11 00:04:37 UTC (rev 13255)
+++ CalendarServer/trunk/bin/_build.sh        2014-04-11 00:05:17 UTC (rev 13256)
</span><span class="lines">@@ -79,9 +79,9 @@
</span><span class="cx">   dep_packages=&quot;${dev_home}/pkg&quot;;
</span><span class="cx">    dep_sources=&quot;${dev_home}/src&quot;;
</span><span class="cx"> 
</span><del>-    py_root=&quot;${dev_roots}/py_modules&quot;;
-  py_libdir=&quot;${py_root}/lib/python&quot;;
-  py_bindir=&quot;${py_root}/bin&quot;;
</del><ins>+  py_virtualenv=&quot;${dev_home}/virtualenv&quot;;
+      py_libdir=&quot;${py_virtualenv}/lib/python&quot;;
+      py_bindir=&quot;${py_virtualenv}/bin&quot;;
</ins><span class="cx"> 
</span><span class="cx">   python=&quot;${py_bindir}/python&quot;;
</span><span class="cx"> 
</span><span class="lines">@@ -91,8 +91,8 @@
</span><span class="cx">     dep_packages=&quot;${TWEXT_PKG_CACHE}&quot;;
</span><span class="cx">   fi;
</span><span class="cx"> 
</span><del>-  if [ ! -d &quot;${py_root}&quot; ]; then
-    &quot;${bootstrap_python}&quot; -m virtualenv &quot;${py_root}&quot;;
</del><ins>+  if [ ! -d &quot;${py_virtualenv}&quot; ]; then
+    &quot;${bootstrap_python}&quot; -m virtualenv &quot;${py_virtualenv}&quot;;
</ins><span class="cx">   fi;
</span><span class="cx"> 
</span><span class="cx">   project=&quot;$(setup_print name)&quot;;
</span><span class="lines">@@ -589,7 +589,7 @@
</span><span class="cx"> # Build Python dependencies
</span><span class="cx"> #
</span><span class="cx"> py_dependencies () {
</span><del>-  export PATH=&quot;${py_root}/bin:${PATH}&quot;;
</del><ins>+  export PATH=&quot;${py_virtualenv}/bin:${PATH}&quot;;
</ins><span class="cx">   export PYTHON=&quot;${python}&quot;;
</span><span class="cx">   export PYTHONPATH=&quot;${wd}:${PYTHONPATH:-}&quot;;
</span><span class="cx"> 
</span><span class="lines">@@ -611,10 +611,10 @@
</span><span class="cx"> 
</span><span class="cx">   if &quot;${force_setup}&quot;; then
</span><span class="cx">     # Nuke the virtual environment first
</span><del>-    rm -rf &quot;${py_root}&quot;;
</del><ins>+    rm -rf &quot;${py_virtualenv}&quot;;
</ins><span class="cx">   fi;
</span><span class="cx"> 
</span><del>-  &quot;${bootstrap_python}&quot; -m virtualenv &quot;${py_root}&quot;;
</del><ins>+  &quot;${bootstrap_python}&quot; -m virtualenv &quot;${py_virtualenv}&quot;;
</ins><span class="cx"> 
</span><span class="cx">   # Make sure setup got called enough to write the version file.
</span><span class="cx"> 
</span><span class="lines">@@ -626,16 +626,14 @@
</span><span class="cx">     pip_install=&quot;pip_download_and_install&quot;;
</span><span class="cx">   fi;
</span><span class="cx"> 
</span><del>-  local requirements=&quot;${wd}/requirements.txt&quot;;
-
</del><span class="cx">   ruler &quot;Preparing Python requirements&quot;;
</span><span class="cx">   echo &quot;&quot;;
</span><del>-  &quot;${pip_install}&quot; &quot;--requirement=${requirements}&quot;;
</del><ins>+  &quot;${pip_install}&quot; --requirement=&quot;${wd}/requirements.txt&quot;;
</ins><span class="cx"> 
</span><span class="cx">   for option in $(&quot;${python}&quot; -c 'import setup; print &quot;\n&quot;.join(setup.extras_requirements.keys())'); do
</span><span class="cx">     ruler &quot;Preparing Python requirements for optional feature: ${option}&quot;;
</span><span class="cx">     echo &quot;&quot;;
</span><del>-    if ! &quot;${pip_install}&quot; &quot;--editable=${wd}[${option}]&quot;; then
</del><ins>+    if ! &quot;${pip_install}&quot; --editable=&quot;${wd}[${option}]&quot;; then
</ins><span class="cx">       echo &quot;Feature ${option} is optional; continuing.&quot;;
</span><span class="cx">     fi;
</span><span class="cx">   done;
</span><span class="lines">@@ -644,6 +642,17 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+pip_download () {
+  mkdir -p &quot;${dev_home}/pip_downloads&quot;;
+
+  &quot;${python}&quot; -m pip install                  \
+    --download=&quot;${dev_home}/pip_downloads&quot;    \
+    --pre --allow-all-external                \
+    --log=&quot;${dev_home}/pip.log&quot;               \
+    &quot;$@&quot;;
+}
+
+
</ins><span class="cx"> pip_install_from_cache () {
</span><span class="cx">   &quot;${python}&quot; -m pip install                 \
</span><span class="cx">     --find-links=&quot;${dev_home}/pip_downloads&quot; \
</span><span class="lines">@@ -655,7 +664,8 @@
</span><span class="cx"> 
</span><span class="cx"> pip_download_and_install () {
</span><span class="cx">   &quot;${python}&quot; -m pip install                  \
</span><del>-    --pre --upgrade                           \
</del><ins>+    --upgrade                                 \
+    --pre --allow-all-external                \
</ins><span class="cx">     --download-cache=&quot;${dev_home}/pip_cache&quot;  \
</span><span class="cx">     --log=&quot;${dev_home}/pip.log&quot;               \
</span><span class="cx">     &quot;$@&quot;;
</span></span></pre></div>
<a id="CalendarServertrunksupportApplemake"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/support/Apple.make (13255 => 13256)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/support/Apple.make        2014-04-11 00:04:37 UTC (rev 13255)
+++ CalendarServer/trunk/support/Apple.make        2014-04-11 00:05:17 UTC (rev 13256)
</span><span class="lines">@@ -134,10 +134,10 @@
</span><span class="cx"> #install:: install-ossfiles
</span><span class="cx"> 
</span><span class="cx"> install-ossfiles::
</span><del>-        $(_v) $(INSTALL_DIRECTORY) $(DSTROOT)/$(OSV);
-        $(_v) $(INSTALL_FILE) $(Sources)/$(ProjectName).plist $(DSTROOT)/$(OSV)/$(ProjectName).plist;
-        $(_v) $(INSTALL_DIRECTORY) $(DSTROOT)/$(OSL);
-        $(_v) $(INSTALL_FILE) $(BuildDirectory)/$(Project)/LICENSE $(DSTROOT)/$(OSL)/$(ProjectName).txt;
</del><ins>+        $(_v) $(INSTALL_DIRECTORY) &quot;$(DSTROOT)/$(OSV)&quot;;
+        $(_v) $(INSTALL_FILE) &quot;$(Sources)/$(ProjectName).plist&quot; &quot;$(DSTROOT)/$(OSV)/$(ProjectName).plist&quot;;
+        $(_v) $(INSTALL_DIRECTORY) &quot;$(DSTROOT)/$(OSL)&quot;;
+        $(_v) $(INSTALL_FILE) &quot;$(BuildDirectory)/$(Project)/LICENSE&quot; &quot;$(DSTROOT)/$(OSL)/$(ProjectName).txt&quot;;
</ins><span class="cx"> 
</span><span class="cx"> #
</span><span class="cx"> # B&amp;I Hooey
</span><span class="lines">@@ -145,8 +145,8 @@
</span><span class="cx"> 
</span><span class="cx"> cache_deps::
</span><span class="cx">         @echo &quot;Downloading dependencies...&quot;;
</span><del>-        $(_v) if [ ! -d requirements/cache ]; then ./support/_cache_deps ]; fi;
</del><ins>+        $(_v) if [ ! -d &quot;$(Sources)/requirements/cache&quot; ]; then &quot;$(Sources)/support/_cache_deps&quot; ]; fi;
</ins><span class="cx"> 
</span><span class="cx"> buildit: cache_deps
</span><span class="cx">         @echo &quot;Running buildit...&quot;;
</span><del>-        $(_v) sudo ~rc/bin/buildit $(CC_Archs) $(Sources);
</del><ins>+        $(_v) sudo ~rc/bin/buildit $(CC_Archs) &quot;$(Sources)&quot;;
</ins></span></pre></div>
<a id="CalendarServertrunksupportsubmit"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/support/submit (13255 => 13256)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/support/submit        2014-04-11 00:04:37 UTC (rev 13255)
+++ CalendarServer/trunk/support/submit        2014-04-11 00:05:17 UTC (rev 13256)
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx">   echo &quot;Copying ${src}...&quot;;
</span><span class="cx">   ignores=&quot;$(mktemp -t CalendarServer_ignores)&quot;;
</span><span class="cx">   svn st --no-ignore | sed -n -e 's|^I...... ||p' &gt; &quot;${ignores}&quot;;
</span><del>-  rsync -av --exclude=&quot;.svn&quot; --exclude=&quot;_trial_temp&quot; --exclude=&quot;*.pyc&quot; --exclude=&quot;*.so&quot; --exclude-from=&quot;${ignores}&quot; &quot;${src}/&quot; &quot;${wc}&quot;;
</del><ins>+  rsync -av --exclude=&quot;.svn&quot; --exclude-from=&quot;${ignores}&quot; &quot;${src}/&quot; &quot;${wc}&quot;;
</ins><span class="cx">   rm &quot;${ignores}&quot;;
</span><span class="cx"> else
</span><span class="cx">   echo &quot;&quot;;
</span><span class="lines">@@ -205,6 +205,7 @@
</span><span class="cx">     fi;
</span><span class="cx">   fi;
</span><span class="cx"> else
</span><ins>+  echo &quot;${wc}&quot;; exit 1;
</ins><span class="cx">   echo &quot;&quot;;
</span><span class="cx">   echo &quot;Submitting sources for ${project_version}...&quot;;
</span><span class="cx">   rm -rf &quot;${wc}/.dependencies&quot;;
</span></span></pre>
</div>
</div>

</body>
</html>