glfs/general/prog/pycairo.xml
Douglas R. Reno db216514c9 pycairo: Add an optional dependency on pytest since it's mentioned as
being needed for the test suite.
2022-03-16 13:09:50 -05:00

166 lines
5.0 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 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 pycairo-download-http "https://github.com/pygobject/pycairo/releases/download/v&pycairo-version;/pycairo-&pycairo-version;.tar.gz">
<!ENTITY pycairo-download-ftp " ">
<!ENTITY pycairo-md5sum "682238eaa8bd7032e36a20b6f53824d1">
<!ENTITY pycairo-size "336 KB">
<!ENTITY pycairo-buildsize "2.9 MB">
<!ENTITY pycairo-time "less than 0.1 SBU">
]>
<!-- Begin PyCairo -->
<sect2 id="pycairo" xreflabel="PyCairo-&pycairo-version;">
<title>PyCairo-&pycairo-version;</title>
<indexterm zone="pycairo">
<primary sortas="a-PyCairo">PyCairo</primary>
</indexterm>
<sect3 role="package">
<title>Introduction to PyCairo Module</title>
<para>
PyCairo provides <application>Python</application> bindings to
<application>Cairo</application>.
</para>
&lfs111_checked;
<!-- Does not use gcc -->
<bridgehead renderas="sect4">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
Download (HTTP): <ulink url="&pycairo-download-http;"/>
</para>
</listitem>
<listitem>
<para>
Download (FTP): <ulink url="&pycairo-download-ftp;"/>
</para>
</listitem>
<listitem>
<para>
Download MD5 sum: &pycairo-md5sum;
</para>
</listitem>
<listitem>
<para>
Download size: &pycairo-size;
</para>
</listitem>
<listitem>
<para>
Estimated disk space required: &pycairo-buildsize;
</para>
</listitem>
<listitem>
<para>
Estimated build time: &pycairo-time;
</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect4">PyCairo Dependencies</bridgehead>
<bridgehead renderas="sect5">Required</bridgehead>
<para role="required">
<xref linkend="cairo"/>
</para>
<bridgehead renderas="sect5">Optional</bridgehead>
<para role="optional">
<ulink url="https://hypothesis.readthedocs.io">Hypothesis</ulink> and
<ulink url="https://pypi.org/project/pytest/">pytest</ulink>
(for tests)
</para>
<para condition="html" role="usernotes">
User Notes: <ulink url="&blfs-wiki;/pycairo"/>
</para>
</sect3>
<sect3 role="installation">
<title>Installation of PyCairo</title>
<note>
<para>
The current version of pycairo no longer builds the Python2 module.
If you need that module for packages such as <xref linkend="gimp"/>, use
<xref linkend="pycairo2"/>
</para>
</note>
<para>
Install <application>PyCairo</application> for Python3 by
running the following commands:
</para>
<screen><userinput>mkdir build &amp;&amp;
cd build &amp;&amp;
meson --prefix=/usr --buildtype=release .. &amp;&amp;
ninja</userinput></screen>
<!--python3 setup.py build</userinput></screen>-->
<para>
To run the tests, this package requires the optional pytest module. If
it is installed, run the tests by running <command>ninja test</command>.
</para>
<para>
Now, as the <systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>ninja install</userinput></screen>
<!--python3 setup.py install - -optimize=1 &amp;&amp;
python3 setup.py install_pycairo_header &amp;&amp;
python3 setup.py install_pkgconfig</userinput></screen>-->
<!-- Seems that install does the following too
python2 setup.py install_pycairo_header &amp;&amp;
python2 setup.py install_pkgconfig</userinput></screen>-->
<!-- Python2 is no longer supported
python2 setup.py install - -optimize=1 &amp;&amp;
python2 setup.py install_pycairo_header &amp;&amp;
python2 setup.py install_pkgconfig &amp;&amp;-->
</sect3>
<sect3 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Program</segtitle>
<segtitle>Installed Library</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>
None
</seg>
<seg>
<!--_cairo.so (python2) and -->
_cairo.&python3-lib-suffix;.so
</seg>
<seg>
/usr/include/pycairo,
<!-- /usr/lib/python&python2-majorver;/site-packages/cairo,
/usr/lib/python&python2-majorver;/site-packages/pycairo-&pycairo-version;-py&python2-majorver;.egg,
/usr/lib/python&python3-majorver;/site-packages/cairo--> and
/usr/lib/python&python3-majorver;/site-packages/pycairo-&pycairo-version;-py&python3-majorver;.egg
</seg>
</seglistitem>
</segmentedlist>
</sect3>
</sect2>