source: general/prog/python3.xml@ bf09c25

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 bf09c25 was bf09c25, checked in by Bruce Dubbs <bdubbs@…>, 18 months ago

Update to btrfs-progs-v6.0.1.

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