python.xml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-system-Python" role="wrap">
  8. <?dbhtml filename="Python.html"?>
  9. <sect1info condition="script">
  10. <productname>Python</productname>
  11. <productnumber>&python-version;</productnumber>
  12. <address>&python-url;</address>
  13. </sect1info>
  14. <title>Python-&python-version;</title>
  15. <indexterm zone="ch-system-Python">
  16. <primary sortas="a-Python">Python</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>The Python 3 package contains the Python development environment. It
  21. is useful for object-oriented programming, writing scripts, prototyping
  22. large programs, or developing entire applications.</para>
  23. <segmentedlist>
  24. <segtitle>&buildtime;</segtitle>
  25. <segtitle>&diskspace;</segtitle>
  26. <seglistitem>
  27. <seg>&python-fin-sbu;</seg>
  28. <seg>&python-fin-du;</seg>
  29. </seglistitem>
  30. </segmentedlist>
  31. </sect2>
  32. <sect2 role="installation">
  33. <title>Installation of Python 3</title>
  34. <para>Prepare Python for compilation:</para>
  35. <screen><userinput remap="configure">./configure --prefix=/usr \
  36. --enable-shared \
  37. --with-system-expat \
  38. --with-system-ffi \
  39. --with-ensurepip=yes</userinput></screen>
  40. <variablelist>
  41. <title>The meaning of the configure options:</title>
  42. <varlistentry>
  43. <term><parameter>--with-system-expat</parameter></term>
  44. <listitem>
  45. <para>This switch enables linking against system version of
  46. <application>Expat</application>.</para>
  47. </listitem>
  48. </varlistentry>
  49. <varlistentry>
  50. <term><parameter>--with-system-ffi</parameter></term>
  51. <listitem>
  52. <para>This switch enables linking against system version of
  53. <application>libffi</application>.</para>
  54. </listitem>
  55. </varlistentry>
  56. <varlistentry>
  57. <term><parameter>--with-ensurepip=yes</parameter></term>
  58. <listitem>
  59. <para>This switch enables building <command>pip</command> and
  60. <command>setuptools</command> packaging programs.</para>
  61. </listitem>
  62. </varlistentry>
  63. </variablelist>
  64. <para>Compile the package:</para>
  65. <screen><userinput remap="make">make</userinput></screen>
  66. <para>To test the results, issue:</para>
  67. <screen><userinput remap="test">make test</userinput></screen>
  68. <para>Some tests requiring a network connection or additional packages are
  69. skipped. The test named test_unicodedata fails because network
  70. configuration is not completed yet. For more comprehensive results,
  71. the test can be rerun when Python 3 is reinstalled in BLFS.</para>
  72. <para>Install the package:</para>
  73. <screen><userinput remap="install">make install</userinput></screen>
  74. <para>If desired, install the preformatted documentation:</para>
  75. <screen><userinput remap="install">install -v -dm755 /usr/share/doc/python-&python-version;/html
  76. tar --strip-components=1 \
  77. --no-same-owner \
  78. --no-same-permissions \
  79. -C /usr/share/doc/python-&python-version;/html \
  80. -xvf ../python-&python-version;-docs-html.tar.bz2</userinput></screen>
  81. <variablelist>
  82. <title>The meaning of the documentation install commands:</title>
  83. <varlistentry>
  84. <term><option>--no-same-owner</option> and <option>--no-same-permissions</option></term>
  85. <listitem>
  86. <para>Ensure the installed files have the correct ownership and
  87. permissions. Without these options, using <application>tar</application>
  88. will install the package files with the upstream creator's values.
  89. </para>
  90. </listitem>
  91. </varlistentry>
  92. </variablelist>
  93. </sect2>
  94. <sect2 id="contents-python" role="content">
  95. <title>Contents of Python 3</title>
  96. <segmentedlist>
  97. <segtitle>Installed Programs</segtitle>
  98. <segtitle>Installed Library</segtitle>
  99. <segtitle>Installed Directories</segtitle>
  100. <seglistitem>
  101. <seg>
  102. 2to3, idle3, pip3, pydoc3, python3, and python3-config
  103. </seg>
  104. <seg>
  105. libpython&python-minor;.so and libpython3.so
  106. </seg>
  107. <seg>
  108. /usr/include/python&python-minor;,
  109. /usr/lib/python3, and
  110. /usr/share/doc/python-&python-version;
  111. </seg>
  112. </seglistitem>
  113. </segmentedlist>
  114. <variablelist>
  115. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  116. <?dbfo list-presentation="list"?>
  117. <?dbhtml list-presentation="table"?>
  118. <varlistentry id="python-2to3">
  119. <term><command>2to3</command></term>
  120. <listitem>
  121. <para>
  122. is a <application>Python</application> program that reads
  123. <application>Python 2.x</application> source code and applies a
  124. series of fixes to transform it into
  125. valid <application>Python 3.x</application> code.
  126. </para>
  127. <indexterm zone="ch-system-Python">
  128. <primary sortas="b-2to3">2to3</primary>
  129. </indexterm>
  130. </listitem>
  131. </varlistentry>
  132. <varlistentry id="idle3">
  133. <term><command>idle3</command></term>
  134. <listitem>
  135. <para>
  136. is a wrapper script that opens a <application>Python</application>
  137. aware GUI editor. For this script to run, you must have installed
  138. <application>Tk</application> before Python so that the Tkinter
  139. Python module is built.
  140. </para>
  141. <indexterm zone="ch-system-Python">
  142. <primary sortas="b-idle3">idle3</primary>
  143. </indexterm>
  144. </listitem>
  145. </varlistentry>
  146. <varlistentry id="pip3">
  147. <term><command>pip3</command></term>
  148. <listitem>
  149. <para>
  150. The package installer for Python. You can use pip to install
  151. packages from Python Package Index and other indexes.
  152. </para>
  153. <indexterm zone="ch-system-Python">
  154. <primary sortas="b-pip3">pip3</primary>
  155. </indexterm>
  156. </listitem>
  157. </varlistentry>
  158. <varlistentry id="pydoc3">
  159. <term><command>pydoc3</command></term>
  160. <listitem>
  161. <para>
  162. is the <application>Python</application> documentation tool.
  163. </para>
  164. <indexterm zone="ch-system-Python">
  165. <primary sortas="b-pydoc3">pydoc3</primary>
  166. </indexterm>
  167. </listitem>
  168. </varlistentry>
  169. <varlistentry id="python3">
  170. <term><command>python3</command></term>
  171. <listitem>
  172. <para>
  173. is an interpreted, interactive, object-oriented programming
  174. language.
  175. </para>
  176. <indexterm zone="ch-system-Python">
  177. <primary sortas="b-python3">python3</primary>
  178. </indexterm>
  179. </listitem>
  180. </varlistentry>
  181. </variablelist>
  182. </sect2>
  183. </sect1>