Author: andy
Date: 2012-03-04 13:29:13 -0700 (Sun, 04 Mar 2012)
New Revision: 9594

Modified:
   trunk/BOOK/general/prog/python2.xml
   trunk/BOOK/networking/netprogs/netprogs.xml
Log:
Python tweaks. Hopefully fixes Ticket #3269

Modified: trunk/BOOK/general/prog/python2.xml
===================================================================
--- trunk/BOOK/general/prog/python2.xml 2012-03-04 20:26:22 UTC (rev 9593)
+++ trunk/BOOK/general/prog/python2.xml 2012-03-04 20:29:13 UTC (rev 9594)
@@ -4,14 +4,16 @@
   <!ENTITY % general-entities SYSTEM "../../general.ent">
   %general-entities;
 
-  <!ENTITY python2-download-http 
"http://www.python.org/ftp/python/&python2-version;/Python-&python2-version;.tar.xz";>
+  <!ENTITY python2-download-http
+  
"http://www.python.org/ftp/python/&python2-version;/Python-&python2-version;.tar.xz";>
   <!ENTITY python2-download-ftp  " ">
   <!-- <!ENTITY python2-download-ftp  
"&gentoo-ftp-repo;/Python-&python2-version;.tar.xz"> -->
   <!ENTITY python2-md5sum        "75c87a80c6ddb0b785a57ea3583e04fa">
   <!ENTITY python2-size          "9.5 MB">
   <!ENTITY python2-buildsize     "235 MB (not including the test suite)">
   <!ENTITY python2-time          "1 SBU (not including the test suite)">
-  <!ENTITY python2htmldoc-download-http 
"http://docs.python.org/ftp/python/doc/&python2-version;/python-&python2-version;-docs-html.tar.bz2";>
+  <!ENTITY python2htmldoc-download-http
+  
"http://docs.python.org/ftp/python/doc/&python2-version;/python-&python2-version;-docs-html.tar.bz2";>
   <!ENTITY python2htmldoc-md5sum        "40f0bd51b221662cae14fb0c6b6f622b">
   <!ENTITY python2htmldoc-size          "4.1 MB">
 ]>
@@ -33,36 +35,47 @@
   <sect2 role="package">
     <title>Introduction to Python 2</title>
 
-    <para>The <application>Python 2</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.  This version
-    is for backward compatibility with other dependent packages.</para>
+    <para>
+      The <application>Python 2</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. This version is for backward
+      compatibility with other dependent packages.
+    </para>
 
-    <!-- Python compiled against Pth, OpenSSL, and SQLite.
-         326 tests OK, 36 tests skipped, 0 failures -->
-
     &lfs70_checked;
 
     <bridgehead renderas="sect3">Package Information</bridgehead>
     <itemizedlist spacing="compact">
       <listitem>
-        <para>Download (HTTP): <ulink url="&python2-download-http;"/></para>
+        <para>
+          Download (HTTP): <ulink url="&python2-download-http;"/>
+        </para>
       </listitem>
       <listitem>
-        <para>Download (FTP): <ulink url="&python2-download-ftp;"/></para>
+        <para>
+          Download (FTP): <ulink url="&python2-download-ftp;"/>
+        </para>
       </listitem>
       <listitem>
-        <para>Download MD5 sum: &python2-md5sum;</para>
+        <para>
+          Download MD5 sum: &python2-md5sum;
+        </para>
       </listitem>
       <listitem>
-        <para>Download size: &python2-size;</para>
+        <para>
+          Download size: &python2-size;
+        </para>
       </listitem>
       <listitem>
-        <para>Estimated disk space required: &python2-buildsize;</para>
+        <para>
+          Estimated disk space required: &python2-buildsize;
+        </para>
       </listitem>
       <listitem>
-        <para>Estimated build time: &python2-time;</para>
+        <para>
+          Estimated build time: &python2-time;
+        </para>
       </listitem>
     </itemizedlist>
 
@@ -71,103 +84,134 @@
     <itemizedlist spacing="compact">
       <title>Optional HTML Documentation</title>
       <listitem>
-        <para>Download (HTTP): <ulink 
url="&python2htmldoc-download-http;"/></para>
+        <para>
+          Download (HTTP): <ulink url="&python2htmldoc-download-http;"/>
+        </para>
       </listitem>
       <listitem>
