source: general/prog/python3.xml@ 41d241e

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt nosym perl-modules 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 41d241e was 41d241e, checked in by Fernando de Oliveira <fernando@…>, 9 years ago
  • Update to ntp-4.2.8p4 - Security update.
  • graphviz-2.38.0 fails to build with ghostscript-9.18.
  • audiofile-0.3.6: tests DO pass with --disable-static.
  • Update to gnutls-3.4.6.
  • Update to nss-3.20.1.
  • Update to nspr-4.10.10.
  • libmpeg2-0.5.1: install only shared libraries.
  • libquicktime-1.2.4: rephase one paragrah about doxygen.
  • libcanberra-0.30: include some "Command Explanations and fix one directory.
  • Python-3.4.3: replace PYTHONDOCS by unversioned value, no need to remember to fix profile for user or glogal one.
  • ghostscript-9.16: fix instruction for symlink to docs, for eventual reinstal.
  • libogg-1.3.2: reformat.
  • FAAD2-2.7: reformat.
  • faac-1.28: reformat.

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

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