Index: general/prog/python3.xml
===================================================================
--- general/prog/python3.xml	(revision c80db1b3394428c3a09e5a2d5c2926d2c66d9d0f)
+++ general/prog/python3.xml	(revision 355495ce39eec9e968d4aec7eb691301a5c896e9)
@@ -6,15 +6,15 @@
 
   <!ENTITY python3-download-http
-  "http://www.python.org/ftp/python/&python3-version;/Python-&python3-version;.tar.xz">
-  <!ENTITY python3-download-ftp
-  "&gentoo-ftp-repo;/Python-&python3-version;.tar.xz">
-  <!ENTITY python3-md5sum        "3720ce9460597e49264bbb63b48b946d">
-  <!ENTITY python3-size          "8.5 MB">
-  <!ENTITY python3-buildsize     "141 MB (23MB for the test suite)">
-  <!ENTITY python3-time          "1 SBU (additional 2.9 SBU to run the test suite)">
+           "http://www.python.org/ftp/python/&python3-version;/Python-&python3-version;.tar.xz">
+  <!ENTITY python3-download-ftp  " ">
+  <!ENTITY python3-md5sum        "187564726f2c1473d301c586acc24847">
+  <!ENTITY python3-size          "8.6 MB">
+  <!ENTITY python3-buildsize     "200 MB (30 MB for the test suite)">
+  <!ENTITY python3-time          "1.0 SBU (additional 3.0 SBU to run the test suite)">
   <!ENTITY python3htmldoc-download-http
-  "http://docs.python.org/ftp/python/doc/&python3-version;/python-&python3-version;-docs-html.tar.bz2">
-  <!ENTITY python3htmldoc-md5sum        "55af06e320f35920ea9fed1f143e1286">
+           "http://docs.python.org/ftp/python/doc/&python3-version;/python-&python3-version;-docs-html.tar.bz2">
+  <!ENTITY python3htmldoc-md5sum        "c970e7bcbc3268a3dbc2de5c15b5a3d3">
   <!ENTITY python3htmldoc-size          "4.2 MB">
+
 ]>
 
@@ -36,11 +36,10 @@
     <title>Introduction to Python</title>
 
-    <para>The <application>Python</application> package contains the
-    <application>Python</application> development environment.
-    This is useful for object-oriented programming, writing scripts,
-    prototyping large programs or developing entire applications.</para>
-
-    <!-- Python compiled against Pth, OpenSSL, and SQLite.
-         326 tests OK, 36 tests skipped, 0 failures -->
+    <para>
+      The <application>Python</application> package contains the
+      <application>Python</application> development environment.
+      This is useful for object-oriented programming, writing scripts,
+      prototyping large programs or developing entire applications.
+    </para>
 
     &lfs71_checked;
@@ -49,42 +48,52 @@
     <itemizedlist spacing="compact">
       <listitem>
-        <para>Download (HTTP): <ulink url="&python3-download-http;"/></para>
-      </listitem>
-      <listitem>
-        <para>Download (FTP): <ulink url="&python3-download-ftp;"/></para>
-      </listitem>
-      <listitem>
-        <para>Download MD5 sum: &python3-md5sum;</para>
-      </listitem>
-      <listitem>
-        <para>Download size: &python3-size;</para>
-      </listitem>
-      <listitem>
-        <para>Estimated disk space required: &python3-buildsize;</para>
-      </listitem>
-      <listitem>
-        <para>Estimated build time: &python3-time;</para>
+        <para>
+          Download (HTTP): <ulink url="&python3-download-http;"/>
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Download (FTP): <ulink url="&python3-download-ftp;"/>
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Download MD5 sum: &python3-md5sum;
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Download size: &python3-size;
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Estimated disk space required: &python3-buildsize;
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Estimated build time: &python3-time;
+        </para>
       </listitem>
     </itemizedlist>
 
     <bridgehead renderas="sect3">Additional Downloads</bridgehead>
