[036821b] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 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 pyparsing-download-http "https://files.pythonhosted.org/packages/source/p/pyparsing/pyparsing-&pyparsing-version;.tar.gz">
|
---|
[036821b] | 8 | <!ENTITY pyparsing-download-ftp " ">
|
---|
[b50114c] | 9 | <!ENTITY pyparsing-md5sum "fadc2f3bf5872bf6310576a86c3566e0">
|
---|
| 10 | <!ENTITY pyparsing-size "1.9 MB">
|
---|
[036821b] | 11 | <!ENTITY pyparsing-buildsize "2.6 MB">
|
---|
| 12 | <!ENTITY pyparsing-time "less than 0.1 SBU">
|
---|
| 13 | ]>
|
---|
| 14 |
|
---|
| 15 | <sect2 id="pyparsing" xreflabel="pyparsing-&pyparsing-version;">
|
---|
| 16 |
|
---|
[b50114c] | 17 | <title>pyparsing-&pyparsing-version;</title>
|
---|
[036821b] | 18 |
|
---|
| 19 | <indexterm zone="pyparsing">
|
---|
| 20 | <primary sortas="a-pyparsing">pyparsing</primary>
|
---|
| 21 | </indexterm>
|
---|
| 22 |
|
---|
| 23 | <sect3 role="package">
|
---|
[b50114c] | 24 | <title>Introduction to pyparsing Module</title>
|
---|
[036821b] | 25 |
|
---|
| 26 | <para>
|
---|
[b50114c] | 27 | The <application>pyparsing</application> module is an alternative
|
---|
| 28 | approach to creating and executing simple grammars, vs. the
|
---|
| 29 | traditional lex/yacc approach, or the use of regular expressions.
|
---|
| 30 | It provides a library of classes that client code uses to construct
|
---|
| 31 | the grammar directly in Python code.
|
---|
[036821b] | 32 | </para>
|
---|
| 33 |
|
---|
| 34 | &lfs112_checked;
|
---|
| 35 |
|
---|
| 36 | <bridgehead renderas="sect4">Package Information</bridgehead>
|
---|
| 37 | <itemizedlist spacing="compact">
|
---|
| 38 | <listitem>
|
---|
| 39 | <para>
|
---|
| 40 | Download (HTTP): <ulink url="&pyparsing-download-http;"/>
|
---|
| 41 | </para>
|
---|
| 42 | </listitem>
|
---|
| 43 | <listitem>
|
---|
| 44 | <para>
|
---|
| 45 | Download (FTP): <ulink url="&pyparsing-download-ftp;"/>
|
---|
| 46 | </para>
|
---|
| 47 | </listitem>
|
---|
| 48 | <listitem>
|
---|
| 49 | <para>
|
---|
| 50 | Download MD5 sum: &pyparsing-md5sum;
|
---|
| 51 | </para>
|
---|
| 52 | </listitem>
|
---|
| 53 | <listitem>
|
---|
| 54 | <para>
|
---|
| 55 | Download size: &pyparsing-size;
|
---|
| 56 | </para>
|
---|
| 57 | </listitem>
|
---|
| 58 | <listitem>
|
---|
| 59 | <para>
|
---|
| 60 | Estimated disk space required: &pyparsing-buildsize;
|
---|
| 61 | </para>
|
---|
| 62 | </listitem>
|
---|
| 63 | <listitem>
|
---|
| 64 | <para>
|
---|
| 65 | Estimated build time: &pyparsing-time;
|
---|
| 66 | </para>
|
---|
| 67 | </listitem>
|
---|
| 68 | </itemizedlist>
|
---|
| 69 |
|
---|
[b50114c] | 70 | <bridgehead renderas="sect4">pyparsing Dependencies</bridgehead>
|
---|
[036821b] | 71 |
|
---|
| 72 | <bridgehead renderas="sect5">Required</bridgehead>
|
---|
[b50114c] | 73 | <para role="required">
|
---|
[301c411] | 74 | <xref linkend="flit_core"/>
|
---|
[b50114c] | 75 | </para>
|
---|
| 76 |
|
---|
| 77 | <bridgehead renderas="sect5">Optional</bridgehead>
|
---|
[036821b] | 78 | <para role="optional">
|
---|
[b50114c] | 79 | <xref linkend="Jinja2"/> and
|
---|
[74434cc] | 80 | <ulink url="https://pypi.org/project/railroad-diagrams/">railroad-diagrams</ulink> (also needed for tests)
|
---|
| 81 | </para>
|
---|
| 82 |
|
---|
| 83 | <bridgehead renderas="sect5">Optional (for testing)</bridgehead>
|
---|
| 84 | <para role="optional">
|
---|
| 85 | <xref linkend="pytest"/>
|
---|
[036821b] | 86 | </para>
|
---|
| 87 |
|
---|
| 88 | </sect3>
|
---|
| 89 |
|
---|
| 90 | <sect3 role="installation">
|
---|
[b50114c] | 91 | <title>Installation of pyparsing</title>
|
---|
[036821b] | 92 |
|
---|
| 93 | <para> Build the module: </para>
|
---|
| 94 |
|
---|
| 95 | <screen><userinput>pip3 wheel -w dist --no-build-isolation --no-deps $PWD</userinput></screen>
|
---|
| 96 |
|
---|
| 97 | <para>
|
---|
[74434cc] | 98 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
[036821b] | 99 | </para>
|
---|
| 100 |
|
---|
[74434cc] | 101 | <screen role="root"><userinput>pip3 install --no-index --find-links dist --no-cache-dir --no-user pyparsing</userinput></screen>
|
---|
| 102 |
|
---|
[036821b] | 103 | <para>
|
---|
[74434cc] | 104 | Assuming <xref linkend="pytest"/> and <xref linkend="Jinja2"/> are
|
---|
| 105 | installed, but the other optional dependency is not, the installation
|
---|
| 106 | can be tested with the following commands:
|
---|
[036821b] | 107 | </para>
|
---|
| 108 |
|
---|
[74434cc] | 109 | <screen remap="test"><userinput>python3 -m venv --system-site-packages testenv &&
|
---|
| 110 | source testenv/bin/activate &&
|
---|
| 111 | pip3 install railroad-diagrams &&
|
---|
| 112 | python3 /usr/bin/pytest<!-- no && because of a possible error -->
|
---|
| 113 | deactivate</userinput></screen>
|
---|
[036821b] | 114 |
|
---|
| 115 | </sect3>
|
---|
| 116 |
|
---|
| 117 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 118 | href="../../../xincludes/pip3-cmd-explain.xml"/>
|
---|
| 119 |
|
---|
| 120 | <sect3 role="content">
|
---|
| 121 | <title>Contents</title>
|
---|
| 122 |
|
---|
| 123 | <segmentedlist>
|
---|
| 124 | <segtitle>Installed Programs</segtitle>
|
---|
| 125 | <segtitle>Installed Libraries</segtitle>
|
---|
| 126 | <segtitle>Installed Directories</segtitle>
|
---|
| 127 |
|
---|
| 128 | <seglistitem>
|
---|
| 129 | <seg>None</seg>
|
---|
| 130 | <seg>None</seg>
|
---|
| 131 | <seg>
|
---|
| 132 | /usr/lib/python&python3-majorver;/site-packages/pyparsing and
|
---|
| 133 | /usr/lib/python&python3-majorver;/site-packages/pyparsing-&pyparsing-version;.dist-info
|
---|
| 134 | </seg>
|
---|
| 135 | </seglistitem>
|
---|
| 136 | </segmentedlist>
|
---|
| 137 |
|
---|
| 138 | </sect3>
|
---|
| 139 |
|
---|
| 140 | </sect2>
|
---|