-        <para>Download MD5 sum: &python2htmldoc-md5sum;</para>
+        <para>
+          Download MD5 sum: &python2htmldoc-md5sum;
+        </para>
       </listitem>
       <listitem>
-        <para>Download size: &python2htmldoc-size;</para>
+        <para>
+          Download size: &python2htmldoc-size;
+        </para>
       </listitem>
     </itemizedlist>
 
     <bridgehead renderas="sect3">Python Dependencies</bridgehead>
 
     <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
-    <ulink url="http://www.bluez.org/";>BlueZ</ulink></para>
+    <para role="optional">
+      <!-- <xref linkend="pth"/> can only be used if you've overwritten glibc's
+      libpthread. -->
+      <xref linkend="libffi"/> and <xref linkend="pkgconfig"/>
+      (<command>configure</command> uses <command>pkgconfig</command> to find
+      <application>libffi</application>. There is a circular dependency here:
+      <application>Pkgconfig</application> requires
+      <application>Glib</application> which requires
+      <application>Python 2</application>),
+      <!-- gcc's libffi does not install a pkgconfig file -->
+      <ulink url="http://sphinx.pocoo.org/";>Sphinx</ulink> (to create the 
docs),
+      <ulink url="http://www.bluez.org/";>BlueZ</ulink>,
+      <xref linkend="openssl"/>,
+      <xref linkend="tk"/> (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>),
+      <xref linkend="db"/> and
+      <xref linkend="sqlite"/>.
+    </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 condition="html" role="usernotes">User Notes:
-    <ulink url="&blfs-wiki;/Python"/></para>
-
+    <para condition="html" role="usernotes">
+      User Notes: <ulink url="&blfs-wiki;/Python"/>
+    </para>
   </sect2>
 
   <sect2 role="installation">
     <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;
+<screen><userinput>./configure --prefix=/usr --enable-shared &amp;&amp;
 make</userinput></screen>
 
-    <para>To test the results, issue: <command>make test</command>. Note that
-    if you have an existing <application>Python 2</application> installation
-    which includes the <application>PyXML</application> module, the tests could
-    produce a segmentation fault.</para>
+    <para>
+      To test the results, issue: <command>make test</command>.
+    </para>
 
-    <para>Now, as the <systemitem class="username">root</systemitem> 
user:</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 create or download the optional HTML documentation.
+    </para>
 
