[ab4fdfc] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[0cf85fa] | 2 | <!DOCTYPE sect2 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 |
|
---|
[301c411] | 7 | <!ENTITY packaging-download-http "https://files.pythonhosted.org/packages/source/p/packaging/packaging-&packaging-version;.tar.gz">
|
---|
[432ea40] | 8 | <!ENTITY packaging-download-ftp " ">
|
---|
[569925c7] | 9 | <!ENTITY packaging-md5sum "&packaging-md5sum;">
|
---|
[6136a5c] | 10 | <!ENTITY packaging-size "144 KB">
|
---|
[c7a4088] | 11 | <!ENTITY packaging-buildsize "2.5 MB (add 28 MB for tests)">
|
---|
[72c62e4] | 12 | <!ENTITY packaging-time "less than 0.1 SBU (0.2 SBU for tests)">
|
---|
[0cf85fa] | 13 | ]>
|
---|
| 14 |
|
---|
[036821b] | 15 | <sect2 id="packaging" xreflabel="packaging-&packaging-version;">
|
---|
[0cf85fa] | 16 |
|
---|
[432ea40] | 17 | <title>Packaging-&packaging-version;</title>
|
---|
[0cf85fa] | 18 |
|
---|
[432ea40] | 19 | <indexterm zone="packaging">
|
---|
| 20 | <primary sortas="a-packaging">packaging</primary>
|
---|
[0cf85fa] | 21 | </indexterm>
|
---|
| 22 |
|
---|
| 23 | <sect3 role="package">
|
---|
[432ea40] | 24 | <title>Introduction to Packaging Module</title>
|
---|
[0cf85fa] | 25 |
|
---|
| 26 | <para>
|
---|
[432ea40] | 27 | The <application>Packaging</application> library provides utilities
|
---|
| 28 | that implement the interoperability specifications which have clearly
|
---|
| 29 | one correct behaviour or benefit greatly from having a single shared
|
---|
| 30 | implementation.
|
---|
[0cf85fa] | 31 | </para>
|
---|
| 32 |
|
---|
[ed345e7] | 33 | &lfs120_checked;
|
---|
[0cf85fa] | 34 |
|
---|
| 35 | <bridgehead renderas="sect4">Package Information</bridgehead>
|
---|
| 36 | <itemizedlist spacing="compact">
|
---|
| 37 | <listitem>
|
---|
| 38 | <para>
|
---|
[432ea40] | 39 | Download (HTTP): <ulink url="&packaging-download-http;"/>
|
---|
[0cf85fa] | 40 | </para>
|
---|
| 41 | </listitem>
|
---|
| 42 | <listitem>
|
---|
| 43 | <para>
|
---|
[432ea40] | 44 | Download (FTP): <ulink url="&packaging-download-ftp;"/>
|
---|
[0cf85fa] | 45 | </para>
|
---|
| 46 | </listitem>
|
---|
| 47 | <listitem>
|
---|
| 48 | <para>
|
---|
[432ea40] | 49 | Download MD5 sum: &packaging-md5sum;
|
---|
[0cf85fa] | 50 | </para>
|
---|
| 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
| 53 | <para>
|
---|
[432ea40] | 54 | Download size: &packaging-size;
|
---|
[0cf85fa] | 55 | </para>
|
---|
| 56 | </listitem>
|
---|
| 57 | <listitem>
|
---|
| 58 | <para>
|
---|
[432ea40] | 59 | Estimated disk space required: &packaging-buildsize;
|
---|
[0cf85fa] | 60 | </para>
|
---|
| 61 | </listitem>
|
---|
| 62 | <listitem>
|
---|
| 63 | <para>
|
---|
[432ea40] | 64 | Estimated build time: &packaging-time;
|
---|
[0cf85fa] | 65 | </para>
|
---|
| 66 | </listitem>
|
---|
| 67 | </itemizedlist>
|
---|
| 68 |
|
---|
[432ea40] | 69 | <bridgehead renderas="sect4">Packaging Dependencies</bridgehead>
|
---|
[0cf85fa] | 70 |
|
---|
[ef6402e] | 71 | <bridgehead renderas="sect5">Optional (for testing)</bridgehead>
|
---|
| 72 | <para role="optional">
|
---|
| 73 | <xref linkend="pytest"/> and
|
---|
| 74 | <ulink url="https://pypi.org/project/pretend/">pretend</ulink>
|
---|
| 75 | </para>
|
---|
| 76 |
|
---|
| 77 |
|
---|
[0cf85fa] | 78 | </sect3>
|
---|
| 79 |
|
---|
| 80 | <sect3 role="installation">
|
---|
[432ea40] | 81 | <title>Installation of Packaging</title>
|
---|
[0cf85fa] | 82 |
|
---|
| 83 | <para> Build the module: </para>
|
---|
| 84 |
|
---|
[db244ae2] | 85 | &build-wheel;
|
---|
[0cf85fa] | 86 |
|
---|
| 87 | <para>
|
---|
[ef6402e] | 88 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
[0cf85fa] | 89 | </para>
|
---|
| 90 |
|
---|
[db244ae2] | 91 | <screen role="root"><userinput>&install-wheel; packaging</userinput></screen>
|
---|
[ef6402e] | 92 |
|
---|
[0cf85fa] | 93 | <para>
|
---|
[ef6402e] | 94 | Assuming <xref linkend="pytest"/> is installed, but the other optional
|
---|
[e1dc8db] | 95 | dependency is not, the installation can be tested with the following
|
---|
[ef6402e] | 96 | commands:
|
---|
[0cf85fa] | 97 | </para>
|
---|
| 98 |
|
---|
[ef6402e] | 99 | <screen remap="test"><userinput>python3 -m venv --system-site-packages testenv &&
|
---|
| 100 | source testenv/bin/activate &&
|
---|
| 101 | pip3 install pretend &&
|
---|
| 102 | python3 /usr/bin/pytest<!-- no && because of a possible error -->
|
---|
| 103 | deactivate</userinput></screen>
|
---|
[0cf85fa] | 104 |
|
---|
| 105 | </sect3>
|
---|
| 106 |
|
---|
| 107 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 108 | href="../../../xincludes/pip3-cmd-explain.xml"/>
|
---|
| 109 |
|
---|
| 110 | <sect3 role="content">
|
---|
| 111 | <title>Contents</title>
|
---|
| 112 |
|
---|
| 113 | <segmentedlist>
|
---|
| 114 | <segtitle>Installed Programs</segtitle>
|
---|
| 115 | <segtitle>Installed Libraries</segtitle>
|
---|
| 116 | <segtitle>Installed Directories</segtitle>
|
---|
| 117 |
|
---|
| 118 | <seglistitem>
|
---|
[432ea40] | 119 | <seg>None</seg>
|
---|
[0cf85fa] | 120 | <seg>None</seg>
|
---|
| 121 | <seg>
|
---|
[432ea40] | 122 | /usr/lib/python&python3-majorver;/site-packages/packaging and
|
---|
| 123 | /usr/lib/python&python3-majorver;/site-packages/packaging-&packaging-version;.dist-info
|
---|
[0cf85fa] | 124 | </seg>
|
---|
| 125 | </seglistitem>
|
---|
| 126 | </segmentedlist>
|
---|
[432ea40] | 127 |
|
---|
[0cf85fa] | 128 | </sect3>
|
---|
| 129 |
|
---|
| 130 | </sect2>
|
---|