source: general/prog/python.xml@ b88be39

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 b88be39 was b88be39, checked in by Bruce Dubbs <bdubbs@…>, 13 years ago

Update to cmake-2.8.6.
Update to curl-7.22.0.
Updated to libarchive-2.8.5.
Reset all python references to python2.

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

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