<!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>[13339] 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/13339">13339</a></dd>
<dt>Author</dt> <dd>wsanchez@apple.com</dd>
<dt>Date</dt> <dd>2014-04-19 12:25:10 -0700 (Sat, 19 Apr 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Work on internal build thingos</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#CalendarServertrunksupportApplemake">CalendarServer/trunk/support/Apple.make</a></li>
<li><a href="#CalendarServertrunksupport_cache_deps">CalendarServer/trunk/support/_cache_deps</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#CalendarServertrunkrequirementsappletxt">CalendarServer/trunk/requirements-apple.txt</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalendarServertrunkrequirementsappletxt"></a>
<div class="addfile"><h4>Added: CalendarServer/trunk/requirements-apple.txt (0 => 13339)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/requirements-apple.txt                                (rev 0)
+++ CalendarServer/trunk/requirements-apple.txt        2014-04-19 19:25:10 UTC (rev 13339)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+-e svn+https://svn.calendarserver.org/repository/calendarserver/CalendarServer/trunk@13325#egg=CalendarServer-6.0b.trunk_r13316_13321-py2.7-dev_r13325
+PyGreSQL==4.1.1
+Twisted==13.2.0
+cffi==0.8.2
+funcparserlib==0.3.6
+-e svn+http://svn.calendarserver.org/repository/calendarserver/PyKerberos/trunk@13311#egg=kerberos-1.1.1-py2.7-dev_r13311
+psutil==2.1.0
+pyasn1==0.1.7
+pycparser==2.10
+pycrypto==2.6.1
+python-ldap==2.4.15
+setproctitle==1.1.8
+sqlparse==0.1.2
+-e svn+http://svn.calendarserver.org/repository/calendarserver/twext/trunk@13311#egg=twextpy-0.1b.trunk_r13311-py2.7-dev_r13311
+wheel==0.23.0
+--editable svn+http://svn.calendarserver.org/repository/calendarserver/PyCalendar/trunk@13311#egg=pycalendar
</ins><span class="cx">Property changes on: CalendarServer/trunk/requirements-apple.txt
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="CalendarServertrunksupportApplemake"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/support/Apple.make (13338 => 13339)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/support/Apple.make        2014-04-19 16:02:21 UTC (rev 13338)
+++ CalendarServer/trunk/support/Apple.make        2014-04-19 19:25:10 UTC (rev 13339)
</span><span class="lines">@@ -43,9 +43,11 @@
</span><span class="cx"> CALDAVDSUBDIR = /caldavd
</span><span class="cx"> 
</span><span class="cx"> PYTHON = $(USRBINDIR)/python2.7
</span><del>-CS_SHAREDIR = $(SHAREDIR)$(CALDAVDSUBDIR)
-CS_PY_LIBS = $(CS_SHAREDIR)/lib/python
-CS_LIBEXEC = $(SIPP)$(LIBEXECDIR)$(CALDAVDSUBDIR)
</del><ins>+CS_VIRTUALENV = $(SIPP)$(NSLOCALDIR)$(NSLIBRARYSUBDIR)/CalendarServer
+
+# CS_SHAREDIR = $(SHAREDIR)$(CALDAVDSUBDIR)
+# CS_PY_LIBS = $(CS_SHAREDIR)/lib/python
+# CS_LIBEXEC = $(SIPP)$(LIBEXECDIR)$(CALDAVDSUBDIR)
</ins><span class="cx"> # PY_INSTALL_FLAGS = --root=&quot;$(DSTROOT)&quot; --prefix=&quot;$(SIPP)&quot; --install-lib=&quot;$(CS_PY_LIBS)&quot; --install-scripts=&quot;$(CS_LIBEXEC)&quot;
</span><span class="cx"> # CS_INSTALL_FLAGS = --install-scripts=&quot;$(SIPP)$(USRSBINDIR)&quot; --install-data=&quot;$(SIPP)$(ETCDIR)&quot;
</span><span class="cx"> # CS_BUILD_EXT_FLAGS = --include-dirs=&quot;$(SIPP)/usr/include&quot; --library-dirs=&quot;$(SIPP)/usr/lib&quot;
</span><span class="lines">@@ -60,33 +62,71 @@
</span><span class="cx"> .phony: build install install_source install-ossfiles cache_deps buildit
</span><span class="cx"> 
</span><span class="cx"> build:: $(BuildDirectory)/$(Project)
</span><del>-        # @echo &quot;Building $(Project)...&quot;;
-        # $(_v) cd $(BuildDirectory)/$(Project) &amp;&amp; $(Environment) $(PYTHON) setup.py build
</del><span class="cx"> 
</span><del>-install:: build
-        # $(_v) cd $(BuildDirectory)/$(Project) &amp;&amp; \
-        #         $(Environment) $(PYTHON) setup.py \
-        #         build_ext $(CS_BUILD_EXT_FLAGS) \
-        #         install $(PY_INSTALL_FLAGS) $(CS_INSTALL_FLAGS) \
-        #         
</del><ins>+build-no::
+        @echo &quot;Building $(Project)...&quot;;
+        $(_v) cd $(BuildDirectory)/$(Project) &amp;&amp; $(Environment) $(PYTHON) setup.py build
+
+install:: install-python
+install-python:: build
+        @#
+        @# Set up a virtual environment in Server.app; we'll install into that.
+        @# Use --system-site-packages so that we use the packages provided by the OS.
+        @#
+        @echo &quot;Creating virtual environment...&quot;;
+        $(_v) $(RMDIR) &quot;$(DSTROOT)$(CS_VIRTUALENV)&quot;;
+        $(_v) $(PYTHON) -m virtualenv --system-site-packages &quot;$(DSTROOT)$(CS_VIRTUALENV)&quot;;
+        @#
+        @# Use the pip in the virtual environment to install.
+        @# It knows about where things go in the virtual environment.
+        @#
</ins><span class="cx">         @echo &quot;Installing Python packages...&quot;;
</span><del>-        $(_v) $(PYTHON) -m pip install                                          \
-               --pre --allow-all-external --no-index                               \
-        --find-links &quot;$(Sources)/.develop/pip_downloads&quot;                    \
-            --editable &quot;$(BuildDirectory)/$(Project)[OpenDirectory,Postgres]&quot;   \
-                --install-option --root=&quot;$(DSTROOT)&quot;                                \
-                --install-option --prefix=&quot;$(SIPP)&quot;                                 \
-                --install-option --install-lib=&quot;$(CS_PY_LIBS)&quot;                      \
-                --install-option --install-scripts=&quot;$(CS_LIBEXEC)&quot;                  \
-                
-        @echo &quot;Cleaning up...&quot;;
-        $(_v) for so in $$(find &quot;$(DSTROOT)$(CS_SHAREDIR)/lib&quot; -type f -name '*.so'); do $(STRIP) -Sx &quot;$${so}&quot;; done;
-        $(_v) $(INSTALL_DIRECTORY) &quot;$(DSTROOT)$(SIPP)$(ETCDIR)$(CALDAVDSUBDIR)&quot;;
-        $(_v) $(INSTALL_FILE) &quot;$(Sources)/conf/caldavd-apple.plist&quot; &quot;$(DSTROOT)$(SIPP)$(ETCDIR)$(CALDAVDSUBDIR)/caldavd-apple.plist&quot;;
-        $(_v) chmod -R ugo+r &quot;$(DSTROOT)$(CS_SHAREDIR)&quot;;
-        $(_v) for f in $$(find &quot;$(DSTROOT)$(SIPP)$(ETCDIR)&quot; -type f ! -name '*.default'); do cp &quot;$${f}&quot; &quot;$${f}.default&quot;; done;
</del><ins>+        $(_v) &quot;$(DSTROOT)$(CS_VIRTUALENV)/bin/pip&quot; install                       \
+        --pre --allow-all-external --no-index                                \
+        --find-links=&quot;$(Sources)/.develop/pip_downloads&quot;                     \
+            --requirement=&quot;$(BuildDirectory)/$(Project)/requirements-apple.txt&quot;  \
+            ;
+        @#
+        @# Make the virtualenv relocatable
+        @#
+        @echo &quot;Making virtual environment relocatable...&quot;;
+        $(PYTHON) -m virtualenv --relocatable &quot;$(DSTROOT)$(CS_VIRTUALENV)&quot;;
+        @#
+        @# Clean up
+        @#
+        @echo &quot;Cleaning up virtual environment...&quot;;
+        $(_v) $(FIND) &quot;$(DSTROOT)$(CS_VIRTUALENV)&quot; -type d -name .svn -print0 | xargs -0 rm -rf;
+        $(_v) $(FIND) &quot;$(DSTROOT)$(CS_VIRTUALENV)&quot; -type f -name '*.so' -print0 | xargs -0 $(STRIP) -Sx;
+        $(_v) $(INSTALL_DIRECTORY) &quot;$(DSTROOT)$(CS_VIRTUALENV)/etc&quot;;
+        $(_v) $(INSTALL_FILE) &quot;$(Sources)/conf/caldavd-apple.plist&quot; &quot;$(DSTROOT)$(CS_VIRTUALENV)/etc/caldavd.plist&quot;;
</ins><span class="cx"> 
</span><del>-install::
</del><ins>+
+# install-oldish::
+#         @echo &quot;Installing Python packages...&quot;;
+#         $(_v) $(PYTHON) -m pip install                                          \
+#         --pre --allow-all-external --no-index                               \
+#         --find-links &quot;$(Sources)/.develop/pip_downloads&quot;                    \
+#             --editable &quot;$(BuildDirectory)/$(Project)[OpenDirectory,Postgres]&quot;   \
+#                 --install-option --root=&quot;$(DSTROOT)&quot;                                \
+#                 --install-option --prefix=&quot;$(SIPP)&quot;                                 \
+#                 --install-option --install-lib=&quot;$(CS_PY_LIBS)&quot;                      \
+#                 --install-option --install-scripts=&quot;$(CS_LIBEXEC)&quot;                  \
+#                 --ignore-installed                                                                                                        \
+#                 
+#         $(_v) cd $(BuildDirectory)/$(Project) &amp;&amp; \
+#                 $(Environment) $(PYTHON) setup.py \
+#                 build_ext $(CS_BUILD_EXT_FLAGS) \
+#                 install $(PY_INSTALL_FLAGS) $(CS_INSTALL_FLAGS) \
+#                 
+#         @echo &quot;Cleaning up...&quot;;
+#         $(_v) for so in $$(find &quot;$(DSTROOT)$(CS_SHAREDIR)/lib&quot; -type f -name '*.so'); do $(STRIP) -Sx &quot;$${so}&quot;; done;
+#         $(_v) $(INSTALL_DIRECTORY) &quot;$(DSTROOT)$(SIPP)$(ETCDIR)$(CALDAVDSUBDIR)&quot;;
+#         $(_v) $(INSTALL_FILE) &quot;$(Sources)/conf/caldavd-apple.plist&quot; &quot;$(DSTROOT)$(SIPP)$(ETCDIR)$(CALDAVDSUBDIR)/caldavd-apple.plist&quot;;
+#         $(_v) chmod -R ugo+r &quot;$(DSTROOT)$(CS_SHAREDIR)&quot;;
+#         $(_v) for f in $$(find &quot;$(DSTROOT)$(SIPP)$(ETCDIR)&quot; -type f ! -name '*.default'); do cp &quot;$${f}&quot; &quot;$${f}.default&quot;; done;
+
+# install:: install-man
+install-man::
</ins><span class="cx">         @echo &quot;Installing manual pages...&quot;;
</span><span class="cx">         $(_v) $(INSTALL_DIRECTORY) &quot;$(DSTROOT)$(SIPP)$(MANDIR)/man8&quot;;
</span><span class="cx">         $(_v) $(INSTALL_FILE) &quot;$(Sources)/doc/caldavd.8&quot;                           &quot;$(DSTROOT)$(SIPP)$(MANDIR)/man8&quot;;
</span><span class="lines">@@ -100,20 +140,23 @@
</span><span class="cx">         $(_v) $(INSTALL_FILE) &quot;$(Sources)/doc/calendarserver_manage_timezones.8&quot;   &quot;$(DSTROOT)$(SIPP)$(MANDIR)/man8&quot;;
</span><span class="cx">         $(_v) gzip -9 -f &quot;$(DSTROOT)$(SIPP)$(MANDIR)/man8/&quot;*.[0-9];
</span><span class="cx"> 
</span><del>-install::
</del><ins>+# install:: install-launchd
+install-launchd::
</ins><span class="cx">         @echo &quot;Installing launchd config...&quot;;
</span><span class="cx">         $(_v) $(INSTALL_DIRECTORY) &quot;$(DSTROOT)$(NSLOCALDIR)/$(NSLIBRARYSUBDIR)/Server/Calendar and Contacts&quot;;
</span><span class="cx">         $(_v) $(INSTALL_DIRECTORY) -o &quot;$(CS_USER)&quot; -g &quot;$(CS_GROUP)&quot; -m 0755 &quot;$(DSTROOT)$(VARDIR)/log$(CALDAVDSUBDIR)&quot;;
</span><span class="cx">         $(_v) $(INSTALL_DIRECTORY) &quot;$(DSTROOT)$(SIPP)$(NSLIBRARYDIR)/LaunchDaemons&quot;;
</span><span class="cx">         $(_v) $(INSTALL_FILE) &quot;$(Sources)/contrib/launchd/calendarserver.plist&quot; &quot;$(DSTROOT)$(SIPP)$(NSLIBRARYDIR)/LaunchDaemons/org.calendarserver.calendarserver.plist&quot;;
</span><span class="cx"> 
</span><del>-install::
</del><ins>+# install:: install-changeip
+install-changeip::
</ins><span class="cx">         @echo &quot;Installing changeip script...&quot;;
</span><span class="cx">         $(_v) $(INSTALL_DIRECTORY) &quot;$(DSTROOT)$(SIPP)$(LIBEXECDIR)/changeip&quot;;
</span><span class="cx">         $(_v) $(INSTALL_FILE) &quot;$(Sources)/calendarserver/tools/changeip_calendar.py&quot; &quot;$(DSTROOT)$(SIPP)$(LIBEXECDIR)/changeip/changeip_calendar.py&quot;;
</span><span class="cx">         $(_v) chmod ugo+x &quot;$(DSTROOT)$(SIPP)$(LIBEXECDIR)/changeip/changeip_calendar.py&quot;;
</span><span class="cx"> 
</span><del>-install::
</del><ins>+# install:: install-caldavtester
+install-caldavtester::
</ins><span class="cx">         @echo &quot;Installing CalDAVTester package...&quot;;
</span><span class="cx">         $(_v) $(INSTALL_DIRECTORY) &quot;$(DSTROOT)/AppleInternal/ServerTools&quot;;
</span><span class="cx">         $(_v) cd &quot;$(DSTROOT)/AppleInternal/ServerTools&quot; &amp;&amp; unzip &quot;$(BuildDirectory)/$(Project)/requirements/cache/CalDAVTester-*.zip&quot;;
</span></span></pre></div>
<a id="CalendarServertrunksupport_cache_deps"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/support/_cache_deps (13338 => 13339)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/support/_cache_deps        2014-04-19 16:02:21 UTC (rev 13338)
+++ CalendarServer/trunk/support/_cache_deps        2014-04-19 19:25:10 UTC (rev 13339)
</span><span class="lines">@@ -42,17 +42,13 @@
</span><span class="cx"> init_build;
</span><span class="cx"> c_dependencies;
</span><span class="cx"> 
</span><del>-requirements=&quot;${wd}/requirements.txt&quot;;
</del><ins>+requirements=&quot;${wd}/requirements-apple.txt&quot;;
</ins><span class="cx"> #extra_features=&quot;$(&quot;${python}&quot; -c 'import setup; print &quot;,&quot;.join(sorted(setup.extras_requirements.keys()))' | sed 's|Oracle,||')&quot;;
</span><span class="cx"> extra_features=&quot;OpenDirectory,Postgres&quot;;
</span><del>-cs_repos=&quot;svn+http://svn.calendarserver.org/repository/calendarserver&quot;;
</del><span class="cx"> 
</span><span class="cx"> ruler &quot;Downloading Python requirements for .[${extra_features}]&quot;;
</span><span class="cx"> echo &quot;&quot;;
</span><span class="cx"> pip_download \
</span><span class="cx">   --allow-unverified cx-Oracle \
</span><del>-  --editable=&quot;${cs_repos}/twext/trunk#egg=twextpy&quot; \
-  --editable=&quot;${cs_repos}/PyKerberos/trunk#egg=kerberos&quot; \
-  --editable=&quot;${cs_repos}/PyCalendar/trunk#egg=pycalendar&quot; \
-  --editable=&quot;.[${extra_features}]&quot; \
</del><ins>+  --requirement=&quot;${requirements}&quot; \
</ins><span class="cx">   ;
</span></span></pre>
</div>
</div>

</body>
</html>