source: general/prog/python3.xml@ 4c77a949

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 4c77a949 was 4c77a949, checked in by Andrew Benton <andy@…>, 12 years ago

a bunch of lfs71_checked

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

  • Property mode set to 100644
File size: 10.0 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 "http://www.python.org/ftp/python/&python3-version;/Python-&python3-version;.tar.xz">
9 <!ENTITY python3-download-ftp
10 "&gentoo-ftp-repo;/Python-&python3-version;.tar.xz">
11 <!ENTITY python3-md5sum "3720ce9460597e49264bbb63b48b946d">
12 <!ENTITY python3-size "8.5 MB">
13 <!ENTITY python3-buildsize "141 MB (23MB for the test suite)">
14 <!ENTITY python3-time "1 SBU (additional 2.9 SBU to run the test suite)">
15 <!ENTITY python3htmldoc-download-http
16 "http://docs.python.org/ftp/python/doc/&python3-version;/python-&python3-version;-docs-html.tar.bz2">
17 <!ENTITY python3htmldoc-md5sum "55af06e320f35920ea9fed1f143e1286">
18 <!ENTITY python3htmldoc-size "4.2 MB">
19]>
20
21<sect1 id="python3" xreflabel="Python-&python3-version;">
22 <?dbhtml filename="python3.html" ?>
23
24 <sect1info>
25 <othername>$LastChangedBy$</othername>
26 <date>$Date$</date>
27 </sect1info>
28
29 <title>Python-&python3-version;</title>
30
31 <indexterm zone="python3">
32 <primary sortas="a-Python3">Python</primary>
33 </indexterm>
34
35 <sect2 role="package">
36 <title>Introduction to Python</title>
37
38 <para>The <application>Python</application> package contains the
39 <application>Python</application> development environment.
40 This is useful for object-oriented programming, writing scripts,
41 prototyping large programs or developing entire applications.</para>
42
43 <!-- Python compiled against Pth, OpenSSL, and SQLite.
44 326 tests OK, 36 tests skipped, 0 failures -->
45
46 &lfs71_checked;
47
48 <bridgehead renderas="sect3">Package Information</bridgehead>
49 <itemizedlist spacing="compact">
50 <listitem>
51 <para>Download (HTTP): <ulink url="&python3-download-http;"/></para>
52 </listitem>
53 <listitem>
54 <para>Download (FTP): <ulink url="&python3-download-ftp;"/></para>
55 </listitem>
56 <listitem>
57 <para>Download MD5 sum: &python3-md5sum;</para>
58 </listitem>
59 <listitem>
60 <para>Download size: &python3-size;</para>
61 </listitem>
62 <listitem>
63 <para>Estimated disk space required: &python3-buildsize;</para>
64 </listitem>
65 <listitem>
66 <para>Estimated build time: &python3-time;</para>
67 </listitem>
68 </itemizedlist>
69
70 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
71 <!--<itemizedlist spacing='compact'>
72 <listitem>
73 <para>Required patch: <ulink
74 url="&patch-root;/Python-&Python-version;-bdb_4.8-1.patch"/></para>
75 </listitem>
76 </itemizedlist>-->
77
78 <itemizedlist spacing='compact'>
79 <title>Optional HTML Documentation</title>
80 <listitem>
81 <para>Download (HTTP):
82 <ulink url="&python3htmldoc-download-http;"/></para>
83 </listitem>
84 <listitem>
85 <para>Download MD5 sum: &python3htmldoc-md5sum;</para>
86 </listitem>
87 <listitem>
88 <para>Download size: &python3htmldoc-size;</para>
89 </listitem>
90 </itemizedlist>
91
92 <bridgehead renderas="sect3">Python Dependencies</bridgehead>
93
94 <bridgehead renderas="sect4">Optional</bridgehead>
95 <para role="optional"><xref linkend="pth"/>,
96 <xref linkend="libffi"/> or <xref linkend="gcc"/> (install JAVA so that the
97 <filename class="libraryfile">libffi</filename> library is built), and
98 <ulink url="http://www.bluez.org/">BlueZ</ulink></para>
99
100 <bridgehead renderas="sect4">Optional
101 (to create package-specific support modules)</bridgehead>
102 <para role="optional"><xref linkend="openssl"/>,
103 <xref linkend="tk"/>,
104 <xref linkend="db"/>, and
105 <xref linkend="sqlite"/></para>
106
107 <para>Note that there is a circular dependency with the
108 <application>Tk</application> package as it requires Xorg to be installed
109 but parts of Xorg depend on <application>Python</application>.</para>
110
111 <para condition="html" role="usernotes">User Notes:
112 <ulink url="&blfs-wiki;/Python"/></para>
113
114 </sect2>
115
116 <sect2 role="installation">
117 <title>Installation of Python</title>
118
119 <para>Install <application>Python</application> by running the following
120 commands:</para>
121
122<screen><userinput>sed -i "s/ndbm_libs = \[\]/ndbm_libs = ['gdbm', 'gdbm_compat']/" setup.py &amp;&amp;
123./configure --prefix=/usr --enable-shared &amp;&amp;
124make</userinput></screen>
125
126 <para>To test the results, issue: <command>make test</command>. Note that
127 if you have an existing <application>Python</application> installation
128 which includes the <application>PyXML</application> module, the tests could
129 produce a segmentation fault.</para>
130
131 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
132
133<screen role="root"><userinput>make install &amp;&amp;
134chmod -v 755 /usr/lib/libpython&python3-majorver;m.so.1.0 &amp;&amp;
135chmod -v 755 /usr/lib/libpython3.so </userinput></screen>
136
137 <para>There is no documentation installed using the instructions above.
138 See the <filename>Doc/README.txt</filename> file in the source
139 distribution for instructions on how to create the html. Alternatively,
140 you can download preformatted documentation from <ulink
141 url="http://docs.python.org/download.html"/>.</para>
142
143 <para>In order to use the <command>help ('name_string')</command> feature
144 of the <command>python</command> interpreter with some statements and
145 keywords, you must download (or create) the optional HTML documentation
146 and install it. If you downloaded the HTML docs, issue the following
147 commands as the
148 <systemitem class="username">root</systemitem> user:</para>
149
150<screen role="root"><userinput>install -v -m755 -d /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 </sect2>
158
159 <sect2 role="commands">
160 <title>Command Explanations</title>
161
162 <para><command>sed -i "s/ndbm_libs = ..." setup.py</command>: This command
163 is used to fix a build problem with the <application>GDBM</application>
164 library.</para>
165
166 <para><command>chmod ...</command>: Fix permissions for libraries to be
167 consistent with other libraries.</para>
168
169 </sect2>
170
171 <sect2 role="configuration">
172 <title>Configuring Python</title>
173
174 <para>In order for <command>python</command> to find the installed
175 documentation, you must add the following environment variable to
176 individual user's or the system's profile:</para>
177
178<screen role="root"><userinput>export PYTHONDOCS=/usr/share/doc/Python-&python3-version;/html</userinput></screen>
179
180 </sect2>
181
182 <sect2 role="content">
183 <title>Contents</title>
184
185 <segmentedlist>
186 <segtitle>Installed Programs</segtitle>
187 <segtitle>Installed Libraries</segtitle>
188 <segtitle>Installed Directories</segtitle>
189
190 <seglistitem>
191 <seg>2to3,
192
193 pydoc3 (link to pydoc-&python3-majorver;),
194 pydoc&python3-majorver;,
195
196 python3,
197 python&python3-majorver; (hard link with python3),
198 python&python3-majorver;m (hard link with python3),
199
200 python3-config (link to python&python3-majorver;-config),
201 python&python3-majorver; (link to python&python3-majorver;m-config),
202 python&python3-majorver;m,
203
204 smtpd.py, and optionally if <application>Tk</application> is installed,
205 idle</seg>
206
207 <seg>libpython3.so, libpython&python3-majorver;m.so.1.0 and numerous
208 modules installed in /usr/lib/python&python3-majorver;</seg>
209
210 <seg>/usr/include/python&python3-majorver;,
211 /usr/lib/python&python3-majorver;, and
212 /usr/share/doc/python-&python3-version;</seg>
213 </seglistitem>
214 </segmentedlist>
215
216 <variablelist>
217 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
218 <?dbfo list-presentation="list"?>
219 <?dbhtml list-presentation="table"?>
220
221 <varlistentry id="idle">
222 <term><command>idle</command></term>
223 <listitem>
224 <para>is a wrapper script that opens a
225 <application>Python</application> aware GUI editor.</para>
226 <indexterm zone="python3 idle">
227 <primary sortas="b-idle">idle</primary>
228 </indexterm>
229 </listitem>
230 </varlistentry>
231
232 <varlistentry id="pydoc">
233 <term><command>pydoc</command></term>
234 <listitem>
235 <para>is the <application>Python</application> documentation
236 tool.</para>
237 <indexterm zone="python3 pydoc">
238 <primary sortas="b-pydoc">pydoc</primary>
239 </indexterm>
240 </listitem>
241 </varlistentry>
242
243 <varlistentry id="python3-prog">
244 <term><command>python3</command></term>
245 <listitem>
246 <para>is an interpreted, interactive, object-oriented programming
247 language.</para>
248 <indexterm zone="python3 python3-prog">
249 <primary sortas="b-python3">python3</primary>
250 </indexterm>
251 </listitem>
252 </varlistentry>
253
254 <varlistentry id="python-ver">
255 <term><command>python&python3-majorver;</command></term>
256 <listitem>
257 <para>is a version-specific name for the <command>python</command>
258 program.</para>
259 <indexterm zone="python3 python-ver">
260 <primary
261 sortas="b-python&python3-majorver;">python&python3-majorver;</primary>
262 </indexterm>
263 </listitem>
264 </varlistentry>
265
266 <varlistentry id="smtpd.py">
267 <term><command>smtpd.py</command></term>
268 <listitem>
269 <para>is an SMTP proxy implemented in
270 <application>Python</application>.</para>
271 <indexterm zone="python3 smtpd.py">
272 <primary sortas="b-smtpd.py">smtpd.py</primary>
273 </indexterm>
274 </listitem>
275 </varlistentry>
276
277 </variablelist>
278
279 </sect2>
280
281</sect1>
Note: See TracBrowser for help on using the repository browser.