source: chapter08/python.xml@ feed564d

ml-11.0 multilib
Last change on this file since feed564d was 24c34df, checked in by Xi Ruoyao <xry111@…>, 3 years ago

Revert "Fix a header file in python, so that #include <python3.9/Python.h> works."

This reverts commit 2772bb9c30d8bc9fe97405cf6135c7b43ac0aa16.

Python maintainers rejects the proposed fix in
https://bugs.python.org/issue39026. We'll need to make a correct fix,
or patch the downstream packages instead.

  • Property mode set to 100644
File size: 6.9 KB
Line 
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
8<sect1 id="ch-system-Python" role="wrap">
9 <?dbhtml filename="Python.html"?>
10
11 <sect1info condition="script">
12 <productname>Python</productname>
13 <productnumber>&python-version;</productnumber>
14 <address>&python-url;</address>
15 </sect1info>
16
17 <title>Python-&python-version;</title>
18
19 <indexterm zone="ch-system-Python">
20 <primary sortas="a-Python">Python</primary>
21 </indexterm>
22
23 <sect2 role="package">
24 <title/>
25
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>
29
30 <segmentedlist>
31 <segtitle>&buildtime;</segtitle>
32 <segtitle>&diskspace;</segtitle>
33
34 <seglistitem>
35 <seg>&python-fin-sbu;</seg>
36 <seg>&python-fin-du;</seg>
37 </seglistitem>
38 </segmentedlist>
39
40 </sect2>
41
42 <sect2 role="installation">
43 <title>Installation of Python 3</title>
44
45 <para>Prepare Python for compilation:</para>
46
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>
52
53 <variablelist>
54 <title>The meaning of the configure options:</title>
55
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>
79
80 </variablelist>
81
82 <para>Compile the package:</para>
83
84<screen><userinput remap="make">make</userinput></screen>
85
86 <para>To test the results, issue:</para>
87
88<screen><userinput remap="test">make test</userinput></screen>
89
90 <para>Some tests requiring a network connection or additional packages are
91 skipped. The test named test_normalization is known to fail. For
92 more comprehensive results, the tests can be rerun when Python 3 is
93 reinstalled in BLFS.</para>
94
95 <para>Install the package:</para>
96
97<screen><userinput remap="install">make install</userinput></screen>
98
99 <para>If desired, install the preformatted documentation:</para>
100
101<screen><userinput remap="install">install -v -dm755 /usr/share/doc/python-&python-version;/html
102
103tar --strip-components=1 \
104 --no-same-owner \
105 --no-same-permissions \
106 -C /usr/share/doc/python-&python-version;/html \
107 -xvf ../python-&python-version;-docs-html.tar.bz2</userinput></screen>
108
109 <variablelist>
110 <title>The meaning of the documentation install commands:</title>
111
112 <varlistentry>
113 <term><option>--no-same-owner</option> and <option>--no-same-permissions</option></term>
114 <listitem>
115 <para>Ensure the installed files have the correct ownership and
116 permissions. Without these options, using <application>tar</application>
117 will install the package files with the upstream creator's values.
118 </para>
119 </listitem>
120 </varlistentry>
121
122 </variablelist>
123
124 </sect2>
125
126 <sect2 id="contents-python" role="content">
127 <title>Contents of Python 3</title>
128
129 <segmentedlist>
130 <segtitle>Installed Programs</segtitle>
131 <segtitle>Installed Library</segtitle>
132 <segtitle>Installed Directories</segtitle>
133
134 <seglistitem>
135 <seg>
136 2to3, idle3, pip3, pydoc3, python3, and python3-config
137 </seg>
138 <seg>
139 libpython&python-minor;.so and libpython3.so
140 </seg>
141 <seg>
142 /usr/include/python&python-minor;,
143 /usr/lib/python3, and
144 /usr/share/doc/python-&python-version;
145 </seg>
146 </seglistitem>
147 </segmentedlist>
148
149 <variablelist>
150 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
151 <?dbfo list-presentation="list"?>
152 <?dbhtml list-presentation="table"?>
153
154 <varlistentry id="python-2to3">
155 <term><command>2to3</command></term>
156 <listitem>
157 <para>
158 is a <application>Python</application> program that reads
159 <application>Python 2.x</application> source code and applies a
160 series of fixes to transform it into
161 valid <application>Python 3.x</application> code
162 </para>
163 <indexterm zone="ch-system-Python">
164 <primary sortas="b-2to3">2to3</primary>
165 </indexterm>
166 </listitem>
167 </varlistentry>
168
169 <varlistentry id="idle3">
170 <term><command>idle3</command></term>
171 <listitem>
172 <para>
173 is a wrapper script that opens a <application>Python</application>
174 aware GUI editor. For this script to run, you must have installed
175 <application>Tk</application> before Python so that the Tkinter
176 Python module is built
177 </para>
178 <indexterm zone="ch-system-Python">
179 <primary sortas="b-idle3">idle3</primary>
180 </indexterm>
181 </listitem>
182 </varlistentry>
183
184 <varlistentry id="pip3">
185 <term><command>pip3</command></term>
186 <listitem>
187 <para>
188 The package installer for Python. You can use pip to install
189 packages from Python Package Index and other indexes
190 </para>
191 <indexterm zone="ch-system-Python">
192 <primary sortas="b-pip3">pip3</primary>
193 </indexterm>
194 </listitem>
195 </varlistentry>
196
197 <varlistentry id="pydoc3">
198 <term><command>pydoc3</command></term>
199 <listitem>
200 <para>
201 is the <application>Python</application> documentation tool
202 </para>
203 <indexterm zone="ch-system-Python">
204 <primary sortas="b-pydoc3">pydoc3</primary>
205 </indexterm>
206 </listitem>
207 </varlistentry>
208
209 <varlistentry id="python3">
210 <term><command>python3</command></term>
211 <listitem>
212 <para>
213 is an interpreted, interactive, object-oriented programming
214 language
215 </para>
216 <indexterm zone="ch-system-Python">
217 <primary sortas="b-python3">python3</primary>
218 </indexterm>
219 </listitem>
220 </varlistentry>
221
222 </variablelist>
223
224 </sect2>
225
226</sect1>
227
Note: See TracBrowser for help on using the repository browser.