source: general/prog/python3.xml@ 842348b0

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 9.0 9.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 upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 842348b0 was 842348b0, checked in by Bruce Dubbs <bdubbs@…>, 5 years ago

Update to python3-3.7.4.
Update to ffmpeg-4.1.4.
Update to x265_3.1.1.
Update to nss-3.45.

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

  • Property mode set to 100644
File size: 10.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 "d33e4aae66097051c2eca45ee3604803">
11 <!ENTITY python3-size "16 MB">
12 <!ENTITY python3-buildsize "180 MB (add 22 MB for tests)">
13 <!ENTITY python3-time "1.0 SBU (add 1.1 SBU for tests)">
14 <!--
15
16 Note: Size does not reflect docs that were install in LFS.
17
18 <!ENTITY python3htmldoc-download-http
19 "https://docs.python.org/ftp/python/doc/&python3-version;/python-&python3-version;-docs-html.tar.bz2"> -->
20]>
21
22<sect1 id="python3" xreflabel="Python-&python3-version;">
23 <?dbhtml filename="python3.html" ?>
24
25 <sect1info>
26 <othername>$LastChangedBy$</othername>
27 <date>$Date$</date>
28 </sect1info>
29
30 <title>Python-&python3-version;</title>
31
32 <indexterm zone="python3">
33 <primary sortas="a-Python3">Python3</primary>
34 </indexterm>
35
36 <sect2 role="package">
37 <title>Introduction to Python 3</title>
38
39 <para>
40 The <application>Python 3</application> package contains the
41 <application>Python</application> development environment.
42 This is useful for object-oriented programming, writing scripts,
43 prototyping large programs or developing entire applications.
44 </para>
45
46 <note><para><application>Python 3</application> was installed in LFS.
47 The only reason to rebuild it here is if optional modules
48 are needed.</para></note>
49
50 &lfs84_checked;
51
52 <bridgehead renderas="sect3">Package Information</bridgehead>
53 <itemizedlist spacing="compact">
54 <listitem>
55 <para>
56 Download (HTTP): <ulink url="&python3-download-http;"/>
57 </para>
58 </listitem>
59 <listitem>
60 <para>
61 Download (FTP): <ulink url="&python3-download-ftp;"/>
62 </para>
63 </listitem>
64 <listitem>
65 <para>
66 Download MD5 sum: &python3-md5sum;
67 </para>
68 </listitem>
69 <listitem>
70 <para>
71 Download size: &python3-size;
72 </para>
73 </listitem>
74 <listitem>
75 <para>
76 Estimated disk space required: &python3-buildsize;
77 </para>
78 </listitem>
79 <listitem>
80 <para>
81 Estimated build time: &python3-time;
82 </para>
83 </listitem>
84 </itemizedlist>
85
86 <bridgehead renderas="sect3">Python 3 Dependencies</bridgehead>
87
88 <bridgehead renderas="sect4">Optional</bridgehead>
89 <para role="optional">
90 <xref linkend="bluez"/>,
91 <xref linkend="gdb"/> (required for some tests),
92 <xref linkend="valgrind"/>, and
93 <ulink url="http://www.bytereef.org/mpdecimal">libmpcdec</ulink>
94 </para>
95
96 <bridgehead renderas="sect4">Optional (For Additional Modules)</bridgehead>
97 <para role="optional">
98 <xref linkend="db"/> and
99 <xref linkend="sqlite"/>
100 </para>
101
102 <para condition="html" role="usernotes">User Notes:
103 <ulink url="&blfs-wiki;/Python3"/>
104 </para>
105 </sect2>
106
107 <sect2 role="installation">
108 <title>Installation of Python 3</title>
109
110 <para>
111 Install <application>Python 3</application> by running the following
112 commands:
113 </para>
114
115<screen><userinput>CXX="/usr/bin/g++" \
116./configure --prefix=/usr \
117 --enable-shared \
118 --with-system-expat \
119 --with-system-ffi \
120 --with-ensurepip=yes &amp;&amp;
121make</userinput></screen>
122
123 <para>
124 The test suite must be run separately, using an X terminal (see below).
125 </para>
126
127 <para>
128 Now, as the <systemitem class="username">root</systemitem> user:
129 </para>
130
131<screen role="root"><userinput>make install &amp;&amp;
132chmod -v 755 /usr/lib/libpython&python3-majorver;m.so &amp;&amp;
133chmod -v 755 /usr/lib/libpython3.so</userinput></screen>
134
135 <para>
136 The test suite must be run separately from the build, either before or
137 after the package is built and installed. Do not run
138 <command>make install</command> after running the test suite. To build
139 and install the package, you need to start with a fresh or clean source
140 tree. For the tests, you also need a clean source code, so either start by
141 removing the source code directory and starting over, by uncompressing
142 the source tarball or by running <command>make clean</command>. Then
143 configure again, adding <quote>--with-pydebug</quote> to the
144 <command>configure</command> switches above, run <command>make</command>,
145 then <command>make test</command>. Remember that tests must be executed
146 using an X terminal.
147 The test SBU highly depends on the speed of the internet connection.
148 </para>
149
150 </sect2>
151
152 <sect2 role="commands">
153 <title>Command Explanations</title>
154
155 <para>
156 <command> CXX="/usr/bin/g++" ./configure ...</command>: Avoid an annoying
157 message during configuration.
158 </para>
159
160 <para>
161 <parameter>--with-system-expat</parameter>: This switch enables linking
162 against the system version of <application>Expat</application>.
163 </para>
164
165 <para>
166 <parameter>--with-system-ffi</parameter>: This switch enables linking
167 against system version of <application>libffi</application>.
168 </para>
169
170 <para>
171 <parameter>--with-ensurepip=yes</parameter> : This switch enables building
172 <command>pip</command> and <command>setuptools</command> packaging programs.
173 <command>setuptools</command> is needed for building some Python modules.
174 </para>
175
176 <para>
177 <option>--with-dbmliborder=bdb:gdbm:ndbm</option>: Use this switch
178 if you want to build <application>Python</application> DBM Module
179 against <application>Berkeley DB</application> instead of
180 <application>GDBM</application>.
181 </para>
182
183 <para>
184 <command>chmod ...</command>: Fix permissions for shared libraries to be
185 consistent with other libraries.
186 </para>
187
188 </sect2>
189
190 <sect2 role="configuration">
191 <title>Configuring Python 3</title>
192
193 <para>
194 In order for <command>python3</command> to find the installed
195 documentation, create the following version independent symlink:
196 </para>
197
198<screen role="root"><userinput>ln -svfn python-&python3-version; /usr/share/doc/python-3</userinput></screen>
199
200 <para>
201 and add the following environment variable to the individual user's or
202 system's profile:
203 </para>
204
205<screen role="root"><userinput>export PYTHONDOCS=/usr/share/doc/python-3/html</userinput></screen>
206
207 </sect2>
208
209 <sect2 role="content">
210 <title>Contents</title>
211
212 <segmentedlist>
213 <segtitle>Installed Programs</segtitle>
214 <segtitle>Installed Libraries</segtitle>
215 <segtitle>Installed Directories</segtitle>
216
217 <seglistitem>
218 <seg>
219 2to3 (symlink),
220 2to3-&python3-majorver;,
221
222 idle3 (symlink), and
223 idle&python3-majorver;
224
225 pydoc3 (symlink),
226 pydoc&python3-majorver;,
227
228 python3 (symlink);
229 python&python3-majorver; and python&python3-majorver;m (hardlinked);
230
231 python3-config (symlink),
232 python&python3-majorver;-config (symlink),
233 python&python3-majorver;m-config,
234
235 pyvenv (symlink),
236 pyvenv-&python3-majorver;,
237 </seg>
238 <seg>
239 libpython&python3-majorver;m.so and libpython3.so
240 </seg>
241 <seg>
242 /usr/include/python&python3-majorver;m,
243 /usr/lib/python&python3-majorver;, and
244 /usr/share/doc/python-&python3-version;
245 </seg>
246 </seglistitem>
247 </segmentedlist>
248
249 <variablelist>
250 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
251 <?dbfo list-presentation="list"?>
252 <?dbhtml list-presentation="table"?>
253
254 <varlistentry id="idle3">
255 <term><command>idle3</command></term>
256 <listitem>
257 <para>
258 is a wrapper script that opens a <application>Python</application>
259 aware GUI editor. For this script to run, you must have installed
260 <application>Tk</application> before Python so that the Tkinter
261 Python module is built.
262 </para>
263 <indexterm zone="python3 idle3">
264 <primary sortas="b-idle3">idle3</primary>
265 </indexterm>
266 </listitem>
267 </varlistentry>
268
269 <varlistentry id="pydoc3">
270 <term><command>pydoc3</command></term>
271 <listitem>
272 <para>
273 is the <application>Python</application> documentation
274 tool.
275 </para>
276 <indexterm zone="python3 pydoc3">
277 <primary sortas="b-pydoc3">pydo3c</primary>
278 </indexterm>
279 </listitem>
280 </varlistentry>
281
282 <varlistentry id="python3-prog">
283 <term><command>python3</command></term>
284 <listitem>
285 <para>
286 is an interpreted, interactive, object-oriented programming
287 language.
288 </para>
289 <indexterm zone="python3 python3-prog">
290 <primary sortas="b-python3">python3</primary>
291 </indexterm>
292 </listitem>
293 </varlistentry>
294
295 <varlistentry id="python-ver">
296 <term><command>python&python3-majorver;</command></term>
297 <listitem>
298 <para>
299 is a version-specific name for the <command>python</command>
300 program.
301 </para>
302 <indexterm zone="python3 python-ver">
303 <primary
304 sortas="b-python&python3-majorver;">python&python3-majorver;</primary>
305 </indexterm>
306 </listitem>
307 </varlistentry>
308
309 <varlistentry id="pyvenv">
310 <term><command>pyvenv</command></term>
311 <listitem>
312 <para>
313 creates virtual <application>Python</application> environments in
314 one or more target directories.
315 </para>
316 <indexterm zone="python3 pyvenv">
317 <primary
318 sortas="b-python&python3-majorver;">python&python3-majorver;</primary>
319 </indexterm>
320 </listitem>
321 </varlistentry>
322
323 </variablelist>
324
325 </sect2>
326
327</sect1>
Note: See TracBrowser for help on using the repository browser.