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