1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE chapter 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 pythonhosted-download-http "See Below">
|
---|
8 | <!ENTITY pythonhosted-download-ftp " ">
|
---|
9 | <!ENTITY pythonhosted-md5sum "See Below">
|
---|
10 | <!ENTITY pythonhosted-size "14 MB">
|
---|
11 | <!ENTITY pythonhosted-buildsize "2.2 MB">
|
---|
12 | <!ENTITY pythonhosted-time "TBD SBU)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect2 id="pythonhosted" xreflabel="pythonhosted files">
|
---|
16 | <!--<?dbhtml filename="pythonhosted.html"?>-->
|
---|
17 |
|
---|
18 | <title>Building pythonhosted.org Files</title>
|
---|
19 |
|
---|
20 | <indexterm zone="pythonhosted">
|
---|
21 | <primary sortas="a-pythonhosted">pythonhosted</primary>
|
---|
22 | </indexterm>
|
---|
23 |
|
---|
24 | <sect3 role="package">
|
---|
25 | <title>Introduction to pythonhosted.org Files</title>
|
---|
26 |
|
---|
27 | <para>
|
---|
28 | This section is for user convenience and is optional.
|
---|
29 | It can be used to fetch and install most of the pythonhosted.org module
|
---|
30 | packages in two convenient scripts. These scripts do not run
|
---|
31 | any tests. To run the tests for an individual module see the
|
---|
32 | appropriate detailed sections below or in the Python Dependencies page.
|
---|
33 | </para>
|
---|
34 |
|
---|
35 | &lfs112_checked;
|
---|
36 |
|
---|
37 | <bridgehead renderas="sect4">Package Information</bridgehead>
|
---|
38 | <itemizedlist spacing="compact">
|
---|
39 | <listitem>
|
---|
40 | <para>
|
---|
41 | Download (HTTP): &pythonhosted-download-http;
|
---|
42 | </para>
|
---|
43 | </listitem>
|
---|
44 | <listitem>
|
---|
45 | <para>
|
---|
46 | Download (FTP): <ulink url="&pythonhosted-download-ftp;"/>
|
---|
47 | </para>
|
---|
48 | </listitem>
|
---|
49 | <listitem>
|
---|
50 | <para>
|
---|
51 | Download MD5 sum: &pythonhosted-md5sum;
|
---|
52 | </para>
|
---|
53 | </listitem>
|
---|
54 | <listitem>
|
---|
55 | <para>
|
---|
56 | Download size: &pythonhosted-size;
|
---|
57 | </para>
|
---|
58 | </listitem>
|
---|
59 | <listitem>
|
---|
60 | <para>
|
---|
61 | Estimated disk space required: &pythonhosted-buildsize;
|
---|
62 | </para>
|
---|
63 | </listitem>
|
---|
64 | <listitem>
|
---|
65 | <para>
|
---|
66 | Estimated build time: &pythonhosted-time;
|
---|
67 | </para>
|
---|
68 | </listitem>
|
---|
69 | </itemizedlist>
|
---|
70 |
|
---|
71 | <note>
|
---|
72 | <para>
|
---|
73 | The dependencies shown here do not include those external to BLFS
|
---|
74 | or those only needed for tests.
|
---|
75 | See the individual sections below for a full list of dependencies.
|
---|
76 | </para>
|
---|
77 | </note>
|
---|
78 |
|
---|
79 | <bridgehead renderas="sect4">Pythonhosted.org Dependencies</bridgehead>
|
---|
80 |
|
---|
81 | <bridgehead renderas="sect5">Required</bridgehead>
|
---|
82 | <para role="required">
|
---|
83 | <!--<xref linkend="fontforge"/>,-->
|
---|
84 | <!-- does not seem to be needed as of 5.22.4 <xref linkend="GConf"/>, -->
|
---|
85 | </para>
|
---|
86 |
|
---|
87 | <bridgehead renderas="sect5">Recommended</bridgehead>
|
---|
88 | <para role="recommended">
|
---|
89 | <!--<xref linkend="fftw"/>,-->
|
---|
90 | </para>
|
---|
91 |
|
---|
92 | <bridgehead renderas="sect5">Optional</bridgehead>
|
---|
93 | <para role="optional">
|
---|
94 | <!--
|
---|
95 | <xref linkend="glu"/>,
|
---|
96 | <ulink url="http://www.dest-unreach.org/socat/">socat</ulink> (for pam_kwallet)-->
|
---|
97 | </para>
|
---|
98 |
|
---|
99 | </sect3>
|
---|
100 |
|
---|
101 | <sect3>
|
---|
102 | <title>Downloading All Pythonhosted Module Files</title>
|
---|
103 |
|
---|
104 | <para>
|
---|
105 | The easiest way to install the modules from the files.pythonhosted.org site
|
---|
106 | is to run a script to install them all at once.
|
---|
107 | </para>
|
---|
108 |
|
---|
109 | <para>
|
---|
110 | The order of building files is important due to internal dependencies.
|
---|
111 | First, create the list of files in the proper order as follows:
|
---|
112 | </para>
|
---|
113 |
|
---|
114 | <screen><userinput>cat > pythonhosted-files.md5 << "EOF"
|
---|
115 | <literal>a70f9fc85b6b8265c982eca6fe51381f charset-normalizer-2.1.1.tar.gz
|
---|
116 | 4a4791e97f3a8c9a1645064a35636ee6 flit_core-3.7.1.tar.gz
|
---|
117 | 13ea24e076212b6baae1135a116d1e0e idna-3.4.tar.gz
|
---|
118 | ba308b52b9092184cf4905bc59a88fc0 urllib3-1.26.12.tar.gz
|
---|
119 | 3591827fde96d1dd23970fb05410ed04 alabaster-0.7.12.tar.gz
|
---|
120 | b1d2ed6592bbdf6002ef52b4ab8e2efe pytz-2022.4.tar.gz
|
---|
121 | 809ed21b4f643167d0f6f5e936bbfbdc Babel-2.10.3.tar.gz
|
---|
122 | 5a40586a25c07e1a8f16f6267252c321 imagesize-1.4.1.tar.gz
|
---|
123 | #fadc2f3bf5872bf6310576a86c3566e0 pyparsing-3.0.9.tar.gz
|
---|
124 | #e713c1939f294fd729af4a7be40dd141 packaging-21.3.tar.gz
|
---|
125 | #447be4afb076c8325a7dc659aff5b931 Pygments-2.14.0.tar.gz
|
---|
126 | 4332ddc7bbee0f344a03915b2ad59a54 snowballstemmer-2.2.0.tar.gz
|
---|
127 | 3f2de7681e12dde031acee0497c3cc2b sphinxcontrib-applehelp-1.0.2.tar.gz
|
---|
128 | 94069c5cdb5079c445f5477fa6107016 sphinxcontrib-devhelp-1.0.2.tar.gz
|
---|
129 | 70765b55395a3c20233631802902c840 sphinxcontrib-htmlhelp-2.0.0.tar.gz
|
---|
130 | e45179f0a3608b6766862e0f34c23b62 sphinxcontrib-jsmath-1.0.1.tar.gz
|
---|
131 | 93216721f3e154cce12d1e9c3307b415 sphinxcontrib-qthelp-1.0.3.tar.gz
|
---|
132 | d99d2edc7b26988dc5fa92163857bfbf sphinxcontrib-serializinghtml-1.1.5.tar.gz
|
---|
133 | #fdfc7d2e102cb96eca0f6155dde7403e sphinx_rtd_theme-1.0.0.tar.gz
|
---|
134 | 0487081b7ead8753fc46cf7c6d1e28e3 attrs-22.1.0.tar.gz
|
---|
135 | d4341621d423a7ca6822e23d6d52bb9a tomli-2.0.1.tar.gz
|
---|
136 | 5cfcb56ea6fc4972c3600c0030f4d136 typing_extensions-4.4.0.tar.gz
|
---|
137 | 0df4e7fd923e4983cd65786efaa0e0d0 setuptools_scm-7.0.5.tar.gz
|
---|
138 | 0b7f3be87481211c183eae095bcea6f1 iniconfig-1.1.1.tar.gz
|
---|
139 | daa6fddfb6cd364f3c82e52098911e4b pluggy-1.0.0.tar.gz
|
---|
140 | bde7dcc1cb452a1e10206ef2f811ba88 py-1.11.0.tar.gz
|
---|
141 | #c4de3e192e5bb4b39deada36cc2f393a pytest-7.1.3.tar.gz
|
---|
142 | 597656cf4feadf1998b0511201620202 Markdown-3.4.1.tar.gz
|
---|
143 | 59bce5d8d67e858735ec3f399ec90253 toml-0.10.2.tar.gz
|
---|
144 | 27957540f4718e892039b2ed208c78f3 smartypants-2.0.1.tar.gz
|
---|
145 | 63f38f80531996f187d2894cc497ba08 typogrify-2.0.7.tar.gz
|
---|
146 | #e1b86477bd77254a9e4070371887950c gi-docgen-2022.1.tar.gz</literal>
|
---|
147 | EOF</userinput></screen>
|
---|
148 |
|
---|
149 | <para>
|
---|
150 | Next, create a script to fetch the files:
|
---|
151 | </para>
|
---|
152 |
|
---|
153 | <screen><userinput>cat > get-pythonhosted-files.sh << "EOF"
|
---|
154 | <literal>#! /bin/bash
|
---|
155 |
|
---|
156 | PYTHONHOSTED=https://files.pythonhosted.org/packages/source
|
---|
157 |
|
---|
158 | mkdir -p pythonhosted
|
---|
159 | cd pythonhosted
|
---|
160 |
|
---|
161 | for package in $(grep -v '^#' ../pythonhosted-files.md5 | awk '{print $2}')
|
---|
162 | do
|
---|
163 | # Don't try to get a package that is already present
|
---|
164 | [ -e $package ] && continue
|
---|
165 | basename=$(echo $package|sed 's/-[[:digit:]].*$//')
|
---|
166 | basechar=$(echo $basename|cut -c 1)
|
---|
167 | url=$PYTHONHOSTED/$basechar/$basename/$package
|
---|
168 | wget $url
|
---|
169 | done
|
---|
170 | EOF</literal></userinput></screen>
|
---|
171 |
|
---|
172 | <para>
|
---|
173 | Run the script and check the files:
|
---|
174 | </para>
|
---|
175 |
|
---|
176 | <screen><userinput>bash get-pythonhosted-files.sh &&
|
---|
177 | md5sum -c ../pythonhosted-files.md5</userinput></screen>
|
---|
178 |
|
---|
179 | </sect3>
|
---|
180 |
|
---|
181 | <sect3 role="installation">
|
---|
182 | <title>Installation of Pythonhosted Modules</title>
|
---|
183 |
|
---|
184 | <para>
|
---|
185 | Set up a script to install all of the packages:
|
---|
186 | </para>
|
---|
187 |
|
---|
188 | <screen><userinput>cat > install-pythonhosted-files.sh << "EOF"
|
---|
189 | <literal>#! /bin/bash
|
---|
190 |
|
---|
191 | cd pythonhosted
|
---|
192 |
|
---|
193 | for package in $(grep -v '^#' ../pythonhosted-files.md5 | awk '{print $2}')
|
---|
194 | do
|
---|
195 | name=$(echo $package|sed 's/-[[:digit:]].*$//')
|
---|
196 |
|
---|
197 | # Don't try to install the package if it already installed
|
---|
198 | installed=$(pip3 show $name 2> /dev/null | grep Version:)
|
---|
199 |
|
---|
200 | unset version
|
---|
201 | if [ -n $installed ]; then
|
---|
202 | version=$(echo $installed | awk '{print $2}')
|
---|
203 | fi
|
---|
204 |
|
---|
205 | if [ -n "$version" ]; then
|
---|
206 | if [ ! $(echo $package | grep -q $version) ]; then
|
---|
207 | echo $package is already installed
|
---|
208 | continue
|
---|
209 | fi
|
---|
210 | fi
|
---|
211 |
|
---|
212 | # Now install the package
|
---|
213 | packagedir=${package%.tar.?z*}
|
---|
214 | rm -rf $packagedir
|
---|
215 | tar -xf $package
|
---|
216 | pushd $packagedir
|
---|
217 | pip3 wheel -w dist --no-build-isolation --no-deps $PWD
|
---|
218 | sudo pip3 install --no-index --find-links dist --no-cache-dir \
|
---|
219 | --no-user --upgrade $name
|
---|
220 | popd
|
---|
221 | done</literal></userinput></screen>
|
---|
222 |
|
---|
223 | <para>
|
---|
224 | Now run the script to install the files. If the script is run
|
---|
225 | multiple times, it will not try to reinstall the modules unless
|
---|
226 | the version in the .md5 file has been changed.
|
---|
227 | </para>
|
---|
228 |
|
---|
229 | <screen><userinput>bash install-pythonhosted-files.sh</userinput></screen>
|
---|
230 |
|
---|
231 | <para>Some of the packages have test procedures. See the individual
|
---|
232 | package sections below to run any desired tests.</para>
|
---|
233 |
|
---|
234 | </sect3>
|
---|
235 |
|
---|
236 | <sect3 role="content">
|
---|
237 | <title>Contents</title>
|
---|
238 |
|
---|
239 | <para>
|
---|
240 | See the contents of the individual package sections below.
|
---|
241 | </para>
|
---|
242 |
|
---|
243 | </sect3>
|
---|
244 |
|
---|
245 | </sect2>
|
---|