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 setuptools-download-http
|
---|
8 | "https://pypi.python.org/packages/source/s/setuptools/setuptools-&setuptools-version;.tar.gz">
|
---|
9 | <!ENTITY setuptools-download-ftp " ">
|
---|
10 | <!ENTITY setuptools-md5sum "10407f6737d8dc37e5310e68c1f1f6ec">
|
---|
11 | <!ENTITY setuptools-size "616 KB">
|
---|
12 | <!ENTITY setuptools-buildsize "8.6 MB (additional 4.4 MB for tests)">
|
---|
13 | <!ENTITY setuptools-time "less than 0.1 SBU (additional 2.1 SBU for tests)">
|
---|
14 | ]>
|
---|
15 |
|
---|
16 | <!-- Begin Setuptools -->
|
---|
17 | <sect2 id="setuptools" xreflabel="Setuptools-&setuptools-version;">
|
---|
18 |
|
---|
19 | <title>Setuptools-&setuptools-version;</title>
|
---|
20 |
|
---|
21 | <indexterm zone="setuptools">
|
---|
22 | <primary sortas="a-Setuptools">Setuptools</primary>
|
---|
23 | </indexterm>
|
---|
24 |
|
---|
25 | <sect3 role="package">
|
---|
26 | <title>Introduction to Setuptools Module</title>
|
---|
27 |
|
---|
28 | <para>
|
---|
29 | <application>Setuptools</application> is a fully-featured,
|
---|
30 | actively-maintained, and stable library designed to facilitate
|
---|
31 | packaging <application>Python</application> projects.
|
---|
32 | </para>
|
---|
33 |
|
---|
34 | &lfs77_checked;
|
---|
35 |
|
---|
36 | <bridgehead renderas="sect4">Package Information</bridgehead>
|
---|
37 | <itemizedlist spacing="compact">
|
---|
38 | <listitem>
|
---|
39 | <para>
|
---|
40 | Download (HTTP): <ulink url="&setuptools-download-http;"/>
|
---|
41 | </para>
|
---|
42 | </listitem>
|
---|
43 | <listitem>
|
---|
44 | <para>
|
---|
45 | Download (FTP): <ulink url="&setuptools-download-ftp;"/>
|
---|
46 | </para>
|
---|
47 | </listitem>
|
---|
48 | <listitem>
|
---|
49 | <para>
|
---|
50 | Download MD5 sum: &setuptools-md5sum;
|
---|
51 | </para>
|
---|
52 | </listitem>
|
---|
53 | <listitem>
|
---|
54 | <para>
|
---|
55 | Download size: &setuptools-size;
|
---|
56 | </para>
|
---|
57 | </listitem>
|
---|
58 | <listitem>
|
---|
59 | <para>
|
---|
60 | Estimated disk space required: &setuptools-buildsize;
|
---|
61 | </para>
|
---|
62 | </listitem>
|
---|
63 | <listitem>
|
---|
64 | <para>
|
---|
65 | Estimated build time: &setuptools-time;
|
---|
66 | </para>
|
---|
67 | </listitem>
|
---|
68 | </itemizedlist>
|
---|
69 |
|
---|
70 | <bridgehead renderas="sect4">Setuptools Dependencies</bridgehead>
|
---|
71 |
|
---|
72 | <bridgehead renderas="sect5">Required</bridgehead>
|
---|
73 | <para role="required">
|
---|
74 | <xref linkend="python2"/> or <xref linkend="python3"/>
|
---|
75 | </para>
|
---|
76 |
|
---|
77 | <para condition="html" role="usernotes">
|
---|
78 | User Notes: <ulink url="&blfs-wiki;/setuptools"/>
|
---|
79 | </para>
|
---|
80 | </sect3>
|
---|
81 |
|
---|
82 | <sect3 role="installation">
|
---|
83 | <title>Installation of Setuptools</title>
|
---|
84 |
|
---|
85 | <note>
|
---|
86 | <para>
|
---|
87 | Both <application>Python 2</application> and
|
---|
88 | <application>Python 3</application> modules can
|
---|
89 | be built and installed without any conflicts.
|
---|
90 | </para>
|
---|
91 | </note>
|
---|
92 |
|
---|
93 | <para>
|
---|
94 | To install <application>Setuptools</application> for <application>Python
|
---|
95 | 2</application>, run the following command as the <systemitem
|
---|
96 | class="username">root</systemitem> user:
|
---|
97 | </para>
|
---|
98 |
|
---|
99 | <screen role="root"><userinput>python setup.py install --optimize=1</userinput></screen>
|
---|
100 |
|
---|
101 | <para>
|
---|
102 | To install <application>Setuptools</application> for <application>Python
|
---|
103 | 3</application>, run the following command as the <systemitem
|
---|
104 | class="username">root</systemitem> user:
|
---|
105 | </para>
|
---|
106 |
|
---|
107 | <screen role="root"><userinput>sed -i "s:easy_install:&3:" setup.py &&
|
---|
108 | python3 setup.py install --optimize=1</userinput></screen>
|
---|
109 |
|
---|
110 | <para>
|
---|
111 | Run the tests by issuing <command>python setup.py test</command> and/or
|
---|
112 | <command>python3 setup.py test</command>. The tests need an active
|
---|
113 | internet connection. Optional python modules mock, pytest and py will be
|
---|
114 | downloaded and installed during the tests.
|
---|
115 | </para>
|
---|
116 |
|
---|
117 |
|
---|
118 | </sect3>
|
---|
119 |
|
---|
120 | <sect3 role="commands">
|
---|
121 | <title>Command Explanations</title>
|
---|
122 |
|
---|
123 | <para>
|
---|
124 | <command>sed -i "s:easy_install:&3:g" setup.py</command>: This sed
|
---|
125 | prevents <command>setup.py</command> from overwriting an already
|
---|
126 | installed script by the <application>Python 2</application> module.
|
---|
127 | Remove it if you are building this module only for
|
---|
128 | <application>Python 3</application>.
|
---|
129 | </para>
|
---|
130 |
|
---|
131 | </sect3>
|
---|
132 |
|
---|
133 | <sect3 role="content">
|
---|
134 | <title>Contents</title>
|
---|
135 |
|
---|
136 | <segmentedlist>
|
---|
137 | <segtitle>Installed Programs</segtitle>
|
---|
138 | <segtitle>Installed Library</segtitle>
|
---|
139 | <segtitle>Installed Directory</segtitle>
|
---|
140 |
|
---|
141 | <seglistitem>
|
---|
142 | <seg>
|
---|
143 | easy_install, easy_install-&python2-majorver;, and/or
|
---|
144 | easy_install3, easy_install3-&python3-majorver;
|
---|
145 | </seg>
|
---|
146 | <seg>
|
---|
147 | setuptools-&setuptools-version;-py&python2-majorver;.egg and/or
|
---|
148 | setuptools-&setuptools-version;-py&python3-majorver;.egg
|
---|
149 | </seg>
|
---|
150 | <seg>
|
---|
151 | None
|
---|
152 | </seg>
|
---|
153 | </seglistitem>
|
---|
154 | </segmentedlist>
|
---|
155 | </sect3>
|
---|
156 | </sect2>
|
---|
157 | <!-- End Setuptools -->
|
---|