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>a70f9fc85b6b8265c982eca6fe51381f charset-normalizer-2.1.1.tar.gz
|
---|
112 | 4a4791e97f3a8c9a1645064a35636ee6 flit_core-3.7.1.tar.gz
|
---|
113 | 13ea24e076212b6baae1135a116d1e0e idna-3.4.tar.gz
|
---|
114 | ba308b52b9092184cf4905bc59a88fc0 urllib3-1.26.12.tar.gz
|
---|
115 | 3591827fde96d1dd23970fb05410ed04 alabaster-0.7.12.tar.gz
|
---|
116 | b1d2ed6592bbdf6002ef52b4ab8e2efe pytz-2022.4.tar.gz
|
---|
117 | 809ed21b4f643167d0f6f5e936bbfbdc Babel-2.10.3.tar.gz
|
---|
118 | 5a40586a25c07e1a8f16f6267252c321 imagesize-1.4.1.tar.gz
|
---|
119 | #fadc2f3bf5872bf6310576a86c3566e0 pyparsing-3.0.9.tar.gz
|
---|
120 | #e713c1939f294fd729af4a7be40dd141 packaging-21.3.tar.gz
|
---|
121 | #447be4afb076c8325a7dc659aff5b931 Pygments-2.14.0.tar.gz
|
---|
122 | 4332ddc7bbee0f344a03915b2ad59a54 snowballstemmer-2.2.0.tar.gz
|
---|
123 | 3f2de7681e12dde031acee0497c3cc2b sphinxcontrib-applehelp-1.0.2.tar.gz
|
---|
124 | 94069c5cdb5079c445f5477fa6107016 sphinxcontrib-devhelp-1.0.2.tar.gz
|
---|
125 | 70765b55395a3c20233631802902c840 sphinxcontrib-htmlhelp-2.0.0.tar.gz
|
---|
126 | e45179f0a3608b6766862e0f34c23b62 sphinxcontrib-jsmath-1.0.1.tar.gz
|
---|
127 | 93216721f3e154cce12d1e9c3307b415 sphinxcontrib-qthelp-1.0.3.tar.gz
|
---|
128 | d99d2edc7b26988dc5fa92163857bfbf sphinxcontrib-serializinghtml-1.1.5.tar.gz
|
---|
129 | #fdfc7d2e102cb96eca0f6155dde7403e sphinx_rtd_theme-1.0.0.tar.gz
|
---|
130 | 0487081b7ead8753fc46cf7c6d1e28e3 attrs-22.1.0.tar.gz
|
---|
131 | d4341621d423a7ca6822e23d6d52bb9a tomli-2.0.1.tar.gz
|
---|
132 | 5cfcb56ea6fc4972c3600c0030f4d136 typing_extensions-4.4.0.tar.gz
|
---|
133 | 0df4e7fd923e4983cd65786efaa0e0d0 setuptools_scm-7.0.5.tar.gz
|
---|
134 | 0b7f3be87481211c183eae095bcea6f1 iniconfig-1.1.1.tar.gz
|
---|
135 | daa6fddfb6cd364f3c82e52098911e4b pluggy-1.0.0.tar.gz
|
---|
136 | bde7dcc1cb452a1e10206ef2f811ba88 py-1.11.0.tar.gz
|
---|
137 | #c4de3e192e5bb4b39deada36cc2f393a pytest-7.1.3.tar.gz
|
---|
138 | 597656cf4feadf1998b0511201620202 Markdown-3.4.1.tar.gz
|
---|
139 | 59bce5d8d67e858735ec3f399ec90253 toml-0.10.2.tar.gz
|
---|
140 | 27957540f4718e892039b2ed208c78f3 smartypants-2.0.1.tar.gz
|
---|
141 | 63f38f80531996f187d2894cc497ba08 typogrify-2.0.7.tar.gz
|
---|
142 | #e1b86477bd77254a9e4070371887950c gi-docgen-2022.1.tar.gz</literal>
|
---|
143 | EOF</userinput></screen>
|
---|
144 |
|
---|
145 | <para>
|
---|
146 | Next, create a script to fetch the files:
|
---|
147 | </para>
|
---|
148 |
|
---|
149 | <screen><userinput>cat > get-pythonhosted-files.sh << "EOF"
|
---|
150 | <literal>#! /bin/bash
|
---|
151 |
|
---|
152 | PYTHONHOSTED=https://files.pythonhosted.org/packages/source
|
---|
153 |
|
---|
154 | mkdir -p pythonhosted
|
---|
155 | cd pythonhosted
|
---|
156 |
|
---|
157 | for package in $(grep -v '^#' ../pythonhosted-files.md5 | awk '{print $2}')
|
---|
158 | do
|
---|
159 | # Don't try to get a package that is already present
|
---|
160 | [ -e $package ] && continue
|
---|
161 | basename=$(echo $package|sed 's/-[[:digit:]].*$//')
|
---|
162 | basechar=$(echo $basename|cut -c 1)
|
---|
163 | url=$PYTHONHOSTED/$basechar/$basename/$package
|
---|
164 | wget $url
|
---|
165 | done
|
---|
166 | EOF</literal></userinput></screen>
|
---|
167 |
|
---|
168 | <para>
|
---|
169 | Run the script and check the files:
|
---|
170 | </para>
|
---|
171 |
|
---|
172 | <screen><userinput>bash get-pythonhosted-files.sh &&
|
---|
173 | md5sum -c ../pythonhosted-files.md5</userinput></screen>
|
---|
174 |
|
---|
175 | </sect3>
|
---|
176 |
|
---|
177 | <sect3 role="installation">
|
---|
178 | <title>Installation of Pythonhosted Modules</title>
|
---|
179 |
|
---|
180 | <para>
|
---|
181 | Set up a script to install all of the packages:
|
---|
182 | </para>
|
---|
183 |
|
---|
184 | <screen><userinput>cat > install-pythonhosted-files.sh << "EOF"
|
---|
185 | <literal>#! /bin/bash
|
---|
186 |
|
---|
187 | cd pythonhosted
|
---|
188 |
|
---|
189 | for package in $(grep -v '^#' ../pythonhosted-files.md5 | awk '{print $2}')
|
---|
190 | do
|
---|
191 | name=$(echo $package|sed 's/-[[:digit:]].*$//')
|
---|
192 |
|
---|
193 | # Don't try to install the package if it already installed
|
---|
194 | installed=$(pip3 show $name 2> /dev/null | grep Version:)
|
---|
195 |
|
---|
196 | unset version
|
---|
197 | if [ -n $installed ]; then
|
---|
198 | version=$(echo $installed | awk '{print $2}')
|
---|
199 | fi
|
---|
200 |
|
---|
201 | if [ -n "$version" ]; then
|
---|
202 | if [ ! $(echo $package | grep -q $version) ]; then
|
---|
203 | echo $package is already installed
|
---|
204 | continue
|
---|
205 | fi
|
---|
206 | fi
|
---|
207 |
|
---|
208 | # Now install the package
|
---|
209 | packagedir=${package%.tar.?z*}
|
---|
210 | rm -rf $packagedir
|
---|
211 | tar -xf $package
|
---|
212 | pushd $packagedir
|
---|
213 | pip3 wheel -w dist --no-build-isolation --no-deps $PWD
|
---|
214 | sudo pip3 install --no-index --find-links dist --no-cache-dir \
|
---|
215 | --no-user --upgrade $name
|
---|
216 | popd
|
---|
217 | done</literal></userinput></screen>
|
---|
218 |
|
---|
219 | <para>
|
---|
220 | Now run the script to install the files. If the script is run
|
---|
221 | multiple times, it will not try to reinstall the modules unless
|
---|
222 | the version in the .md5 file has been changed.
|
---|
223 | </para>
|
---|
224 |
|
---|
225 | <screen><userinput>bash install-pythonhosted-files.sh</userinput></screen>
|
---|
226 |
|
---|
227 | <para>Some of the packages have test procedures. See the individual
|
---|
228 | package sections below to run any desired tests.</para>
|
---|
229 |
|
---|
230 | </sect3>
|
---|
231 |
|
---|
232 | <sect3 role="content">
|
---|
233 | <title>Contents</title>
|
---|
234 |
|
---|
235 | <para>
|
---|
236 | See the contents of the individual package sections below.
|
---|
237 | </para>
|
---|
238 |
|
---|
239 | </sect3>
|
---|
240 |
|
---|
241 | </sect2> |
---|