-    <!--<itemizedlist spacing='compact'>
-       <listitem>
-        <para>Required patch: <ulink
-        url="&patch-root;/Python-&Python-version;-bdb_4.8-1.patch"/></para>
-      </listitem> 
-    </itemizedlist>-->
-
-    <itemizedlist spacing='compact'>
+    <itemizedlist spacing="compact">
       <title>Optional HTML Documentation</title>
       <listitem>
-        <para>Download (HTTP):
-        <ulink url="&python3htmldoc-download-http;"/></para>
-      </listitem>
-      <listitem>
-        <para>Download MD5 sum: &python3htmldoc-md5sum;</para>
-      </listitem>
-      <listitem>
-        <para>Download size: &python3htmldoc-size;</para>
+        <para>
+          Download (HTTP): <ulink url="&python3htmldoc-download-http;"/>
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Download MD5 sum: &python3htmldoc-md5sum;
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Download size: &python3htmldoc-size;
+        </para>
       </listitem>
     </itemizedlist>
@@ -92,24 +101,26 @@
     <bridgehead renderas="sect3">Python Dependencies</bridgehead>
 
+    <bridgehead renderas="sect4">Recommended</bridgehead>
+    <para role="recommended">
+      <xref linkend="expat"/> and
+      <xref linkend="libffi"/>
+    </para>
+
     <bridgehead renderas="sect4">Optional</bridgehead>
-    <para role="optional"><xref linkend="pth"/>,
-    <xref linkend="libffi"/> or <xref linkend="gcc"/> (install JAVA so that the 
-    <filename class="libraryfile">libffi</filename> library is built), and
-    <xref linkend="bluez"/></para>
-
-    <bridgehead renderas="sect4">Optional
-    (to create package-specific support modules)</bridgehead>
-    <para role="optional"><xref linkend="openssl"/>,
-    <xref linkend="tk"/>,
-    <xref linkend="db"/>, and
-    <xref linkend="sqlite"/></para>
-
-    <para>Note that there is a circular dependency with the
-    <application>Tk</application> package as it requires Xorg to be installed
-    but parts of Xorg depend on <application>Python</application>.</para>
+    <para role="optional">
+      <xref linkend="bluez"/>
+    </para>
+
+    <bridgehead renderas="sect4">Optional (For Additional Modules)</bridgehead>
+    <para role="optional">
+      <xref linkend="db"/>
+      <xref linkend="openssl"/>,
+      <xref linkend="sqlite"/> and
+      <xref linkend="tk"/>
+    </para>
 
     <para condition="html" role="usernotes">User Notes:
-    <ulink url="&blfs-wiki;/Python"/></para>
-
+      <ulink url="&blfs-wiki;/Python3"/>
+    </para>
   </sect2>
 
@@ -117,34 +128,47 @@
     <title>Installation of Python</title>
 
-    <para>Install <application>Python</application> by running the following
-    commands:</para>
+    <para>
+      Install <application>Python</application> by running the following
+      commands:
+    </para>
 
 <screen><userinput>sed -i "s/ndbm_libs = \[\]/ndbm_libs = ['gdbm', 'gdbm_compat']/" setup.py &amp;&amp;
-./configure --prefix=/usr --enable-shared &amp;&amp;
+./configure --prefix=/usr \
+            --enable-shared \
+            --with-wide-unicode \
+            --with-system-expat \
+            --with-system-ffi &amp;&amp;
 make</userinput></screen>
 
