2023-01-23 00:13:38 +08:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
|
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
|
|
<!ENTITY % general-entities SYSTEM "../../../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
|
|
|
|
<!ENTITY pythonhosted-download-http "See Below">
|
|
|
|
<!ENTITY pythonhosted-download-ftp " ">
|
|
|
|
<!ENTITY pythonhosted-md5sum "See Below">
|
|
|
|
<!ENTITY pythonhosted-size "14 MB">
|
|
|
|
<!ENTITY pythonhosted-buildsize "2.2 MB">
|
|
|
|
<!ENTITY pythonhosted-time "TBD SBU)">
|
|
|
|
]>
|
|
|
|
|
|
|
|
<sect2 id="pythonhosted" xreflabel="pythonhosted files">
|
|
|
|
<!--<?dbhtml filename="pythonhosted.html"?>-->
|
|
|
|
|
|
|
|
<title>Building pythonhosted.org Files</title>
|
|
|
|
|
|
|
|
<indexterm zone="pythonhosted">
|
|
|
|
<primary sortas="a-pythonhosted">pythonhosted</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<sect3 role="package">
|
|
|
|
<title>Introduction to pythonhosted.org Files</title>
|
|
|
|
|
|
|
|
<para>
|
2023-01-29 20:51:59 +08:00
|
|
|
This section is for user convenience and is optional.
|
2023-02-04 06:57:58 +08:00
|
|
|
It can be used to fetch and install most of the pythonhosted.org module
|
|
|
|
packages in two convenient scripts. These scripts do not run
|
|
|
|
any tests. To run the tests for an individual module see the
|
|
|
|
appropriate detailed sections below or in the Python Dependencies page.
|
2023-01-23 00:13:38 +08:00
|
|
|
</para>
|
|
|
|
|
|
|
|
&lfs112_checked;
|
|
|
|
|
|
|
|
<bridgehead renderas="sect4">Package Information</bridgehead>
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Download (HTTP): &pythonhosted-download-http;
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Download (FTP): <ulink url="&pythonhosted-download-ftp;"/>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Download MD5 sum: &pythonhosted-md5sum;
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Download size: &pythonhosted-size;
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Estimated disk space required: &pythonhosted-buildsize;
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Estimated build time: &pythonhosted-time;
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
2023-02-04 06:57:58 +08:00
|
|
|
<note>
|
|
|
|
<para>
|
|
|
|
The dependencies shown here do not include those external to BLFS
|
|
|
|
or those only needed for tests.
|
|
|
|
See the individual sections below for a full list of dependencies.
|
|
|
|
</para>
|
|
|
|
</note>
|
|
|
|
|
2023-01-23 00:13:38 +08:00
|
|
|
<bridgehead renderas="sect4">Pythonhosted.org Dependencies</bridgehead>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect5">Required</bridgehead>
|
|
|
|
<para role="required">
|
|
|
|
<!--<xref linkend="fontforge"/>,-->
|
|
|
|
<!-- does not seem to be needed as of 5.22.4 <xref linkend="GConf"/>, -->
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect5">Recommended</bridgehead>
|
|
|
|
<para role="recommended">
|
|
|
|
<!--<xref linkend="fftw"/>,-->
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect5">Optional</bridgehead>
|
|
|
|
<para role="optional">
|
|
|
|
<!--
|
|
|
|
<xref linkend="glu"/>,
|
|
|
|
<ulink url="http://www.dest-unreach.org/socat/">socat</ulink> (for pam_kwallet)-->
|
|
|
|
</para>
|
2023-02-04 06:57:58 +08:00
|
|
|
|
2023-01-23 00:13:38 +08:00
|
|
|
</sect3>
|
|
|
|
|
|
|
|
<sect3>
|
|
|
|
<title>Downloading All Pythonhosted Module Files</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
The easiest way to install the modules from the files.pythonhosted.org site
|
2023-01-29 20:51:59 +08:00
|
|
|
is to run a script to install them all at once.
|
2023-01-23 00:13:38 +08:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
The order of building files is important due to internal dependencies.
|
|
|
|
First, create the list of files in the proper order as follows:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<screen><userinput>cat > pythonhosted-files.md5 << "EOF"
|
|
|
|
<literal>a70f9fc85b6b8265c982eca6fe51381f charset-normalizer-2.1.1.tar.gz
|
|
|
|
4a4791e97f3a8c9a1645064a35636ee6 flit_core-3.7.1.tar.gz
|
|
|
|
13ea24e076212b6baae1135a116d1e0e idna-3.4.tar.gz
|
|
|
|
ba308b52b9092184cf4905bc59a88fc0 urllib3-1.26.12.tar.gz
|
|
|
|
3591827fde96d1dd23970fb05410ed04 alabaster-0.7.12.tar.gz
|
|
|
|
b1d2ed6592bbdf6002ef52b4ab8e2efe pytz-2022.4.tar.gz
|
|
|
|
809ed21b4f643167d0f6f5e936bbfbdc Babel-2.10.3.tar.gz
|
|
|
|
5a40586a25c07e1a8f16f6267252c321 imagesize-1.4.1.tar.gz
|
|
|
|
#fadc2f3bf5872bf6310576a86c3566e0 pyparsing-3.0.9.tar.gz
|
|
|
|
#e713c1939f294fd729af4a7be40dd141 packaging-21.3.tar.gz
|
|
|
|
#447be4afb076c8325a7dc659aff5b931 Pygments-2.14.0.tar.gz
|
|
|
|
4332ddc7bbee0f344a03915b2ad59a54 snowballstemmer-2.2.0.tar.gz
|
|
|
|
3f2de7681e12dde031acee0497c3cc2b sphinxcontrib-applehelp-1.0.2.tar.gz
|
|
|
|
94069c5cdb5079c445f5477fa6107016 sphinxcontrib-devhelp-1.0.2.tar.gz
|
|
|
|
70765b55395a3c20233631802902c840 sphinxcontrib-htmlhelp-2.0.0.tar.gz
|
|
|
|
e45179f0a3608b6766862e0f34c23b62 sphinxcontrib-jsmath-1.0.1.tar.gz
|
|
|
|
93216721f3e154cce12d1e9c3307b415 sphinxcontrib-qthelp-1.0.3.tar.gz
|
|
|
|
d99d2edc7b26988dc5fa92163857bfbf sphinxcontrib-serializinghtml-1.1.5.tar.gz
|
|
|
|
#fdfc7d2e102cb96eca0f6155dde7403e sphinx_rtd_theme-1.0.0.tar.gz
|
|
|
|
0487081b7ead8753fc46cf7c6d1e28e3 attrs-22.1.0.tar.gz
|
|
|
|
d4341621d423a7ca6822e23d6d52bb9a tomli-2.0.1.tar.gz
|
|
|
|
5cfcb56ea6fc4972c3600c0030f4d136 typing_extensions-4.4.0.tar.gz
|
|
|
|
0df4e7fd923e4983cd65786efaa0e0d0 setuptools_scm-7.0.5.tar.gz
|
|
|
|
0b7f3be87481211c183eae095bcea6f1 iniconfig-1.1.1.tar.gz
|
|
|
|
daa6fddfb6cd364f3c82e52098911e4b pluggy-1.0.0.tar.gz
|
|
|
|
bde7dcc1cb452a1e10206ef2f811ba88 py-1.11.0.tar.gz
|
|
|
|
#c4de3e192e5bb4b39deada36cc2f393a pytest-7.1.3.tar.gz
|
|
|
|
597656cf4feadf1998b0511201620202 Markdown-3.4.1.tar.gz
|
|
|
|
59bce5d8d67e858735ec3f399ec90253 toml-0.10.2.tar.gz
|
|
|
|
27957540f4718e892039b2ed208c78f3 smartypants-2.0.1.tar.gz
|
|
|
|
63f38f80531996f187d2894cc497ba08 typogrify-2.0.7.tar.gz
|
|
|
|
#e1b86477bd77254a9e4070371887950c gi-docgen-2022.1.tar.gz</literal>
|
|
|
|
EOF</userinput></screen>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Next, create a script to fetch the files:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<screen><userinput>cat > get-pythonhosted-files.sh << "EOF"
|
2023-01-29 20:51:59 +08:00
|
|
|
<literal>#! /bin/bash
|
2023-01-23 00:13:38 +08:00
|
|
|
|
|
|
|
PYTHONHOSTED=https://files.pythonhosted.org/packages/source
|
|
|
|
|
|
|
|
mkdir -p pythonhosted
|
|
|
|
cd pythonhosted
|
|
|
|
|
|
|
|
for package in $(grep -v '^#' ../pythonhosted-files.md5 | awk '{print $2}')
|
|
|
|
do
|
|
|
|
# Don't try to get a package that is already present
|
|
|
|
[ -e $package ] && continue
|
|
|
|
basename=$(echo $package|sed 's/-[[:digit:]].*$//')
|
|
|
|
basechar=$(echo $basename|cut -c 1)
|
|
|
|
url=$PYTHONHOSTED/$basechar/$basename/$package
|
|
|
|
wget $url
|
|
|
|
done
|
|
|
|
EOF</literal></userinput></screen>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Run the script and check the files:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<screen><userinput>bash get-pythonhosted-files.sh &&
|
|
|
|
md5sum -c ../pythonhosted-files.md5</userinput></screen>
|
|
|
|
|
|
|
|
</sect3>
|
|
|
|
|
|
|
|
<sect3 role="installation">
|
|
|
|
<title>Installation of Pythonhosted Modules</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Set up a script to install all of the packages:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<screen><userinput>cat > install-pythonhosted-files.sh << "EOF"
|
|
|
|
<literal>#! /bin/bash
|
|
|
|
|
|
|
|
cd pythonhosted
|
|
|
|
|
|
|
|
for package in $(grep -v '^#' ../pythonhosted-files.md5 | awk '{print $2}')
|
|
|
|
do
|
|
|
|
name=$(echo $package|sed 's/-[[:digit:]].*$//')
|
|
|
|
|
2023-01-29 20:51:59 +08:00
|
|
|
# Don't try to install the package if it already installed
|
2023-01-23 00:13:38 +08:00
|
|
|
installed=$(pip3 show $name 2> /dev/null | grep Version:)
|
2023-01-29 20:51:59 +08:00
|
|
|
|
2023-01-23 00:13:38 +08:00
|
|
|
unset version
|
2023-01-29 20:51:59 +08:00
|
|
|
if [ -n $installed ]; then
|
|
|
|
version=$(echo $installed | awk '{print $2}')
|
2023-01-23 00:13:38 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$version" ]; then
|
|
|
|
if [ ! $(echo $package | grep -q $version) ]; then
|
|
|
|
echo $package is already installed
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Now install the package
|
|
|
|
packagedir=${package%.tar.?z*}
|
|
|
|
rm -rf $packagedir
|
|
|
|
tar -xf $package
|
|
|
|
pushd $packagedir
|
|
|
|
pip3 wheel -w dist --no-build-isolation --no-deps $PWD
|
|
|
|
sudo pip3 install --no-index --find-links dist --no-cache-dir \
|
|
|
|
--no-user --upgrade $name
|
|
|
|
popd
|
2023-01-29 20:51:59 +08:00
|
|
|
done</literal></userinput></screen>
|
2023-01-23 00:13:38 +08:00
|
|
|
|
|
|
|
<para>
|
2023-01-29 20:51:59 +08:00
|
|
|
Now run the script to install the files. If the script is run
|
2023-01-23 00:13:38 +08:00
|
|
|
multiple times, it will not try to reinstall the modules unless
|
|
|
|
the version in the .md5 file has been changed.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<screen><userinput>bash install-pythonhosted-files.sh</userinput></screen>
|
|
|
|
|
2023-01-29 20:51:59 +08:00
|
|
|
<para>Some of the packages have test procedures. See the individual
|
2023-01-23 00:13:38 +08:00
|
|
|
package sections below to run any desired tests.</para>
|
|
|
|
|
|
|
|
</sect3>
|
|
|
|
|
|
|
|
<sect3 role="content">
|
|
|
|
<title>Contents</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
See the contents of the individual package sections below.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
</sect3>
|
|
|
|
|
2023-01-29 20:51:59 +08:00
|
|
|
</sect2>
|