source: general/prog/python2.xml@ 60ddbaf

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.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 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 60ddbaf was 60ddbaf, checked in by Bruce Dubbs <bdubbs@…>, 7 years ago

Remove ninja, libffi, and python3 as dependencies
for many packages as they are now a part of LFS.

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

  • Property mode set to 100644
File size: 11.0 KB
RevLine 
[bf847d6d]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
[181662f]7 <!ENTITY python2-download-http
[549e65f]8 "https://www.python.org/ftp/python/&python2-version;/Python-&python2-version;.tar.xz">
[27d9434]9 <!ENTITY python2-download-ftp " ">
[fabeff7]10 <!ENTITY python2-md5sum "1f6db41ad91d9eb0a6f0c769b8613c5b">
[549e65f]11 <!ENTITY python2-size "12 MB">
[fabeff7]12 <!ENTITY python2-buildsize "127 MB (additional 18 MB for tests)">
13 <!ENTITY python2-time "0.9 SBU (additional 4.3 SBU for tests)">
[82fac2c]14
[181662f]15 <!ENTITY python2htmldoc-download-http
[c8b4decb]16 "https://docs.python.org/ftp/python/doc/&python2-version;/python-&python2-version;-docs-html.tar.bz2">
[bf847d6d]17]>
18
[4716d52]19<sect1 id="python2" xreflabel="Python-&python2-version;">
[bf847d6d]20 <?dbhtml filename="python2.html" ?>
21
22 <sect1info>
[4949485e]23 <othername>$LastChangedBy$</othername>
24 <date>$Date$</date>
[bf847d6d]25 </sect1info>
26
27 <title>Python-&python2-version;</title>
28
[4716d52]29 <indexterm zone="python2">
[82fac2c]30 <primary sortas="a-Python2">Python2</primary>
[bf847d6d]31 </indexterm>
32
33 <sect2 role="package">
34 <title>Introduction to Python 2</title>
35
[181662f]36 <para>
37 The <application>Python 2</application> package contains the
[82fac2c]38 <application>Python</application> development environment. It is useful
[181662f]39 for object-oriented programming, writing scripts, prototyping large
40 programs or developing entire applications. This version is for backward
41 compatibility with other dependent packages.
42 </para>
[bf847d6d]43
[4bf60a36]44 &lfs81_checked;
[bf847d6d]45
46 <bridgehead renderas="sect3">Package Information</bridgehead>
47 <itemizedlist spacing="compact">
48 <listitem>
[181662f]49 <para>
50 Download (HTTP): <ulink url="&python2-download-http;"/>
51 </para>
[bf847d6d]52 </listitem>
53 <listitem>
[181662f]54 <para>
55 Download (FTP): <ulink url="&python2-download-ftp;"/>
56 </para>
[bf847d6d]57 </listitem>
58 <listitem>
[181662f]59 <para>
60 Download MD5 sum: &python2-md5sum;
61 </para>
[bf847d6d]62 </listitem>
63 <listitem>
[181662f]64 <para>
65 Download size: &python2-size;
66 </para>
[bf847d6d]67 </listitem>
68 <listitem>
[181662f]69 <para>
70 Estimated disk space required: &python2-buildsize;
71 </para>
[bf847d6d]72 </listitem>
73 <listitem>
[181662f]74 <para>
75 Estimated build time: &python2-time;
76 </para>
[bf847d6d]77 </listitem>
78 </itemizedlist>
79
[54ae6b8]80 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
81
[5d11f8f]82 <itemizedlist spacing="compact">
83 <title>Optional HTML Documentation</title>
[bf847d6d]84 <listitem>
[181662f]85 <para>
[5d11f8f]86 Download (HTTP): <ulink url="&python2htmldoc-download-http;"/>
[181662f]87 </para>
[bf847d6d]88 </listitem>
[fb990982]89 </itemizedlist>
90
[03d30cf]91 <bridgehead renderas="sect3">Python 2 Dependencies</bridgehead>
[60ddbaf]92<!--
[82fac2c]93 <bridgehead renderas="sect4">Recommended</bridgehead>
94 <para role="recommended">
[adf6dd9a]95 <xref linkend="libffi"/>
[82fac2c]96 </para>
[60ddbaf]97-->
[bf847d6d]98 <bridgehead renderas="sect4">Optional</bridgehead>
[181662f]99 <para role="optional">
[9be7202]100 <xref linkend="bluez"/> and
101 <xref linkend="valgrind"/>
[82fac2c]102 </para>
103
104 <bridgehead renderas="sect4">Optional (For Additional Modules)</bridgehead>
105 <para role="optional">
[181662f]106 <xref linkend="openssl"/>,
[82fac2c]107 <xref linkend="sqlite"/> and
108 <xref linkend="tk"/>
[181662f]109 </para>
110
[5be3a74]111 <note>
112 <para>
[13507eb]113 <!-- new for ff31. Any reasonable version of openssl will do,
114 even old maintained versions, so do not xref openssl here -->
[b9f61df]115 If you are building <xref linkend="thunderbird"/> or
[f3429309]116 <xref linkend="firefox"/>
[80454f5]117 you must install <application>openssl</application> before you build
[5be3a74]118 <application>Python 2</application>.
119 </para>
120 </note>
121
[181662f]122 <para condition="html" role="usernotes">
123 User Notes: <ulink url="&blfs-wiki;/Python"/>
124 </para>
[bf847d6d]125 </sect2>
126
127 <sect2 role="installation">
[03d30cf]128 <title>Installation of Python 2</title>
[bf847d6d]129
[181662f]130 <para>
[03d30cf]131 Install <application>Python 2</application> by running the following
[181662f]132 commands:
133 </para>
[bf847d6d]134
[167a240]135<screen><userinput>./configure --prefix=/usr \
[82fac2c]136 --enable-shared \
137 --with-system-expat \
138 --with-system-ffi \
[879932f]139 --with-ensurepip=yes \
[82fac2c]140 --enable-unicode=ucs4 &amp;&amp;
[bf847d6d]141make</userinput></screen>
142
[167a240]143 <para>
[1a64240]144 To test the results, issue: <command>make -k test</command>.
145 One test fails for unknown reasons.
[181662f]146 </para>
[bf847d6d]147
[181662f]148 <para>
149 Now, as the <systemitem class="username">root</systemitem> user:
150 </para>
[bf847d6d]151
[7224506]152<screen role="root"><userinput>make install &amp;&amp;
153chmod -v 755 /usr/lib/libpython&python2-majorver;.so.1.0</userinput></screen>
[bf847d6d]154
[181662f]155 <para>
[7fe0ce3b]156 Since <application>Python 2</application> is in maintenance mode, and
157 <application>Python 3</application> is recommended by upstream for
[8b9b43e]158 development, you probably do not need to install the documentation.
[7fe0ce3b]159 However, if you still want to install documentation for both
[8b9b43e]160 <application>Python</application> versions, be sure to define the
161 <envar>PYTHONDOCS</envar>
[7fe0ce3b]162 variable for the version you want to use, each time you need to consult
163 the documentation. If you have downloaded the preformatted documentation
164 from <ulink url="http://docs.python.org/download.html"/>, install it
[03d30cf]165 as the <systemitem class="username">root</systemitem> user:
[181662f]166 </para>
167
[23d3543c]168<screen role="root"><userinput>install -v -dm755 /usr/share/doc/python-&python2-version; &amp;&amp;
[7b273030]169
170tar --strip-components=1 \
171 --no-same-owner \
172 --directory /usr/share/doc/python-&python2-version; \
173 -xvf ../python-&python2-version;-docs-html.tar.bz2 &amp;&amp;
174
[03d30cf]175find /usr/share/doc/python-&python2-version; -type d -exec chmod 0755 {} \; &amp;&amp;
176find /usr/share/doc/python-&python2-version; -type f -exec chmod 0644 {} \;</userinput></screen>
[bf847d6d]177 </sect2>
178
179 <sect2 role="commands">
180 <title>Command Explanations</title>
181
[82fac2c]182 <para>
[00ff1df]183 <parameter>--with-system-expat</parameter>: This switch enables linking
184 against system version of <application>Expat</application>.
[82fac2c]185 </para>
186
187 <para>
[00ff1df]188 <parameter>--with-system-ffi</parameter>: This switch enables linking
[60ddbaf]189 against system version of <application>libffi</application>.
[82fac2c]190 </para>
191
[23c5563]192 <para>
193 <parameter>--with-ensurepip=yes</parameter> : This switch enables building
194 <command>pip</command> and <command>setuptools</command> packaging programs.
195 <command>setuptools</command> is needed for building some Python modules.
196 </para>
197
[82fac2c]198 <para>
199 <parameter>--enable-unicode=ucs4</parameter>: This switch enables
200 32bit Unicode support in <application>Python</application>.
201 </para>
202
203 <para>
[00ff1df]204 <option>--with-dbmliborder=bdb:gdbm:ndbm</option>: Use this switch
[0d7900a]205 if you want to build <application>Python</application> DBM Module
[82fac2c]206 against <application>Berkeley DB</application> instead of
207 <application>GDBM</application>.
208 </para>
209
[181662f]210 <para>
[0d7900a]211 <command>chmod ...</command>: Fix permissions for libraries to be
[181662f]212 consistent with other libraries.
213 </para>
[82fac2c]214
[bf847d6d]215 </sect2>
216
217 <sect2 role="configuration">
218 <title>Configuring Python 2</title>
219
[181662f]220 <para>
221 In order for <command>python</command> to find the installed
222 documentation, you must add the following environment variable to
223 individual user's or the system's profile:
224 </para>
[bf847d6d]225
[03d30cf]226<screen role="root"><userinput>export PYTHONDOCS=/usr/share/doc/python-&python2-version;</userinput></screen>
[82fac2c]227
[bf847d6d]228 </sect2>
229
230 <sect2 role="content">
231 <title>Contents</title>
232
233 <segmentedlist>
234 <segtitle>Installed Programs</segtitle>
[03d30cf]235 <segtitle>Installed Library</segtitle>
[bf847d6d]236 <segtitle>Installed Directories</segtitle>
237
238 <seglistitem>
[181662f]239 <seg>
[167a240]240 2to3, pydoc, python (symlink), python-config (symlink),
241 python2 (symlink), python2-config (symlink),
[03d30cf]242 python&python2-majorver;, python&python2-majorver;-config,
[d0aecd33]243 smtpd.py, and idle
[181662f]244 </seg>
245 <seg>
[03d30cf]246 libpython&python2-majorver;.so
[181662f]247 </seg>
248 <seg>
[fcabde3c]249 /usr/{include,lib}/python&python2-majorver; and
250 /usr/share/doc/python-&python2-version;
251 </seg>
[bf847d6d]252 </seglistitem>
253 </segmentedlist>
254
255 <variablelist>
256 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
257 <?dbfo list-presentation="list"?>
258 <?dbhtml list-presentation="table"?>
259
[62f9a8e]260 <varlistentry id="python2-2to3">
261 <term><command>2to3</command></term>
262 <listitem>
263 <para>
264 is a <application>Python</application> program that reads
[00ff1df]265 <application>Python 2.x</application> source code and applies a
266 series of fixes to transform it into valid
267 <application>Python 3.x</application> code.
[62f9a8e]268 </para>
269 <indexterm zone="python2 python2-2to3">
270 <primary sortas="b-2to3">2to3</primary>
271 </indexterm>
272 </listitem>
273 </varlistentry>
274
[03d30cf]275 <varlistentry id="idle">
[bf847d6d]276 <term><command>idle</command></term>
277 <listitem>
[181662f]278 <para>
279 is a wrapper script that opens a <application>Python</application>
[d0aecd33]280 aware GUI editor. For this script to run, you must have installed
281 <application>Tk</application> before Python so that the Tkinter
282 Python module is built.
[181662f]283 </para>
[03d30cf]284 <indexterm zone="python2 idle">
285 <primary sortas="b-idle">idle</primary>
[bf847d6d]286 </indexterm>
287 </listitem>
288 </varlistentry>
289
290 <varlistentry id="pydoc2">
291 <term><command>pydoc</command></term>
292 <listitem>
[181662f]293 <para>
294 is the <application>Python</application> documentation tool.
295 </para>
[4716d52]296 <indexterm zone="python2 pydoc2">
[bf847d6d]297 <primary sortas="b-pydoc2">pydoc</primary>
298 </indexterm>
299 </listitem>
300 </varlistentry>
301
[181662f]302 <varlistentry id="python">
[bf847d6d]303 <term><command>python</command></term>
304 <listitem>
[181662f]305 <para>
306 is an interpreted, interactive, object-oriented programming
307 language.
308 </para>
309 <indexterm zone="python2 python">
[4716d52]310 <primary sortas="b-python2">python</primary>
[bf847d6d]311 </indexterm>
312 </listitem>
313 </varlistentry>
314
315 <varlistentry id="python2-ver">
316 <term><command>python&python2-majorver;</command></term>
317 <listitem>
[181662f]318 <para>
319 is a version-specific name for the <command>python</command>
320 program.
321 </para>
[4716d52]322 <indexterm zone="python2 python2-ver">
[b88be39]323 <primary sortas="b-python&python2-majorver;">python&python2-majorver;</primary>
[bf847d6d]324 </indexterm>
325 </listitem>
326 </varlistentry>
327
[03d30cf]328 <varlistentry id="smtpd.py">
[bf847d6d]329 <term><command>smtpd.py</command></term>
330 <listitem>
[181662f]331 <para>
332 is an SMTP proxy implemented in <application>Python</application>.
333 </para>
[03d30cf]334 <indexterm zone="python2 smtpd.py">
335 <primary sortas="b-smtpd.py">smtpd.py</primary>
[bf847d6d]336 </indexterm>
337 </listitem>
338 </varlistentry>
[82fac2c]339
[bf847d6d]340 </variablelist>
[82fac2c]341
[bf847d6d]342 </sect2>
[82fac2c]343
[bf847d6d]344</sect1>
Note: See TracBrowser for help on using the repository browser.