Ignore:
Timestamp:
06/07/2020 08:16:00 PM (4 years ago)
Author:
Bruce Dubbs <bdubbs@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
595ff03
Parents:
d53fefa
Message:

Initial commit of alternative cross LFS

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross2@11897 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter06/python.xml

    rd53fefa rfcc02767  
    66]>
    77
    8 <sect1 id="ch-system-Python" role="wrap">
    9   <?dbhtml filename="Python.html"?>
     8<sect1 id="ch-system-Python-temp" role="wrap">
     9  <?dbhtml filename="Python-temp.html"?>
    1010
    1111  <sect1info condition="script">
     
    1717  <title>Python-&python-version;</title>
    1818
    19   <indexterm zone="ch-system-Python">
    20     <primary sortas="a-python">python</primary>
     19  <indexterm zone="ch-system-Python-temp">
     20    <primary sortas="a-Python">Python</primary>
     21    <secondary>temporary</secondary>
    2122  </indexterm>
    2223
     
    2425    <title/>
    2526
    26     <para>The Python 3 package contains the Python development environment. It
    27     is useful for object-oriented programming, writing scripts, prototyping
    28     large programs or developing entire applications.</para>
     27    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     28    href="../chapter08/python.xml"
     29    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    2930
    3031    <segmentedlist>
    31       <segtitle>&buildtime;</segtitle>
     32    <segtitle>&buildtime;</segtitle>
    3233      <segtitle>&diskspace;</segtitle>
    3334
    3435      <seglistitem>
    35         <seg>&python-ch6-sbu;</seg>
    36         <seg>&python-ch6-du;</seg>
     36        <seg>&python-ch5-sbu;</seg>
     37        <seg>&python-ch5-du;</seg>
    3738      </seglistitem>
    3839    </segmentedlist>
     
    4142
    4243  <sect2 role="installation">
    43     <title>Installation of Python 3</title>
     44    <title>Installation of Python</title>
     45
     46    <note>
     47      <para>There are two package files whose name starts with
     48      <quote>python</quote>. The one to extract from is
     49      <filename>Python-&python-version;.tar.xz</filename> (notice the
     50      uppercase first letter).</para>
     51    </note>
    4452
    4553    <para>Prepare Python for compilation:</para>
    4654
    47 <screen><userinput remap="configure">./configure --prefix=/usr       \
    48             --enable-shared     \
    49             --with-system-expat \
    50             --with-system-ffi   \
    51             --with-ensurepip=yes</userinput></screen>
     55<screen><userinput remap="configure">./configure --prefix=/usr --without-ensurepip</userinput></screen>
    5256
    5357    <variablelist>
    54       <title>The meaning of the configure options:</title>
     58      <title>The meaning of the configure option:</title>
    5559
    56     <varlistentry>
    57       <term><parameter>--with-system-expat</parameter></term>
    58       <listitem>
    59         <para>This switch enables linking against system version of
    60         <application>Expat</application>.</para>
    61        </listitem>
    62      </varlistentry>
    63 
    64     <varlistentry>
    65       <term><parameter>--with-system-ffi</parameter></term>
    66       <listitem>
    67         <para>This switch enables linking against system version of
    68         <application>libffi</application>.</para>
    69       </listitem>
    70     </varlistentry>
    71 
    72     <varlistentry>
    73       <term><parameter>--with-ensurepip=yes</parameter></term>
    74       <listitem>
    75         <para>This switch enables building <command>pip</command> and
    76         <command>setuptools</command> packaging programs.</para>
    77       </listitem>
    78     </varlistentry>
     60      <varlistentry>
     61        <term><parameter>--without-ensurepip</parameter></term>
     62        <listitem>
     63          <para>This switch disables the Python package installer, which is not
     64          needed at this stage.</para>
     65        </listitem>
     66      </varlistentry>
    7967
    8068    </variablelist>
     
    8472<screen><userinput remap="make">make</userinput></screen>
    8573
    86     <para>To test the results, issue <command>make test</command>.
    87     Some tests requiring network connection or additional packages are
    88     skipped.  The test named test_normalization fails because network
    89     configuration is not completed yet.  For more comprehensive results,
    90     the test can be rerun when Python 3 is reinstalled in BLFS.</para>
    91 
    9274    <para>Install the package:</para>
    9375
    94 <screen><userinput remap="install">make install
    95 chmod -v 755 /usr/lib/libpython&python-minor;.so
    96 chmod -v 755 /usr/lib/libpython3.so
    97 ln -sfv pip&python-minor; /usr/bin/pip3</userinput></screen>
    98 
    99     <variablelist>
    100       <title>The meaning of the install commands:</title>
    101 <!-- ======  Change 8m if Python minor version changes ======= -->
    102     <varlistentry>
    103       <term><command>chmod -v 755 /usr/lib/libpython3.{8.,}so</command></term>
    104       <listitem>
    105         <para>Fix permissions for libraries to be consistent with other
    106         libraries.</para>
    107       </listitem>
    108     </varlistentry>
    109 
    110     </variablelist>
    111 
    112     <para>If desired, install the preformatted documentation:</para>
    113 
    114 <screen><userinput remap="install">install -v -dm755 /usr/share/doc/python-&python-version;/html
    115 
    116 tar --strip-components=1  \
    117     --no-same-owner       \
    118     --no-same-permissions \
    119     -C /usr/share/doc/python-&python-version;/html \
    120     -xvf ../python-&python-version;-docs-html.tar.bz2</userinput></screen>
    121 
    122     <variablelist>
    123       <title>The meaning of the documentation install commands:</title>
    124 
    125     <varlistentry>
    126       <term><option>--no-same-owner</option> and <option>--no-same-permissions</option></term>
    127       <listitem>
    128         <para>Ensure the installed files have the correct ownership and
    129         permissions.  Without these options, using <application>tar</application>
    130         will install the package files with the upstream creator's values.
    131         </para>
    132       </listitem>
    133     </varlistentry>
    134 
    135     </variablelist>
     76<screen><userinput remap="install">make install</userinput></screen>
    13677
    13778  </sect2>
    13879
    139   <sect2 id="contents-python" role="content">
    140     <title>Contents of Python 3</title>
     80  <sect2 role="content">
     81    <title/>
    14182
    142     <segmentedlist>
    143       <segtitle>Installed Programs</segtitle>
    144       <segtitle>Installed Library</segtitle>
    145       <segtitle>Installed Directories</segtitle>
    146 
    147       <seglistitem>
    148         <seg>
    149           2to3, idle3, pip3, pydoc3, python3, and python3-config
    150         </seg>
    151         <seg>
    152           libpython&python-minor;.so and libpython3.so
    153         </seg>
    154         <seg>
    155           /usr/include/python&python-minor;,
    156           /usr/lib/python3, and
    157           /usr/share/doc/python-&python-version;
    158         </seg>
    159       </seglistitem>
    160     </segmentedlist>
    161 
    162     <variablelist>
    163       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
    164       <?dbfo list-presentation="list"?>
    165       <?dbhtml list-presentation="table"?>
    166 
    167       <varlistentry id="python-2to3">
    168         <term><command>2to3</command></term>
    169         <listitem>
    170           <para>
    171             is a <application>Python</application> program that reads
    172             <application>Python 2.x</application> source code and applies a
    173             series of fixes to transform it into valid
    174             <application>Python 3.x</application> code.
    175           </para>
    176           <indexterm zone="ch-system-Python">
    177             <primary sortas="b-2to3">2to3</primary>
    178           </indexterm>
    179         </listitem>
    180       </varlistentry>
    181 
    182       <varlistentry id="idle3">
    183         <term><command>idle3</command></term>
    184         <listitem>
    185           <para>
    186             is a wrapper script that opens a <application>Python</application>
    187             aware GUI editor. For this script to run, you must have installed
    188             <application>Tk</application> before Python so that the Tkinter
    189             Python module is built.
    190           </para>
    191           <indexterm zone="ch-system-Python">
    192             <primary sortas="b-idle3">idle3</primary>
    193           </indexterm>
    194         </listitem>
    195       </varlistentry>
    196 
    197       <varlistentry id="pip3">
    198         <term><command>pip3</command></term>
    199         <listitem>
    200           <para>
    201             The package installer for Python. You can use pip to install
    202             packages from Python Package Index and other indexes.
    203           </para>
    204           <indexterm zone="ch-system-Python">
    205             <primary sortas="b-pip3">pip3</primary>
    206           </indexterm>
    207         </listitem>
    208       </varlistentry>
    209 
    210       <varlistentry id="pydoc3">
    211         <term><command>pydoc3</command></term>
    212         <listitem>
    213           <para>
    214             is the <application>Python</application> documentation tool.
    215           </para>
    216           <indexterm zone="ch-system-Python">
    217             <primary sortas="b-pydoc3">pydoc3</primary>
    218           </indexterm>
    219         </listitem>
    220       </varlistentry>
    221 
    222       <varlistentry id="python3">
    223         <term><command>python3</command></term>
    224         <listitem>
    225           <para>
    226             is an interpreted, interactive, object-oriented programming
    227             language.
    228           </para>
    229           <indexterm zone="ch-system-Python">
    230             <primary sortas="b-python3">python3</primary>
    231           </indexterm>
    232         </listitem>
    233       </varlistentry>
    234 <!--
    235       <varlistentry id="pyvenv">
    236         <term><command>pyvenv</command></term>
    237         <listitem>
    238           <para>
    239             creates virtual <application>Python</application> environments in
    240             one or more target directories.
    241           </para>
    242           <indexterm zone="ch-system-Python">
    243             <primary sortas="b-pyvenv">pyvenv</primary>
    244           </indexterm>
    245         </listitem>
    246       </varlistentry>
    247 -->
    248     </variablelist>
     83    <para>Details on this package are located in
     84    <xref linkend="contents-python" role="."/></para>
    24985
    25086  </sect2>
    25187
    25288</sect1>
    253 
Note: See TracChangeset for help on using the changeset viewer.