+    <para>
+      If you have installed <ulink 
url="http://sphinx.pocoo.org/";>Sphinx</ulink>
+      and wish to create the HTML documentation:
+    </para>
+
+<screen><userinput>make -C Doc html</userinput></screen>
+
+    <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&python2-majorver;.so.1.0</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>
+      If you created the html documentation with
+      <application>Sphinx</application> then install it as the
+      <systemitem class="username">root</systemitem> user:
+    </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-&python2-version; &amp;&amp;
+cp -rfv Doc/build/html/* 
/usr/share/doc/python-&python2-version;</userinput></screen>
 
-<screen role="root"><userinput>install -v -m755 -d 
/usr/share/doc/Python-&python2-version;/html &amp;&amp;
-tar --strip-components=1 \
-    --no-same-owner \
-    --no-same-permissions \
-    -C /usr/share/doc/Python-&python2-version;/html \
+    <para>
+      Alternatively, you can download preformatted documentation from
+      <ulink url="http://docs.python.org/download.html"/> and install it as the
+      <systemitem class="username">root</systemitem> user:
+    </para>
+
+<screen role="root"><userinput>install -v -m755 -d 
/usr/share/doc/Python-&python2-version; &amp;&amp;
+tar --strip-components=1 -C /usr/share/doc/Python-&python2-version; \
     -xvf ../python-&python2-version;-docs-html.tar.bz2</userinput></screen>
-
   </sect2>
 
   <sect2 role="commands">
     <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>
+      <option>--with-system-ffi</option>: If you have installed
+      <application>Libffi</application> and
+      <application>Pkgconfig</application>, add this option to compile
+      <application>Python</application>'s _ctypes module using the system
+      installed <application>Libffi</application>. Otherwise
+      <application>Python</application> will compile its own copy of
+      <application>Libffi</application>.
+    </para>
 
-    <para><command>chmod ...</command>: Fix permissions for libraries to be 
-    consistent with other libraries.</para>
-
+    <para>
+      <command>chmod ...</command>: Fix permissions for libraries to be 
+      consistent with other libraries.
+    </para>
   </sect2>
 
   <sect2 role="configuration">
     <title>Configuring Python 2</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-&python2-version;/html</userinput></screen>
-
+<screen role="root"><userinput>export 
PYTHONDOCS=/usr/share/doc/Python-&python2-version;</userinput></screen>
   </sect2>
 
   <sect2 role="content">
@@ -179,14 +223,19 @@
       <segtitle>Installed Directories</segtitle>
 
       <seglistitem>
-        <seg>pydoc, python, python-config, python&python2-majorver;,
-        python&python2-majorver;-config, smtpd.py, and optionally if
-        <application>Tk</application> is installed, idle</seg>
-        <seg>libpython&python2-majorver;.so and numerous modules installed in
-        /usr/lib/python&python2-majorver;/lib-dynload</seg>
-        <seg>/usr/include/python&python2-majorver;,
-        /usr/lib/python&python2-majorver;, and
-        /usr/share/doc/python-&python2-version;</seg>
+        <seg>
+          pydoc, python, python-config, python&python2-majorver;,
+          python&python2-majorver;-config, smtpd.py, and optionally if
+          <application>Tk</application> is installed, idle
+        </seg>
+        <seg>
+          libpython&python2-majorver;.so and numerous modules installed in
+          /usr/lib/python&python2-majorver;/lib-dynload
+        </seg>
+        <seg>
+          /usr/include/python&python2-majorver;,
+          /usr/lib/python&python2-majorver;, and
+          /usr/share/doc/python-&python2-version;</seg>
       </seglistitem>
     </segmentedlist>
 
@@ -198,8 +247,10 @@
       <varlistentry id="idle2">
         <term><command>idle</command></term>
         <listitem>
-          <para>is a wrapper script that opens a
-          <application>Python</application> aware GUI editor.</para>
+          <para>
+            is a wrapper script that opens a <application>Python</application>
+            aware GUI editor.
+          </para>
           <indexterm zone="python2 idle2">
             <primary sortas="b-idle2">idle</primary>
           </indexterm>
@@ -209,20 +260,23 @@
       <varlistentry id="pydoc2">
         <term><command>pydoc</command></term>
         <listitem>
-          <para>is the <application>Python</application> documentation
-          tool.</para>
+          <para>
+            is the <application>Python</application> documentation tool.
+          </para>
           <indexterm zone="python2 pydoc2">
             <primary sortas="b-pydoc2">pydoc</primary>
           </indexterm>
         </listitem>
       </varlistentry>
 
-      <varlistentry id="python2-prog">
+      <varlistentry id="python">
         <term><command>python</command></term>
         <listitem>
-          <para>is an interpreted, interactive, object-oriented programming
-          language.</para>
-          <indexterm zone="python2 python2-prog">
+          <para>
+            is an interpreted, interactive, object-oriented programming
+            language.
+          </para>
+          <indexterm zone="python2 python">
             <primary sortas="b-python2">python</primary>
           </indexterm>
         </listitem>
@@ -231,8 +285,10 @@
       <varlistentry id="python2-ver">
         <term><command>python&python2-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="python2 python2-ver">
             <primary 
sortas="b-python&python2-majorver;">python&python2-majorver;</primary>
           </indexterm>
@@ -242,16 +298,14 @@
       <varlistentry id="smtpd.py2">
         <term><command>smtpd.py</command></term>
         <listitem>
-          <para>is an SMTP proxy implemented in
-          <application>Python</application>.</para>
+          <para>
+            is an SMTP proxy implemented in <application>Python</application>.
+          </para>
           <indexterm zone="python2 smtpd.py2">
             <primary sortas="b-smtpd.py2">smtpd.py</primary>
           </indexterm>
         </listitem>
       </varlistentry>
-
     </variablelist>
-
   </sect2>
-
 </sect1>

Modified: trunk/BOOK/networking/netprogs/netprogs.xml
===================================================================
--- trunk/BOOK/networking/netprogs/netprogs.xml 2012-03-04 20:26:22 UTC (rev 
9593)
+++ trunk/BOOK/networking/netprogs/netprogs.xml 2012-03-04 20:29:13 UTC (rev 
9594)
@@ -36,7 +36,6 @@
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="rsync.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="samba3.xml"/> 
 <!--  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; 
href="samba3-client.xml"/> -->
-<!--  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; 
href="subversion.xml"/> -->
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="wget.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; 
href="wireless-tools.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; 
href="wpa_supplicant.xml"/>

-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to