source: general/prog/python.xml@ 4a96d460

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

Added installing the environment variable PYTHONPATH to the GNOME Pre-Installation tasks, also changed hardcoded Python version instances to use an existing entity

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

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