<!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>[12433] twext/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/12433">12433</a></dd>
<dt>Author</dt> <dd>wsanchez@apple.com</dd>
<dt>Date</dt> <dd>2014-01-23 15:30:31 -0800 (Thu, 23 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Use pip in favor of setuptools.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#twexttrunkbin_buildsh">twext/trunk/bin/_build.sh</a></li>
<li><a href="#twexttrunkbin_pysh">twext/trunk/bin/_py.sh</a></li>
<li><a href="#twexttrunkbindevelop">twext/trunk/bin/develop</a></li>
<li><a href="#twexttrunkbininstall_pip">twext/trunk/bin/install_pip</a></li>
<li><a href="#twexttrunkbinpyflakes">twext/trunk/bin/pyflakes</a></li>
<li><a href="#twexttrunkbinpython">twext/trunk/bin/python</a></li>
<li><a href="#twexttrunksetuppy">twext/trunk/setup.py</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="twexttrunkbin_buildsh"></a>
<div class="modfile"><h4>Modified: twext/trunk/bin/_build.sh (12432 => 12433)</h4>
<pre class="diff"><span>
<span class="info">--- twext/trunk/bin/_build.sh        2014-01-23 20:09:51 UTC (rev 12432)
+++ twext/trunk/bin/_build.sh        2014-01-23 23:30:31 UTC (rev 12433)
</span><span class="lines">@@ -435,11 +435,23 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+ruler () {
+  echo &quot;____________________________________________________________&quot;;
+  echo &quot;&quot;;
+
+  if [ $# -gt 0 ]; then
+    echo &quot;$@&quot;;
+  fi;
+}
+
+
+
</ins><span class="cx"> #
</span><span class="cx"> # Build C dependencies
</span><span class="cx"> #
</span><span class="cx"> c_dependencies () {
</span><span class="cx"> 
</span><ins>+  ruler;
</ins><span class="cx">   if find_header ffi/ffi.h; then
</span><span class="cx">     using_system &quot;libffi&quot;;
</span><span class="cx">   else
</span><span class="lines">@@ -448,6 +460,7 @@
</span><span class="cx">       &quot;ftp://sourceware.org/pub/libffi/libffi-3.0.13.tar.gz&quot;
</span><span class="cx">   fi;
</span><span class="cx"> 
</span><ins>+  ruler;
</ins><span class="cx">   if find_header ldap.h 20428 LDAP_VENDOR_VERSION; then
</span><span class="cx">     using_system &quot;OpenLDAP&quot;;
</span><span class="cx">   else
</span><span class="lines">@@ -460,6 +473,7 @@
</span><span class="cx">       --disable-bdb --disable-hdb;
</span><span class="cx">   fi;
</span><span class="cx"> 
</span><ins>+  ruler;
</ins><span class="cx">   if find_header sasl/sasl.h &amp;&amp; ! find_header sasl.h; then
</span><span class="cx">     mkdir -p &quot;${dev_root}/include&quot;;
</span><span class="cx">     echo &quot;#include &lt;sasl/sasl.h&gt;&quot; &gt; &quot;${dev_root}/include/sasl.h&quot;
</span><span class="lines">@@ -486,25 +500,54 @@
</span><span class="cx">   mkdir -p &quot;${dev_root}&quot;;
</span><span class="cx">   mkdir -p &quot;${dev_libdir}&quot;;
</span><span class="cx"> 
</span><del>-  export PYTHONPATH=&quot;${dev_libdir}:${PYTHONPATH:-}&quot;
</del><ins>+  # export PYTHONPATH=&quot;${dev_libdir}:${PYTHONPATH:-}&quot;
</ins><span class="cx"> 
</span><del>-  export              PATH=&quot;${dev_root}/bin:${PATH}&quot;;
-  export    C_INCLUDE_PATH=&quot;${dev_root}/include:${C_INCLUDE_PATH:-}&quot;;
-  export   LD_LIBRARY_PATH=&quot;${dev_root}/lib:${dev_root}/lib64:${LD_LIBRARY_PATH:-}&quot;;
-  export          CPPFLAGS=&quot;-I${dev_root}/include ${CPPFLAGS:-} &quot;;
-  export           LDFLAGS=&quot;-L${dev_root}/lib -L${dev_root}/lib64 ${LDFLAGS:-} &quot;;
-  export DYLD_LIBRARY_PATH=&quot;${dev_root}/lib:${dev_root}/lib64:${DYLD_LIBRARY_PATH:-}&quot;;
-  export PKG_CONFIG_PATH=&quot;${dev_root}/lib/pkgconfig:${PKG_CONFIG_PATH:-}&quot;;
</del><ins>+  # export              PATH=&quot;${dev_root}/bin:${PATH}&quot;;
+  # export    C_INCLUDE_PATH=&quot;${dev_root}/include:${C_INCLUDE_PATH:-}&quot;;
+  # export   LD_LIBRARY_PATH=&quot;${dev_root}/lib:${dev_root}/lib64:${LD_LIBRARY_PATH:-}&quot;;
+  # export          CPPFLAGS=&quot;-I${dev_root}/include ${CPPFLAGS:-} &quot;;
+  # export           LDFLAGS=&quot;-L${dev_root}/lib -L${dev_root}/lib64 ${LDFLAGS:-} &quot;;
+  # export DYLD_LIBRARY_PATH=&quot;${dev_root}/lib:${dev_root}/lib64:${DYLD_LIBRARY_PATH:-}&quot;;
+  # export PKG_CONFIG_PATH=&quot;${dev_root}/lib/pkgconfig:${PKG_CONFIG_PATH:-}&quot;;
</ins><span class="cx"> 
</span><span class="cx">   cd &quot;${wd}&quot;;
</span><span class="cx"> 
</span><del>-  if ! &quot;${python}&quot; ./setup.py develop   \
-      --install-dir &quot;${dev_libdir}&quot;     \
-      --script-dir &quot;${dev_bindir}&quot;      \
-      &gt; &quot;${dev_root}/setup.log&quot; 2&gt;&amp;1; then
-    err=$?;
-    echo &quot;Unable to set up for development:&quot;
-    cat &quot;${dev_root}/setup.log&quot;;
-    exit ${err};
-  fi;
</del><ins>+
+  &quot;${bootstrap_python}&quot; -m virtualenv &quot;${dev_root}&quot;;
+
+  python=&quot;${dev_bindir}/python&quot;;
+
+  for requirements in &quot;${wd}/requirements/&quot;*; do
+
+    ruler &quot;Preparing Python requirements: ${requirements}&quot;;
+    echo &quot;&quot;;
+
+    if ! &quot;${python}&quot; -m pip install               \
+        --requirement &quot;${requirements}&quot;           \
+        --download-cache &quot;${dev_home}/pip_cache&quot;  \
+    ; then
+      err=$?;
+      echo &quot;Unable to set up Python requirements: ${requirements}&quot;;
+      if [ &quot;${requirements#${wd}/requirements/opt_}&quot; != &quot;${requirements}&quot; ]; then
+        echo &quot;Requirements ${requirements} are optional; continuing.&quot;;
+      else
+        echo &quot;&quot;;
+        exit ${err};
+      fi;
+    fi;
+
+  done;
+
+  echo &quot;&quot;;
</ins><span class="cx"> }
</span><ins>+
+
+
+#
+# Set up for development
+#
+develop () {
+  init_build;
+  c_dependencies;
+  py_dependencies;
+}
</ins></span></pre></div>
<a id="twexttrunkbin_pysh"></a>
<div class="modfile"><h4>Modified: twext/trunk/bin/_py.sh (12432 => 12433)</h4>
<pre class="diff"><span>
<span class="info">--- twext/trunk/bin/_py.sh        2014-01-23 20:09:51 UTC (rev 12432)
+++ twext/trunk/bin/_py.sh        2014-01-23 23:30:31 UTC (rev 12433)
</span><span class="lines">@@ -48,6 +48,11 @@
</span><span class="cx"> #
</span><span class="cx"> # Detect which version of Python to use, then print out which one was detected.
</span><span class="cx"> #
</span><ins>+# This will prefer the python interpreter in the PYTHON environment variable.
+# If that's not found, it will check for &quot;python2.7&quot;, &quot;python2.6&quot; and &quot;python&quot;,
+# looking for each in your PATH and, failing that, in a number of well-known
+# locations.
+#
</ins><span class="cx"> detect_python_version () {
</span><span class="cx">   local v;
</span><span class="cx">   local p;
</span><span class="lines">@@ -67,9 +72,11 @@
</span><span class="cx">       &quot;/sw/bin/python${v}&quot;                                              \
</span><span class="cx">       ;
</span><span class="cx">     do
</span><del>-      if try_python &quot;${p}&quot;; then
-        echo &quot;${p}&quot;;
-        return 0;
</del><ins>+      if p=&quot;$(type -p &quot;${p}&quot;)&quot;; then
+        if try_python &quot;${p}&quot;; then
+          echo &quot;${p}&quot;;
+          return 0;
+        fi;
</ins><span class="cx">       fi;
</span><span class="cx">     done;
</span><span class="cx">   done;
</span><span class="lines">@@ -84,6 +91,8 @@
</span><span class="cx">   local  v=&quot;$1&quot;; shift;
</span><span class="cx">   local mv=&quot;$1&quot;; shift;
</span><span class="cx"> 
</span><ins>+  local vh;
+  local mvh;
</ins><span class="cx">   local result;
</span><span class="cx"> 
</span><span class="cx">   while true; do
</span><span class="lines">@@ -131,7 +140,7 @@
</span><span class="cx">   # important on systems with older system pythons (2.4 or earlier) with an
</span><span class="cx">   # alternate install of Python, or alternate python installation mechanisms
</span><span class="cx">   # like virtualenv.
</span><del>-  python=&quot;$(detect_python_version)&quot;;
</del><ins>+  bootstrap_python=&quot;$(detect_python_version)&quot;;
</ins><span class="cx"> 
</span><span class="cx">   # Set the $PYTHON environment variable to an absolute path pointing at the
</span><span class="cx">   # appropriate python executable, a standard-ish mechanism used by certain
</span><span class="lines">@@ -139,10 +148,10 @@
</span><span class="cx">   # the part of the PostgreSQL build process which builds pl_python.  Note that
</span><span class="cx">   # detect_python_version, above, already honors $PYTHON, so if this is already
</span><span class="cx">   # set it won't be stomped on, it will just be re-set to the same value.
</span><del>-  export PYTHON=&quot;$(type -p ${python})&quot;;
</del><ins>+  export PYTHON=&quot;$(type -p ${bootstrap_python})&quot;;
</ins><span class="cx"> 
</span><del>-  if [ -z &quot;${python:-}&quot; ]; then
-    echo &quot;No suitable python found. Python 2.6+ is required.&quot;;
</del><ins>+  if [ -z &quot;${bootstrap_python:-}&quot; ]; then
+    echo &quot;No suitable python found. Python 2.6 or 2.7 is required.&quot;;
</ins><span class="cx">     exit 1;
</span><del>-  fi
</del><ins>+  fi;
</ins><span class="cx"> }
</span></span></pre></div>
<a id="twexttrunkbindevelop"></a>
<div class="modfile"><h4>Modified: twext/trunk/bin/develop (12432 => 12433)</h4>
<pre class="diff"><span>
<span class="info">--- twext/trunk/bin/develop        2014-01-23 20:09:51 UTC (rev 12432)
+++ twext/trunk/bin/develop        2014-01-23 23:30:31 UTC (rev 12433)
</span><span class="lines">@@ -16,6 +16,9 @@
</span><span class="cx"> # limitations under the License.
</span><span class="cx"> ##
</span><span class="cx"> 
</span><ins>+set -e;
+set -u;
+
</ins><span class="cx"> if [ -z &quot;${wd:-}&quot; ]; then
</span><span class="cx">   wd=&quot;$(cd &quot;$(dirname &quot;$0&quot;)/..&quot; &amp;&amp; pwd)&quot;;
</span><span class="cx"> fi;
</span><span class="lines">@@ -24,6 +27,4 @@
</span><span class="cx"> 
</span><span class="cx"> . &quot;${wd}/bin/_build.sh&quot;;
</span><span class="cx"> 
</span><del>-init_build;
-c_dependencies;
-py_dependencies;
</del><ins>+develop;
</ins></span></pre></div>
<a id="twexttrunkbininstall_pip"></a>
<div class="modfile"><h4>Modified: twext/trunk/bin/install_pip (12432 => 12433)</h4>
<pre class="diff"><span>
<span class="info">--- twext/trunk/bin/install_pip        2014-01-23 20:09:51 UTC (rev 12432)
+++ twext/trunk/bin/install_pip        2014-01-23 23:30:31 UTC (rev 12433)
</span><span class="lines">@@ -25,42 +25,35 @@
</span><span class="cx"> cd &quot;${tmp}&quot;;
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-find_tool ()
-{
-    local tool=&quot;$1&quot;; shift;
-    local version=&quot;$1&quot;; shift;
-    local cmd;
-
-    for cmd in &quot;${tool}-${py_version}&quot; &quot;${tool}${py_version}&quot;; do
-        if type -p &quot;${cmd}&quot; &gt; /dev/null; then
-            echo &quot;${cmd}&quot;;
-            return 0
-        fi;
-    done;
-
-    return 1;
-}
-
-
</del><span class="cx"> for py_version in &quot;2.7&quot; &quot;2.6&quot;; do
</span><span class="cx"> 
</span><del>-    if ! type -p &quot;python${py_version}&quot; &gt; /dev/null; then
-        echo &quot;Python ${py_version} not found.&quot;;
-        continue;
-    fi;
</del><ins>+  python=&quot;python${py_version}&quot;;
</ins><span class="cx"> 
</span><del>-    easy_install=&quot;$(find_tool &quot;easy_install&quot; &quot;${py_version}&quot;)&quot;;
</del><ins>+  if ! &quot;${python}&quot; -V &gt; /dev/null 2&gt;&amp;1; then
+    continue;
+  fi;
</ins><span class="cx"> 
</span><del>-    sudo &quot;${easy_install}&quot; --upgrade setuptools;
</del><ins>+  echo &quot;________________________________________&quot;;
+  echo &quot;Installing tools for Python ${py_version}...&quot;;
</ins><span class="cx"> 
</span><del>-    if ! pip=&quot;$(find_tool &quot;pip&quot; &quot;${py_version}&quot;)&quot;; then
-        sudo &quot;python${py_version}&quot; &quot;${wd}/bin/_get_pip&quot;;
-    fi;
</del><ins>+  if ! &quot;${python}&quot; -m easy_install --help &gt; /dev/null; then
+    echo &quot;Setuptools is not installed; cannot continue.&quot;;
+    continue;
+  fi;
</ins><span class="cx"> 
</span><del>-    pip=&quot;$(find_tool &quot;pip&quot; &quot;${py_version}&quot;)&quot;;
</del><ins>+  echo &quot;&quot;;
+  sudo &quot;${python}&quot; -m easy_install --upgrade setuptools;
</ins><span class="cx"> 
</span><del>-    sudo &quot;${pip}&quot; install --upgrade pip;
</del><ins>+  if ! python -m pip -V &gt; /dev/null; then
+    echo &quot;&quot;;
+    sudo &quot;${python}&quot; &quot;${wd}/bin/_get_pip&quot;;
+  fi;
</ins><span class="cx"> 
</span><ins>+  echo &quot;&quot;;
+  sudo python -m pip install --upgrade pip;
+  echo &quot;&quot;;
+  sudo python -m pip install --upgrade virtualenv;
+
</ins><span class="cx"> done;
</span><span class="cx"> 
</span><span class="cx"> rm -rf &quot;${tmp}&quot;;
</span></span></pre></div>
<a id="twexttrunkbinpyflakes"></a>
<div class="modfile"><h4>Modified: twext/trunk/bin/pyflakes (12432 => 12433)</h4>
<pre class="diff"><span>
<span class="info">--- twext/trunk/bin/pyflakes        2014-01-23 20:09:51 UTC (rev 12432)
+++ twext/trunk/bin/pyflakes        2014-01-23 23:30:31 UTC (rev 12433)
</span><span class="lines">@@ -21,7 +21,11 @@
</span><span class="cx"> 
</span><span class="cx"> wd=&quot;$(cd &quot;$(dirname &quot;$0&quot;)/..&quot; &amp;&amp; pwd -L)&quot;;
</span><span class="cx"> 
</span><del>-. &quot;${wd}/bin/develop&quot;;
</del><ins>+export TWEXT_DEVELOP=&quot;true&quot;;
</ins><span class="cx"> 
</span><ins>+. &quot;${wd}/bin/_build.sh&quot;;
+
+develop;
+
</ins><span class="cx"> pip install pyflakes --no-use-wheel --upgrade --target=&quot;${dev_libdir}&quot; &gt; &quot;${dev_root}/pip_pyflakes.log&quot; || true;
</span><span class="cx"> exec &quot;${python}&quot; -m pyflakes &quot;$@&quot;;
</span></span></pre></div>
<a id="twexttrunkbinpython"></a>
<div class="modfile"><h4>Modified: twext/trunk/bin/python (12432 => 12433)</h4>
<pre class="diff"><span>
<span class="info">--- twext/trunk/bin/python        2014-01-23 20:09:51 UTC (rev 12432)
+++ twext/trunk/bin/python        2014-01-23 23:30:31 UTC (rev 12433)
</span><span class="lines">@@ -21,6 +21,10 @@
</span><span class="cx"> 
</span><span class="cx"> wd=&quot;$(cd &quot;$(dirname &quot;$0&quot;)/..&quot; &amp;&amp; pwd)&quot;;
</span><span class="cx"> 
</span><del>-. &quot;${wd}/bin/develop&quot;;
</del><ins>+export TWEXT_DEVELOP=&quot;true&quot;;
</ins><span class="cx"> 
</span><ins>+. &quot;${wd}/bin/_build.sh&quot;;
+
+develop;
+
</ins><span class="cx"> exec &quot;${python}&quot; &quot;$@&quot;;
</span></span></pre></div>
<a id="twexttrunksetuppy"></a>
<div class="modfile"><h4>Modified: twext/trunk/setup.py (12432 => 12433)</h4>
<pre class="diff"><span>
<span class="info">--- twext/trunk/setup.py        2014-01-23 20:09:51 UTC (rev 12432)
+++ twext/trunk/setup.py        2014-01-23 23:30:31 UTC (rev 12433)
</span><span class="lines">@@ -20,11 +20,12 @@
</span><span class="cx"> 
</span><span class="cx"> import sys
</span><span class="cx"> import errno
</span><del>-import os
</del><ins>+from os import listdir, environ as environment
</ins><span class="cx"> from os.path import dirname, abspath, join as joinpath
</span><ins>+from itertools import chain
</ins><span class="cx"> import subprocess
</span><del>-from itertools import chain
</del><span class="cx"> from setuptools import setup, find_packages as setuptools_find_packages
</span><ins>+from pip.req import parse_requirements
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> #
</span><span class="lines">@@ -119,37 +120,39 @@
</span><span class="cx"> # Dependencies
</span><span class="cx"> #
</span><span class="cx"> 
</span><del>-setup_requirements = [
-]
</del><ins>+requirements_dir = joinpath(dirname(__file__), &quot;requirements&quot;)
</ins><span class="cx"> 
</span><del>-install_requirements = [
-    &quot;cffi==0.6&quot;,
-    &quot;twisted&gt;=13.2.0&quot;,
-]
</del><span class="cx"> 
</span><del>-extras_requirements = {
-    &quot;LDAP&quot;: [&quot;python-ldap&gt;=2.4.13&quot;],
-    &quot;DAL&quot;: [&quot;sqlparse==0.1.2&quot;],
-}
</del><ins>+def read_requirements(reqs_filename):
+    return [
+        str(r.req) for r in
+        parse_requirements(joinpath(requirements_dir, reqs_filename))
+    ]
</ins><span class="cx"> 
</span><ins>+
+setup_requirements = []
+
+install_requirements = read_requirements(&quot;base.txt&quot;)
+
+extras_requirements = dict(
+    (reqs_filename[4:-4], read_requirements(reqs_filename))
+    for reqs_filename in listdir(requirements_dir)
+    if reqs_filename.startswith(&quot;opt_&quot;) and reqs_filename.endswith(&quot;.txt&quot;)
+)
+
</ins><span class="cx"> # Requirements for development and testing
</span><del>-develop_requirements = [
-    &quot;docutils&gt;=0.11&quot;,
-    &quot;mockldap&gt;=0.1.4&quot;,
-]
</del><ins>+develop_requirements = read_requirements(&quot;develop.txt&quot;)
</ins><span class="cx"> 
</span><del>-if os.environ.get(&quot;TWEXT_DEVELOP&quot;, &quot;false&quot;) == &quot;true&quot;:
</del><ins>+if environment.get(&quot;TWEXT_DEVELOP&quot;, &quot;false&quot;) == &quot;true&quot;:
</ins><span class="cx">     install_requirements.extend(develop_requirements)
</span><del>-
-    # FIXME: It would be better to figure out how to get `setup.py develop` to
-    # fetch the extras_requirements...
</del><span class="cx">     install_requirements.extend(chain(*extras_requirements.values()))
</span><span class="cx"> 
</span><del>-# Add oracle after defining the development requirements, because it's
-# not exactly super portable and so it's potentially a major pain to
-# install.
</del><ins>+    # Remove cx_Oracle here because we don't automate it's installation.
+    install_requirements = [
+        r for r in install_requirements
+        if not r.startswith(&quot;cx-Oracle&quot;)
+    ]
</ins><span class="cx"> 
</span><del>-extras_requirements[&quot;Oracle&quot;] = [&quot;cx_Oracle==5.1.2&quot;]
</del><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> #
</span></span></pre>
</div>
</div>

</body>
</html>