source: general/prog/python3.xml@ 82fac2c

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 82fac2c was 82fac2c, checked in by Krejzi <krejzi@…>, 11 years ago

Package updates and some modifications. See changelog.xml for details.

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

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