-    <para>To test the results, issue: <command>make test</command>. Note that
-    if you have an existing <application>Python</application> installation
-    which includes the <application>PyXML</application> module, the tests could
-    produce a segmentation fault.</para>
-
-    <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
-
-<screen role="root"><userinput>make install                               &amp;&amp;
-chmod -v 755 /usr/lib/libpython&python3-majorver;m.so.1.0 &amp;&amp;
-chmod -v 755 /usr/lib/libpython3.so </userinput></screen>
-
-    <para>There is no documentation installed using the instructions above.
-    See the <filename>Doc/README.txt</filename> file in the source
-    distribution for instructions on how to create the html. Alternatively,
-    you can download preformatted documentation from <ulink
-    url="http://docs.python.org/download.html"/>.</para>
-
-    <para>In order to use the <command>help ('name_string')</command> feature
-    of the <command>python</command> interpreter with some statements and
-    keywords, you must download (or create) the optional HTML documentation
-    and install it. If you downloaded the HTML docs, issue the following
-    commands as the
-    <systemitem class="username">root</systemitem> user:</para>
+    <para>
+      To test the results, issue: <command>make test</command>. Note that
+      if you have an existing <application>Python</application> installation
+      which includes the <application>PyXML</application> module, the tests could
+      produce a segmentation fault.
+    </para>
+
+    <para>
+      Now, as the <systemitem class="username">root</systemitem> user:
+    </para>
+
+<screen role="root"><userinput>make install                                              &amp;&amp;
+chmod -v 755 /usr/lib/libpython&python3-majorver;mu.so &amp;&amp;
+chmod -v 755 /usr/lib/libpython3.so</userinput></screen>
+
+    <para>
+      There is no documentation installed using the instructions above.
+      See the <filename>Doc/README.txt</filename> file in the source
+      distribution for instructions on how to create the html. Alternatively,
+      you can download preformatted documentation from
+      <ulink url="http://docs.python.org/download.html"/>.
+   </para>
+
+    <para>
+      In order to use the <command>help ('name_string')</command> feature
+      of the <command>python</command> interpreter with some statements and
+      keywords, you must download (or create) the optional HTML documentation
+      and install it. If you downloaded the HTML docs, issue the following
+      commands as the <systemitem class="username">root</systemitem> user:
+    </para>
 
 <screen role="root"><userinput>install -v -m755 -d /usr/share/doc/Python-&python3-version;/html &amp;&amp;
@@ -160,10 +184,26 @@
     <title>Command Explanations</title>
 
-    <para><command>sed -i "s/ndbm_libs = ..." setup.py</command>: This command
-    is used to fix a build problem with the <application>GDBM</application>
-    library.</para>
-
-    <para><command>chmod ...</command>: Fix permissions for libraries to be 
-    consistent with other libraries.</para>
+    <para>
+      <command>sed -i "s/ndbm_libs = ..." setup.py</command>: This command
+      is used to fix a build problem with the <application>GDBM</application>
+      library.
+    </para>
+
+    <para>
+      <option>--with-sytem-expat</option>: This switch enables linking against
+      system version of <application>Expat</application>. Remove if you have
+      not installed recommended dependency <xref linkend="expat"/>.
+    </para>
+
+    <para>
+      <option>--with-system-ffi</option>: This switch enables linking against
+      system version of <application>libffi</application>. Remove if you have
+      not installed recommended dependency <xref linkend="libffi"/>.
+    </para>
+
+    <para>
+      <command>chmod ...</command>: Fix permissions for shared libraries to be 
+      consistent with other libraries.
+    </para>
 
   </sect2>
@@ -172,7 +212,9 @@
     <title>Configuring Python</title>
 
-    <para>In order for <command>python</command> to find the installed
-    documentation, you must add the following environment variable to
-    individual user's or the system's profile:</para>
+    <para>
+      In order for <command>python</command> to find the installed
+      documentation, you must add the following environment variable to
+      individual user's or the system's profile:
+    </para>
 
 <screen role="root"><userinput>export PYTHONDOCS=/usr/share/doc/Python-&python3-version;/html</userinput></screen>
@@ -189,26 +231,32 @@
 
       <seglistitem>
