source: general/prog/python3.xml@ 877b80ac

11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since 877b80ac was 877b80ac, checked in by Pierre Labastie <pierre.labastie@…>, 18 months ago

Fix python-docs md5

  • Property mode set to 100644
File size: 11.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 <!ENTITY python3-download-http
8 "https://www.python.org/ftp/python/&python3-version;/Python-&python3-version;.tar.xz">
9 <!ENTITY python3-download-ftp " ">
10 <!ENTITY python3-md5sum "fe92acfa0db9b9f5044958edb451d463">
11 <!ENTITY python3-size "19 MB">
12 <!ENTITY python3-buildsize "282 MB (add 63 MB for tests)">
13 <!ENTITY python3-time "2.1 SBU (add 1.2 SBU for tests; both using parallelism=4)">
14 <!--
15 Note: Size does not reflect docs that were install in LFS.
16 -->
17 <!ENTITY python3htmldoc-download-http
18 "https://www.python.org/ftp/python/doc/&python3-version;/python-&python3-version;-docs-html.tar.bz2">
19 <!ENTITY python3-docs-md5sum "b740495c9f6714e0998894ed8d1cb379" >
20]>
21
22<sect1 id="python3" xreflabel="Python-&python3-version;">
23 <?dbhtml filename="python3.html" ?>
24
25 <sect1info>
26 <date>$Date$</date>
27 </sect1info>
28
29 <title>Python-&python3-version;</title>
30
31 <indexterm zone="python3">
32 <primary sortas="a-Python3">Python3</primary>
33 </indexterm>
34
35 <sect2 role="package">
36 <title>Introduction to Python 3</title>
37
38 <para>
39 The <application>Python 3</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 <note>
46 <para>
47 <application>Python 3</application> was installed in LFS.
48 The only reason to rebuild it here is if optional modules
49 are needed, or to upgrade this package.
50 </para>
51 </note>
52
53 &lfs112_checked;
54
55 <bridgehead renderas="sect3">Package Information</bridgehead>
56 <itemizedlist spacing="compact">
57 <listitem>
58 <para>
59 Download (HTTP): <ulink url="&python3-download-http;"/>
60 </para>
61 </listitem>
62 <listitem>
63 <para>
64 Download (FTP): <ulink url="&python3-download-ftp;"/>
65 </para>
66 </listitem>
67 <listitem>
68 <para>
69 Download MD5 sum: &python3-md5sum;
70 </para>
71 </listitem>
72 <listitem>
73 <para>
74 Download size: &python3-size;
75 </para>
76 </listitem>
77 <listitem>
78 <para>
79 Estimated disk space required: &python3-buildsize;
80 </para>
81 </listitem>
82 <listitem>
83 <para>
84 Estimated build time: &python3-time;
85 </para>
86 </listitem>
87 </itemizedlist>
88
89 <bridgehead renderas="sect3">Additional Optional Download</bridgehead>
90 <itemizedlist spacing="compact">
91 <listitem>
92 <para>
93 Download (HTTP): <ulink url="&python3htmldoc-download-http;"/>
94 </para>
95 </listitem>
96 <listitem>
97 <para>
98 Download MD5 sum: &python3-docs-md5sum;
99 </para>
100 </listitem>
101 </itemizedlist>
102
103 <bridgehead renderas="sect3">Python 3 Dependencies</bridgehead>
104
105 <bridgehead renderas="sect4">Recommended</bridgehead>
106 <para role="recommended">
107 <xref linkend="sqlite"/> (required if building firefox or thunderbird)
108 </para>
109
110 <bridgehead renderas="sect4">Optional</bridgehead>
111 <para role="optional">
112 <xref linkend="bluez"/>,
113 <xref linkend="gdb"/> (required for some tests),
114 <xref linkend="valgrind"/>, and
115 <ulink url="https://www.bytereef.org/mpdecimal/">libmpdec</ulink>
116 </para>
117
118 <bridgehead renderas="sect4">Optional (For Additional Modules)</bridgehead>
119 <para role="optional">
120 <xref linkend="db"/>,
121 <xref linkend="libnsl"/>, and
122 <xref linkend="tk"/>
123 </para>
124
125 <para condition="html" role="usernotes">User Notes:
126 <ulink url="&blfs-wiki;/Python3"/>
127 </para>
128 </sect2>
129
130 <sect2 role="installation">
131 <title>Installation of Python 3</title>
132
133 <para>
134 Install <application>Python 3</application> by running the following
135 commands:
136 </para>
137
138<screen><userinput>CXX="/usr/bin/g++" \
139./configure --prefix=/usr \
140 --enable-shared \
141 --with-system-expat \
142 --with-system-ffi \
143 --enable-optimizations &amp;&amp;
144make</userinput></screen>
145
146 <para>
147 To test the result, issue <command>make test</command>.
148 Some tests may need an Internet connection. <!--Two tests, test_distutils
149 and test_peg_generator are known to fail.-->
150 </para>
151
152 <para>
153 Now, as the <systemitem class="username">root</systemitem> user:
154 </para>
155
156<screen role="root"><userinput>make install</userinput></screen>
157
158 <para>
159 If upgrading and the documentation has been downloaded, optionally install
160 it as the &root; user:
161 </para>
162
163<screen role="root"><userinput>install -v -dm755 /usr/share/doc/python-&python3-version;/html
164
165tar --strip-components=1 \
166 --no-same-owner \
167 --no-same-permissions \
168 -C /usr/share/doc/python-&python3-version;/html \
169 -xvf ../python-&python3-version;-docs-html.tar.bz2</userinput></screen>
170
171 </sect2>
172
173 <sect2 role="commands">
174 <title>Command Explanations</title>
175
176 <para>
177 <command> CXX="/usr/bin/g++" ./configure ...</command>: Avoid an annoying
178 message during configuration.
179 </para>
180
181 <para>
182 <parameter>--with-system-expat</parameter>: This switch enables linking
183 against the system version of <application>Expat</application>.
184 </para>
185
186 <para>
187 <parameter>--with-system-ffi</parameter>: This switch enables linking
188 against the system version of <application>libffi</application>.
189 </para>
190<!--
191 <para>
192 <parameter>- -with-ensurepip=yes</parameter> : This switch enables building
193 the <command>pip</command> and <command>setuptools</command> packaging
194 programs. <command>setuptools</command> is needed for building some
195 Python modules.
196 </para>
197-->
198 <para>
199 <option>--with-dbmliborder=bdb:gdbm:ndbm</option>: Use this switch
200 if you want to build the <application>Python</application> DBM Module
201 against <application>Berkeley DB</application> instead of
202 <application>GDBM</application>.
203 </para>
204
205 <para>
206 <parameter>--enable-optimizations</parameter>: This switch enables
207 stable, but expensive, optimizations.
208 </para>
209
210 <para>
211 <option>--with-lto</option>: This optional switch enables thick Link
212 Time Optimization. Unusually, it creates a much larger <filename
213 class="libraryfile">/usr/lib/python&python3-majorver;/config-&python3-majorver;-&lt;arch&gt;-linux-gnu/libpython&python3-majorver;.a</filename>
214 with a small increase in the time to compile
215 <application>Python</application>. Run-time results do not appear to show
216 any benefit from doing this.
217 </para>
218
219 </sect2>
220
221 <sect2 role="configuration">
222 <title>Configuring Python 3</title>
223
224 <para>
225 In order for <command>python3</command> to find the installed
226 documentation, create the following version independent symlink:
227 </para>
228
229<screen role="root"><userinput>ln -svfn python-&python3-version; /usr/share/doc/python-3</userinput></screen>
230
231 <para>
232 and add the following environment variable to the individual user's or
233 system's profile:
234 </para>
235
236<screen role="root"><userinput>export PYTHONDOCS=/usr/share/doc/python-3/html</userinput></screen>
237
238 </sect2>
239
240 <sect2 role="content">
241 <title>Contents</title>
242
243 <segmentedlist>
244 <segtitle>Installed Programs</segtitle>
245 <segtitle>Installed Libraries</segtitle>
246 <segtitle>Installed Directories</segtitle>
247
248 <seglistitem>
249 <seg>
250 2to3 (symlink) and
251 2to3-&python3-majorver;,
252
253 <!--
254 easy_install-&python3-majorver;,
255 -->
256
257 idle3 (symlink) and
258 idle&python3-majorver;,
259
260 pip3 (symlink) and
261 pip&python3-majorver;,
262
263 pydoc3 and
264 pydoc&python3-majorver;,
265
266 python3 (symlink);
267 python&python3-majorver;, and
268
269 python3-config (symlink) and
270 python&python3-majorver;-config
271 </seg>
272 <seg>
273 libpython&python3-majorver;.so and libpython3.so
274 </seg>
275 <seg>
276 /usr/include/python&python3-majorver;,
277 /usr/lib/python&python3-majorver;, and
278 /usr/share/doc/python-&python3-version;
279 </seg>
280 </seglistitem>
281 </segmentedlist>
282
283 <variablelist>
284 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
285 <?dbfo list-presentation="list"?>
286 <?dbhtml list-presentation="table"?>
287 <!--
288 <varlistentry id="2to3">
289 <term><command>2to3</command></term>
290 <listitem>
291 <para>
292 is designed to assist in the transition between python2 and python3
293 by automatically converting code to be Python3 compatible.
294 </para>
295 <indexterm zone="python3 2to3">
296 <primary sortas="b-2to3">2to3</primary>
297 </indexterm>
298 </listitem>
299 </varlistentry>
300 Put here for easy use when removing Python2 -->
301 <!--
302 <varlistentry id="easy_install">
303 <term><command>easy_install</command></term>
304 <listitem>
305 <para>
306 is a frontend to pip3 to make it easier to configure python modules
307 through the PIP package manager
308 </para>
309 <indexterm zone="python3 easy_install">
310 <primary sortas="python3 easy_install">easy_install</primary>
311 </indexterm>
312 </listitem>
313 </varlistentry>
314 -->
315 <varlistentry id="idle3">
316 <term><command>idle3</command></term>
317 <listitem>
318 <para>
319 is a wrapper script that opens a <application>Python</application>
320 aware GUI editor. For this script to run, you must have installed
321 <application>Tk</application> before Python so that the Tkinter
322 Python module is built
323 </para>
324 <indexterm zone="python3 idle3">
325 <primary sortas="b-idle3">idle3</primary>
326 </indexterm>
327 </listitem>
328 </varlistentry>
329
330 <varlistentry id="pydoc3">
331 <term><command>pydoc3</command></term>
332 <listitem>
333 <para>
334 is the <application>Python</application> documentation
335 tool
336 </para>
337 <indexterm zone="python3 pydoc3">
338 <primary sortas="b-pydoc3">pydo3c</primary>
339 </indexterm>
340 </listitem>
341 </varlistentry>
342
343 <varlistentry id="python3-prog">
344 <term><command>python3</command></term>
345 <listitem>
346 <para>
347 is an interpreted, interactive, object-oriented programming
348 language
349 </para>
350 <indexterm zone="python3 python3-prog">
351 <primary sortas="b-python3">python3</primary>
352 </indexterm>
353 </listitem>
354 </varlistentry>
355
356 <varlistentry id="python-ver">
357 <term><command>python&python3-majorver;</command></term>
358 <listitem>
359 <para>
360 is a version-specific name for the <command>python</command>
361 program
362 </para>
363 <indexterm zone="python3 python-ver">
364 <primary sortas="b-python&python3-majorver;">python&python3-majorver;</primary>
365 </indexterm>
366 </listitem>
367 </varlistentry>
368 <!--
369 <varlistentry id="pyvenv">
370 <term><command>pyvenv</command></term>
371 <listitem>
372 <para>
373 creates virtual <application>Python</application> environments in
374 one or more target directories.
375 </para>
376 <indexterm zone="python3 pyvenv">
377 <primary
378 sortas="b-python&python3-majorver;">python&python3-majorver;</primary>
379 </indexterm>
380 </listitem>
381 </varlistentry>
382 -->
383 </variablelist>
384
385 </sect2>
386
387</sect1>
Note: See TracBrowser for help on using the repository browser.