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
RevLine 
[52d29f7]1<?xml version="1.0" encoding="ISO-8859-1"?>
[6732c094]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[52d29f7]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
[2cee003]7 <!ENTITY python3-download-http
[3f89ec5]8 "https://www.python.org/ftp/python/&python3-version;/Python-&python3-version;.tar.xz">
[355495ce]9 <!ENTITY python3-download-ftp " ">
[4be7bcd]10 <!ENTITY python3-md5sum "fe92acfa0db9b9f5044958edb451d463">
[3df4c93]11 <!ENTITY python3-size "19 MB">
[4be7bcd]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)">
[e882fc37]14 <!--
[73353e7f]15 Note: Size does not reflect docs that were install in LFS.
[3df4c93]16 -->
[2cee003]17 <!ENTITY python3htmldoc-download-http
[1fe05eb]18 "https://www.python.org/ftp/python/doc/&python3-version;/python-&python3-version;-docs-html.tar.bz2">
[877b80ac]19 <!ENTITY python3-docs-md5sum "b740495c9f6714e0998894ed8d1cb379" >
[52d29f7]20]>
21
[b88be39]22<sect1 id="python3" xreflabel="Python-&python3-version;">
23 <?dbhtml filename="python3.html" ?>
[83f69e5d]24
25 <sect1info>
26 <date>$Date$</date>
27 </sect1info>
28
[b88be39]29 <title>Python-&python3-version;</title>
[83f69e5d]30
[b88be39]31 <indexterm zone="python3">
[03d30cf]32 <primary sortas="a-Python3">Python3</primary>
[83f69e5d]33 </indexterm>
34
35 <sect2 role="package">
[03d30cf]36 <title>Introduction to Python 3</title>
[83f69e5d]37
[355495ce]38 <para>
[03d30cf]39 The <application>Python 3</application> package contains the
[355495ce]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>
[48b816cb]44
[de33b2a]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
[b9a6bcc0]49 are needed, or to upgrade this package.
[de33b2a]50 </para>
51 </note>
[60ddbaf]52
[ce1dd9df]53 &lfs112_checked;
[48b816cb]54
[bd68243]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
[ea3ad858]62 <xref linkend="gobject-introspection"/>,
[bd68243]63 <xref linkend="opencv"/>,
[bf09c25]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>.
[bd68243]69 </para>
[ec288f7]70
71 <para>
[ea3ad858]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"/>.
[ec288f7]82 </para>
[bd68243]83 </important>
84
[83f69e5d]85 <bridgehead renderas="sect3">Package Information</bridgehead>
86 <itemizedlist spacing="compact">
87 <listitem>
[355495ce]88 <para>
89 Download (HTTP): <ulink url="&python3-download-http;"/>
90 </para>
[83f69e5d]91 </listitem>
92 <listitem>
[355495ce]93 <para>
94 Download (FTP): <ulink url="&python3-download-ftp;"/>
95 </para>
[83f69e5d]96 </listitem>
97 <listitem>
[355495ce]98 <para>
99 Download MD5 sum: &python3-md5sum;
100 </para>
[83f69e5d]101 </listitem>
102 <listitem>
[355495ce]103 <para>
104 Download size: &python3-size;
105 </para>
[83f69e5d]106 </listitem>
107 <listitem>
[355495ce]108 <para>
109 Estimated disk space required: &python3-buildsize;
110 </para>
[83f69e5d]111 </listitem>
112 <listitem>
[355495ce]113 <para>
114 Estimated build time: &python3-time;
115 </para>
[83f69e5d]116 </listitem>
117 </itemizedlist>
[e882fc37]118
[3df4c93]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
[03d30cf]133 <bridgehead renderas="sect3">Python 3 Dependencies</bridgehead>
[e882fc37]134
[693f28e1]135 <bridgehead renderas="sect4">Recommended</bridgehead>
136 <para role="recommended">
[a82b5f44]137 <xref linkend="sqlite"/> (required if building firefox or thunderbird)
[693f28e1]138 </para>
139
[83f69e5d]140 <bridgehead renderas="sect4">Optional</bridgehead>
[355495ce]141 <para role="optional">
[7fe0ce3b]142 <xref linkend="bluez"/>,
[e882fc37]143 <xref linkend="gdb"/> (required for some tests),
144 <xref linkend="valgrind"/>, and
[4e207bb]145 <ulink url="https://www.bytereef.org/mpdecimal/">libmpdec</ulink>
[355495ce]146 </para>
147
148 <bridgehead renderas="sect4">Optional (For Additional Modules)</bridgehead>
149 <para role="optional">
[9464475]150 <xref linkend="db"/>,
151 <xref linkend="libnsl"/>, and
[6030130]152 <xref linkend="tk"/>
[355495ce]153 </para>
[ce33273]154
[1039de3]155 <para condition="html" role="usernotes">User Notes:
[355495ce]156 <ulink url="&blfs-wiki;/Python3"/>
157 </para>
[83f69e5d]158 </sect2>
159
160 <sect2 role="installation">
[03d30cf]161 <title>Installation of Python 3</title>
[83f69e5d]162
[355495ce]163 <para>
[03d30cf]164 Install <application>Python 3</application> by running the following
[355495ce]165 commands:
166 </para>
[83f69e5d]167
[a87fb41]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;
[83f69e5d]174make</userinput></screen>
175
[355495ce]176 <para>
[8bed3aa1]177 To test the result, issue <command>make test</command>.
[4be7bcd]178 Some tests may need an Internet connection. <!--Two tests, test_distutils
179 and test_peg_generator are known to fail.-->
[355495ce]180 </para>
181
182 <para>
183 Now, as the <systemitem class="username">root</systemitem> user:
184 </para>
185
[3df4c93]186<screen role="root"><userinput>make install</userinput></screen>
187
188 <para>
[1fe05eb]189 If upgrading and the documentation has been downloaded, optionally install
[3df4c93]190 it as the &root; user:
191 </para>
192
[4be7bcd]193<screen role="root"><userinput>install -v -dm755 /usr/share/doc/python-&python3-version;/html
194
195tar --strip-components=1 \
[3df4c93]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>
[1970f00]200
[879d269]201 </sect2>
202
203 <sect2 role="commands">
204 <title>Command Explanations</title>
205
[fd69a62]206 <para>
207 <command> CXX="/usr/bin/g++" ./configure ...</command>: Avoid an annoying
208 message during configuration.
209 </para>
210
[355495ce]211 <para>
[f1d7196]212 <parameter>--with-system-expat</parameter>: This switch enables linking
213 against the system version of <application>Expat</application>.
[355495ce]214 </para>
215
216 <para>
[f1d7196]217 <parameter>--with-system-ffi</parameter>: This switch enables linking
[8558044]218 against the system version of <application>libffi</application>.
[82fac2c]219 </para>
[988edbf5]220<!--
[fd69a62]221 <para>
[6e94284]222 <parameter>- -with-ensurepip=yes</parameter> : This switch enables building
[8558044]223 the <command>pip</command> and <command>setuptools</command> packaging
[229d069]224 programs. <command>setuptools</command> is needed for building some
225 Python modules.
[fd69a62]226 </para>
[988edbf5]227-->
[f1d7196]228 <para>
229 <option>--with-dbmliborder=bdb:gdbm:ndbm</option>: Use this switch
[229d069]230 if you want to build the <application>Python</application> DBM Module
[f1d7196]231 against <application>Berkeley DB</application> instead of
232 <application>GDBM</application>.
233 </para>
234
[7c57f82]235 <para>
[a0bb9145]236 <parameter>--enable-optimizations</parameter>: This switch enables
[a87fb41]237 stable, but expensive, optimizations.
[7c57f82]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
[4e207bb]243 class="libraryfile">/usr/lib/python&python3-majorver;/config-&python3-majorver;-&lt;arch&gt;-linux-gnu/libpython&python3-majorver;.a</filename>
[7c57f82]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>
[7224506]248
[879d269]249 </sect2>
250
251 <sect2 role="configuration">
[03d30cf]252 <title>Configuring Python 3</title>
[879d269]253
[355495ce]254 <para>
[03d30cf]255 In order for <command>python3</command> to find the installed
[d7015e7]256 documentation, create the following version independent symlink:
[355495ce]257 </para>
[1970f00]258
[d7015e7]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>
[83f69e5d]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>
[355495ce]279 <seg>
[f2ff0e4]280 2to3 (symlink) and
[355495ce]281 2to3-&python3-majorver;,
282
[229d069]283 <!--
[f2ff0e4]284 easy_install-&python3-majorver;,
[229d069]285 -->
[f2ff0e4]286
287 idle3 (symlink) and
288 idle&python3-majorver;,
[f5c5306]289
[f2ff0e4]290 pip3 (symlink) and
291 pip&python3-majorver;,
292
[4873baa]293 pydoc3 and
[355495ce]294 pydoc&python3-majorver;,
295
[7fe0ce3b]296 python3 (symlink);
[f2ff0e4]297 python&python3-majorver;, and
[355495ce]298
[f2ff0e4]299 python3-config (symlink) and
300 python&python3-majorver;-config
[355495ce]301 </seg>
302 <seg>
[9e91b25]303 libpython&python3-majorver;.so and libpython3.so
[355495ce]304 </seg>
305 <seg>
[9e91b25]306 /usr/include/python&python3-majorver;,
[355495ce]307 /usr/lib/python&python3-majorver;, and
308 /usr/share/doc/python-&python3-version;
309 </seg>
[83f69e5d]310 </seglistitem>
311 </segmentedlist>
312
313 <variablelist>
314 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
315 <?dbfo list-presentation="list"?>
316 <?dbhtml list-presentation="table"?>
[f2ff0e4]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 -->
[229d069]331 <!--
[f2ff0e4]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
[4c24eb0a]337 through the PIP package manager
[f2ff0e4]338 </para>
339 <indexterm zone="python3 easy_install">
340 <primary sortas="python3 easy_install">easy_install</primary>
341 </indexterm>
342 </listitem>
343 </varlistentry>
[229d069]344 -->
[355495ce]345 <varlistentry id="idle3">
346 <term><command>idle3</command></term>
[83f69e5d]347 <listitem>
[355495ce]348 <para>
[d0aecd33]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
[4c24eb0a]352 Python module is built
[355495ce]353 </para>
354 <indexterm zone="python3 idle3">
355 <primary sortas="b-idle3">idle3</primary>
[83f69e5d]356 </indexterm>
357 </listitem>
358 </varlistentry>
359
[355495ce]360 <varlistentry id="pydoc3">
361 <term><command>pydoc3</command></term>
[83f69e5d]362 <listitem>
[355495ce]363 <para>
364 is the <application>Python</application> documentation
[4c24eb0a]365 tool
[355495ce]366 </para>
367 <indexterm zone="python3 pydoc3">
368 <primary sortas="b-pydoc3">pydo3c</primary>
[83f69e5d]369 </indexterm>
370 </listitem>
371 </varlistentry>
372
[b88be39]373 <varlistentry id="python3-prog">
[2cee003]374 <term><command>python3</command></term>
[83f69e5d]375 <listitem>
[355495ce]376 <para>
377 is an interpreted, interactive, object-oriented programming
[4c24eb0a]378 language
[355495ce]379 </para>
[b88be39]380 <indexterm zone="python3 python3-prog">
381 <primary sortas="b-python3">python3</primary>
[83f69e5d]382 </indexterm>
383 </listitem>
384 </varlistentry>
385
[f67f5387]386 <varlistentry id="python-ver">
[b88be39]387 <term><command>python&python3-majorver;</command></term>
[83f69e5d]388 <listitem>
[355495ce]389 <para>
390 is a version-specific name for the <command>python</command>
[4c24eb0a]391 program
[355495ce]392 </para>
[b88be39]393 <indexterm zone="python3 python-ver">
[4c24eb0a]394 <primary sortas="b-python&python3-majorver;">python&python3-majorver;</primary>
[83f69e5d]395 </indexterm>
396 </listitem>
397 </varlistentry>
[f2ff0e4]398 <!--
[21e8edc]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>
[f2ff0e4]412 -->
[83f69e5d]413 </variablelist>
414
415 </sect2>
[f45b1953]416
417</sect1>
Note: See TracBrowser for help on using the repository browser.