-        <seg>2to3, 
-        
-        pydoc3 (link to pydoc-&python3-majorver;), 
-        pydoc&python3-majorver;,
-
-        python3, 
-        python&python3-majorver; (hard link with python3),
-        python&python3-majorver;m (hard link with python3),
-
-        python3-config (link to python&python3-majorver;-config), 
-        python&python3-majorver; (link to python&python3-majorver;m-config),
-        python&python3-majorver;m,
-
-        smtpd.py, and optionally if <application>Tk</application> is installed,
-        idle</seg>
-        
-        <seg>libpython3.so, libpython&python3-majorver;m.so.1.0 and numerous
-        modules installed in /usr/lib/python&python3-majorver;</seg>
-        
-        <seg>/usr/include/python&python3-majorver;,
-             /usr/lib/python&python3-majorver;, and
-             /usr/share/doc/python-&python3-version;</seg>
+        <seg>
+          2to3 (symbolic link to 2to3-&python3-majorver;),
+          2to3-&python3-majorver;,
+
+          pydoc3 (symbolic link to pydoc&python3-majorver;),
+          pydoc&python3-majorver;,
+
+          python3 (hard link to python&python3-majorver;mu), 
+          python&python3-majorver; (hard link to python&python3-majorver;mu), 
+          python&python3-majorver;mu, 
+
+          python3-config (symbolic link to python&python3-majorver;-config),
+          python&python3-majorver;-config (symbolic link to python3-config),
+          python&python3-majorver;mu-config,
+
+          and optionally if Tk is installed,
+          idle3 (symbolic link to idle&python3-majorver;),
+          idle&python3-majorver;
+        </seg>
+        <seg>
+          libpython&python3-majorver;mu.so, libpython3.so and numerous
+          modules installed in /usr/lib/python&python3-majorver;
+        </seg>
+        <seg>
+          /usr/include/python&python3-majorver;mu,
+          /usr/lib/python&python3-majorver;, and
+          /usr/share/doc/python-&python3-version;
+        </seg>
       </seglistitem>
     </segmentedlist>
@@ -219,22 +267,26 @@
       <?dbhtml list-presentation="table"?>
 
-      <varlistentry id="idle">
-        <term><command>idle</command></term>
+      <varlistentry id="idle3">
+        <term><command>idle3</command></term>
         <listitem>
-          <para>is a wrapper script that opens a
-          <application>Python</application> aware GUI editor.</para>
-          <indexterm zone="python3 idle">
-            <primary sortas="b-idle">idle</primary>
+          <para>
+            is a wrapper script that opens a
+            <application>Python</application> aware GUI editor.
+          </para>
+          <indexterm zone="python3 idle3">
+            <primary sortas="b-idle3">idle3</primary>
           </indexterm>
         </listitem>
       </varlistentry>
 
-      <varlistentry id="pydoc">
-        <term><command>pydoc</command></term>
+      <varlistentry id="pydoc3">
+        <term><command>pydoc3</command></term>
         <listitem>
-          <para>is the <application>Python</application> documentation
-          tool.</para>
-          <indexterm zone="python3 pydoc">
-            <primary sortas="b-pydoc">pydoc</primary>
+          <para>
+            is the <application>Python</application> documentation
+            tool.
+          </para>
+          <indexterm zone="python3 pydoc3">
+            <primary sortas="b-pydoc3">pydo3c</primary>
           </indexterm>
         </listitem>
@@ -244,6 +296,8 @@
         <term><command>python3</command></term>
         <listitem>
-          <para>is an interpreted, interactive, object-oriented programming
-          language.</para>
+          <para>
+            is an interpreted, interactive, object-oriented programming
+            language.
+          </para>
           <indexterm zone="python3 python3-prog">
             <primary sortas="b-python3">python3</primary>
@@ -255,6 +309,8 @@
         <term><command>python&python3-majorver;</command></term>
         <listitem>
-          <para>is a version-specific name for the <command>python</command>
-          program.</para>
+          <para>
+            is a version-specific name for the <command>python</command>
+            program.
+          </para>
           <indexterm zone="python3 python-ver">
             <primary
@@ -264,15 +320,4 @@
       </varlistentry>
 
-      <varlistentry id="smtpd.py">
-        <term><command>smtpd.py</command></term>
-        <listitem>
-          <para>is an SMTP proxy implemented in
-          <application>Python</application>.</para>
-          <indexterm zone="python3 smtpd.py">
-            <primary sortas="b-smtpd.py">smtpd.py</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
     </variablelist>
 
