glfs/general/prog/python-modules/numpy.xml
2023-11-12 20:35:21 -06:00

172 lines
5.2 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect2 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 numpy-download-http "https://files.pythonhosted.org/packages/source/n/numpy/numpy-&numpy-version;.tar.gz">
<!ENTITY numpy-download-ftp " ">
<!ENTITY numpy-md5sum "&numpy-md5sum;">
<!ENTITY numpy-size "15 MB">
<!ENTITY numpy-buildsize "112 MB (add 331 MB for tests)">
<!ENTITY numpy-time "0.4 SBU (add 1.9 SBU for tests)">
]>
<sect2 id="numpy" xreflabel="NumPy-&numpy-version;">
<title>NumPy-&numpy-version;</title>
<indexterm zone="numpy">
<primary sortas="a-numpy">numpy</primary>
</indexterm>
<sect3 role="package">
<title>Introduction to NumPy Module</title>
<para>
<application>NumPy</application> is the fundamental package for
scientific computing with Python.
</para>
&lfs120_checked;
<bridgehead renderas="sect4">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
Download (HTTP): <ulink url="&numpy-download-http;"/>
</para>
</listitem>
<listitem>
<para>
Download (FTP): <ulink url="&numpy-download-ftp;"/>
</para>
</listitem>
<listitem>
<para>
Download MD5 sum: &numpy-md5sum;
</para>
</listitem>
<listitem>
<para>
Download size: &numpy-size;
</para>
</listitem>
<listitem>
<para>
Estimated disk space required: &numpy-buildsize;
</para>
</listitem>
<listitem>
<para>
Estimated build time: &numpy-time;
</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect4">NumPy Dependencies</bridgehead>
<bridgehead renderas="sect5">Required</bridgehead>
<para role="required">
<xref linkend="cython"/> and
<xref linkend="pyproject-metadata"/>
</para>
<!-- <bridgehead renderas="sect5">Recommended</bridgehead>
<para role="recommended">
<xref linkend="setuptools_scm"/>
</para>-->
<bridgehead renderas="sect5">Optional</bridgehead>
<para role="optional">
fortran from <xref linkend="gcc"/>,
<ulink url="https://www.netlib.org/lapack/">lapack and cblas</ulink>, and
<ulink url="https://www.openblas.net/">openblas</ulink>
</para>
<bridgehead renderas="sect5">Optional (for testing)</bridgehead>
<para role="optional">
<xref linkend="attrs"/>,
<xref linkend="pytest"/>, and
<ulink url="https://pypi.org/project/hypothesis/">hypothesis</ulink>
</para>
</sect3>
<sect3 role="installation">
<title>Installation of NumPy</title>
<para> Build the module: </para>
<screen><userinput>pip3 wheel -w dist --no-build-isolation --no-deps --no-cache-dir -Csetup-args=-Dallow-noblas=true $PWD</userinput></screen>
<para>
Now, as the <systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>&install-wheel; numpy</userinput></screen>
<para>
The installation can be tested with the following commands:
</para>
<screen remap="test"><userinput>python3 -m venv --system-site-packages testenv &amp;&amp;
source testenv/bin/activate &amp;&amp;
pip3 install hypothesis &amp;&amp;
python3 runtests.py<!-- no && because of a possible error -->
deactivate</userinput></screen>
<para>
Two tests report errors due to a deprecation warning in the tests.
</para>
</sect3>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../../../xincludes/pip3-cmd-explain.xml"/>
<sect3 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Programs</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>
f2py, f2py3 and f2py&python3-majorver; (3 copies of the same script)
</seg>
<!-- we seem not to record the solibs, see e.g. lxml, cairo
actually, this one has a lot, all with awkward
* .cpython-311-x86_64-linux-gnu.so names -->
<seg>None</seg>
<seg>
/usr/lib/python&python3-majorver;/site-packages/numpy
</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect5">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="f2py">
<term><command>f2py</command></term>
<listitem>
<para>
is the Fortran to Python interface generator utility.
</para>
<indexterm zone="numpy f2py">
<primary sortas="b-f2py">f2py</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect3>
</sect2>