aboutsummaryrefslogtreecommitdiffstats
path: root/chapter08/wheel.xml
diff options
context:
space:
mode:
Diffstat (limited to 'chapter08/wheel.xml')
-rw-r--r--chapter08/wheel.xml48
1 files changed, 38 insertions, 10 deletions
diff --git a/chapter08/wheel.xml b/chapter08/wheel.xml
index 0f6ba7cb6..5b09fc65b 100644
--- a/chapter08/wheel.xml
+++ b/chapter08/wheel.xml
@@ -40,12 +40,39 @@
<sect2 role="installation">
<title>Installation of Wheel</title>
+ <para>Compile wheel with the following command:</para>
+
+<screen><userinput remap="make">PYTHONPATH=src pip3 wheel -w dist --no-build-isolation --no-deps $PWD</userinput></screen>
+
<para>Install wheel with the following command:</para>
-<screen><userinput remap="install">pip3 install --no-index $PWD</userinput></screen>
+<screen><userinput remap="install">pip3 install --no-index --find-links=dist wheel</userinput></screen>
<variablelist>
- <title>The meaning of the pip3 options:</title>
+ <title>The meaning of the pip3 commands:</title>
+
+ <varlistentry>
+ <term><envar>PYTHONPATH=src</envar></term>
+ <listitem>
+ <para>Allow using this package (not installed yet) to build a
+ wheel archive for itself, to avoid a chicken-or-egg problem.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><command>wheel</command></term>
+ <listitem>
+ <para>Build wheel archive for this package.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><parameter>-w dist</parameter></term>
+ <listitem>
+ <para>Put the created wheels into the
+ <filename class='directory'>dist</filename> directory.</para>
+ </listitem>
+ </varlistentry>
<varlistentry>
<term><command>install</command></term>
@@ -55,24 +82,25 @@
</varlistentry>
<varlistentry>
- <term><parameter>--no-index</parameter></term>
+ <term><parameter>--no-build-isolation</parameter>,
+ <parameter>--no-deps</parameter>, and
+ <parameter>--no-index</parameter></term>
<listitem>
<para>Prevent pip from fetching files from the online package
repository (PyPI). If packages are installed in the correct order,
- then it won't need to fetch any files in the first place, but this
- option adds some safety in case of user error.</para>
+ then it won't need to fetch any files in the first place, but these
+ options add some safety in case of user error.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><parameter>$PWD</parameter></term>
+ <term><parameter>--find-links dist</parameter></term>
<listitem>
- <para>Look for files to install in the current working directory.</para>
+ <para>Search wheel archives from the
+ <filename class='directory'>dist</filename> directory.</para>
</listitem>
</varlistentry>
-
</variablelist>
-
</sect2>
<sect2 id="contents-wheel" role="content">
@@ -86,7 +114,7 @@
<seg>wheel</seg>
<seg>
/usr/lib/python&python-minor;/site-packages/wheel and
- /usr/lib/python&python-minor;/site-packages/wheel-0.37.1-py3.10.egg-info
+ /usr/lib/python&python-minor;/site-packages/wheel-&wheel-version;.dist-info
</seg>
</seglistitem>
</segmentedlist>