source: general/prog/python3.xml@ b3aacc0

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since b3aacc0 was c525bd1, checked in by Bruce Dubbs <bdubbs@…>, 12 years ago

Update to Python-3.3.0

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@10745 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 10.3 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 <!ENTITY python3-download-http
8 "http://www.python.org/ftp/python/&python3-version;/Python-&python3-version;.tar.xz">
9 <!ENTITY python3-download-ftp " ">
10 <!ENTITY python3-md5sum "2e7533b4009ac4adae62a7797a442e7a">
11 <!ENTITY python3-size "11.2 MB">
12 <!ENTITY python3-buildsize "141 MB (additional 32 MB for the test suite)">
13 <!ENTITY python3-time "1.2 SBU (additional 2.2 SBU to run the test suite)">
14 <!ENTITY python3htmldoc-download-http
15 "http://docs.python.org/ftp/python/doc/&python3-version;/python-&python3-version;-docs-html.tar.bz2">
16 <!ENTITY python3htmldoc-md5sum "d8de7264eb5b03b54044825b765324c7">
17 <!ENTITY python3htmldoc-size "4.6 MB">
18]>
19
20<sect1 id="python3" xreflabel="Python-&python3-version;">
21 <?dbhtml filename="python3.html" ?>
22
23 <sect1info>
24 <othername>$LastChangedBy$</othername>
25 <date>$Date$</date>
26 </sect1info>
27
28 <title>Python-&python3-version;</title>
29
30 <indexterm zone="python3">
31 <primary sortas="a-Python3">Python</primary>
32 </indexterm>
33
34 <sect2 role="package">
35 <title>Introduction to Python</title>
36
37 <para>
38 The <application>Python</application> package contains the
39 <application>Python</application> development environment.
40 This is useful for object-oriented programming, writing scripts,
41 prototyping large programs or developing entire applications.
42 </para>
43
44 &lfs72_checked;
45
46 <bridgehead renderas="sect3">Package Information</bridgehead>
47 <itemizedlist spacing="compact">
48 <listitem>
49 <para>
50 Download (HTTP): <ulink url="&python3-download-http;"/>
51 </para>
52 </listitem>
53 <listitem>
54 <para>
55 Download (FTP): <ulink url="&python3-download-ftp;"/>
56 </para>
57 </listitem>
58 <listitem>
59 <para>
60 Download MD5 sum: &python3-md5sum;
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Download size: &python3-size;
66 </para>
67 </listitem>
68 <listitem>
69 <para>
70 Estimated disk space required: &python3-buildsize;
71 </para>
72 </listitem>
73 <listitem>
74 <para>
75 Estimated build time: &python3-time;
76 </para>
77 </listitem>
78 </itemizedlist>
79
80 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
81 <itemizedlist spacing="compact">
82 <title>Optional HTML Documentation</title>
83 <listitem>
84 <para>
85 Download (HTTP): <ulink url="&python3htmldoc-download-http;"/>
86 </para>
87 </listitem>
88 <listitem>
89 <para>
90 Download MD5 sum: &python3htmldoc-md5sum;
91 </para>
92 </listitem>
93 <listitem>
94 <para>
95 Download size: &python3htmldoc-size;
96 </para>
97 </listitem>
98 </itemizedlist>
99
100 <bridgehead renderas="sect3">Python Dependencies</bridgehead>
101
102 <bridgehead renderas="sect4">Recommended</bridgehead>
103 <para role="recommended">
104 <xref linkend="expat"/> and
105 <xref linkend="libffi"/>
106 </para>
107
108 <bridgehead renderas="sect4">Optional</bridgehead>
109 <para role="optional">
110 <xref linkend="bluez"/>
111 </para>
112
113 <bridgehead renderas="sect4">Optional (For Additional Modules)</bridgehead>
114 <para role="optional">
115 <xref linkend="db"/>
116 <xref linkend="openssl"/>,
117 <xref linkend="sqlite"/> and
118 <xref linkend="tk"/>
119 </para>
120
121 <para condition="html" role="usernotes">User Notes:
122 <ulink url="&blfs-wiki;/Python3"/>
123 </para>
124 </sect2>
125
126 <sect2 role="installation">
127 <title>Installation of Python</title>
128
129 <para>
130 Install <application>Python</application> by running the following
131 commands:
132 </para>
133
134<screen><userinput>sed -i "s/ndbm_libs = \[\]/ndbm_libs = ['gdbm', 'gdbm_compat']/" setup.py &amp;&amp;
135./configure --prefix=/usr \
136 --enable-shared \
137 --with-system-expat \
138 --with-system-ffi &amp;&amp;
139make</userinput></screen>
140
141 <para>
142 To test the results, issue: <command>make test</command>. Note that
143 if you have an existing <application>Python</application> installation
144 which includes the <application>PyXML</application> module, the tests could
145 produce a segmentation fault.
146 </para>
147
148 <para>
149 Now, as the <systemitem class="username">root</systemitem> user:
150 </para>
151
152<screen role="root"><userinput>make install &amp;&amp;
153chmod -v 755 /usr/lib/libpython&python3-majorver;m.so &amp;&amp;
154chmod -v 755 /usr/lib/libpython3.so</userinput></screen>
155
156 <para>
157 There is no documentation installed using the instructions above.
158 See the <filename>Doc/README.txt</filename> file in the source
159 distribution for instructions on how to create the html. Alternatively,
160 you can download preformatted documentation from
161 <ulink url="http://docs.python.org/download.html"/>.
162 </para>
163
164 <para>
165 In order to use the <command>help ('name_string')</command> feature
166 of the <command>python</command> interpreter with some statements and
167 keywords, you must download (or create) the optional HTML documentation
168 and install it. If you downloaded the HTML docs, issue the following
169 commands as the <systemitem class="username">root</systemitem> user:
170 </para>
171
172<screen role="root"><userinput>install -v -m755 -d /usr/share/doc/Python-&python3-version;/html &amp;&amp;
173tar --strip-components=1 \
174 --no-same-owner \
175 --no-same-permissions \
176 -C /usr/share/doc/Python-&python3-version;/html \
177 -xvf ../python-&python3-version;-docs-html.tar.bz2</userinput></screen>
178
179 </sect2>
180
181 <sect2 role="commands">
182 <title>Command Explanations</title>
183
184 <para>
185 <command>sed -i "s/ndbm_libs = ..." setup.py</command>: This command
186 is used to fix a build problem with the <application>GDBM</application>
187 library.
188 </para>
189
190 <para>
191 <option>--with-sytem-expat</option>: This switch enables linking against
192 system version of <application>Expat</application>. Remove if you have
193 not installed recommended dependency <xref linkend="expat"/>.
194 </para>
195
196 <para>
197 <option>--with-system-ffi</option>: This switch enables linking against
198 system version of <application>libffi</application>. Remove if you have
199 not installed recommended dependency <xref linkend="libffi"/>.
200 </para>
201
202 <para>
203 <command>chmod ...</command>: Fix permissions for shared libraries to be
204 consistent with other libraries.
205 </para>
206
207 </sect2>
208
209 <sect2 role="configuration">
210 <title>Configuring Python</title>
211
212 <para>
213 In order for <command>python</command> to find the installed
214 documentation, you must add the following environment variable to
215 individual user's or the system's profile:
216 </para>
217
218<screen role="root"><userinput>export PYTHONDOCS=/usr/share/doc/Python-&python3-version;/html</userinput></screen>
219
220 </sect2>
221
222 <sect2 role="content">
223 <title>Contents</title>
224
225 <segmentedlist>
226 <segtitle>Installed Programs</segtitle>
227 <segtitle>Installed Libraries</segtitle>
228 <segtitle>Installed Directories</segtitle>
229
230 <seglistitem>
231 <seg>
232 2to3 (symbolic link to 2to3-&python3-majorver;),
233 2to3-&python3-majorver;,
234
235 pydoc3 (symbolic link to pydoc&python3-majorver;),
236 pydoc&python3-majorver;,
237
238 python3 (hard link to python&python3-majorver;m),
239 python&python3-majorver; (hard link to python&python3-majorver;m),
240 python&python3-majorver;m,
241
242 python3-config (symbolic link to python&python3-majorver;-config),
243 python&python3-majorver;-config (symbolic link to python3-config),
244 python&python3-majorver;m-config,
245
246 and optionally if Tk is installed,
247 idle3 (symbolic link to idle&python3-majorver;),
248 idle&python3-majorver;
249 </seg>
250 <seg>
251 libpython&python3-majorver;m.so, libpython3.so and numerous
252 modules installed in /usr/lib/python&python3-majorver;
253 </seg>
254 <seg>
255 /usr/include/python&python3-majorver;m,
256 /usr/lib/python&python3-majorver;, and
257 /usr/share/doc/python-&python3-version;
258 </seg>
259 </seglistitem>
260 </segmentedlist>
261
262 <variablelist>
263 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
264 <?dbfo list-presentation="list"?>
265 <?dbhtml list-presentation="table"?>
266
267 <varlistentry id="idle3">
268 <term><command>idle3</command></term>
269 <listitem>
270 <para>
271 is a wrapper script that opens a
272 <application>Python</application> aware GUI editor.
273 </para>
274 <indexterm zone="python3 idle3">
275 <primary sortas="b-idle3">idle3</primary>
276 </indexterm>
277 </listitem>
278 </varlistentry>
279
280 <varlistentry id="pydoc3">
281 <term><command>pydoc3</command></term>
282 <listitem>
283 <para>
284 is the <application>Python</application> documentation
285 tool.
286 </para>
287 <indexterm zone="python3 pydoc3">
288 <primary sortas="b-pydoc3">pydo3c</primary>
289 </indexterm>
290 </listitem>
291 </varlistentry>
292
293 <varlistentry id="python3-prog">
294 <term><command>python3</command></term>
295 <listitem>
296 <para>
297 is an interpreted, interactive, object-oriented programming
298 language.
299 </para>
300 <indexterm zone="python3 python3-prog">
301 <primary sortas="b-python3">python3</primary>
302 </indexterm>
303 </listitem>
304 </varlistentry>
305
306 <varlistentry id="python-ver">
307 <term><command>python&python3-majorver;</command></term>
308 <listitem>
309 <para>
310 is a version-specific name for the <command>python</command>
311 program.
312 </para>
313 <indexterm zone="python3 python-ver">
314 <primary
315 sortas="b-python&python3-majorver;">python&python3-majorver;</primary>
316 </indexterm>
317 </listitem>
318 </varlistentry>
319
320 </variablelist>
321
322 </sect2>
323
324</sect1>
Note: See TracBrowser for help on using the repository browser.