source: general/prog/python.xml@ 7bff1b2

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 7bff1b2 was 7bff1b2, checked in by Randy McMurchy <randy@…>, 15 years ago

Commented out all unnecessary references to GDBM as it is in LFS now

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

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