Changeset 22f5a1a


Ignore:
Timestamp:
11/10/2022 05:31:54 PM (18 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
xry111/pip3
Children:
3600fdc
Parents:
799c424
git-author:
Xi Ruoyao <xry111@…> (11/10/2022 04:36:33 PM)
git-committer:
Xi Ruoyao <xry111@…> (11/10/2022 05:31:54 PM)
Message:

wheel: build and install with temporary Python packages

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • chapter08/wheel.xml

    r799c424 r22f5a1a  
    4141    <title>Installation of Wheel</title>
    4242
     43    <para>The installation of wheel needs pip and setuptools.
     44    Prepare the temporary copies of them:</para>
     45
     46<screen><userinput remap="pre">tar xf ../pip-&pip-version;.tar.gz
     47tar xf ../setuptools-&setuptools-version;.tar.gz</userinput></screen>
     48
     49    <para>Build the wheel package.  The building process needs pip,
     50    setuptools, and wheel itself, set <envar>PYTHONPATH</envar> so
     51    <command>python3</command> will be able to find them:</para>
     52
     53<screen><userinput remap="make">PYTHONPATH=pip-&pip-version;/src:setuptools-&setuptools-version;:src \
     54python3 -m pip wheel -w dist --no-build-isolation --no-deps $PWD</userinput></screen>
     55
    4356    <para>Install wheel with the following command:</para>
    4457
    45 <screen><userinput remap="install">pip3 install --no-index $PWD</userinput></screen>
     58<screen><userinput remap="install">PYTHONPATH=pip-&pip-version;/src:setuptools-&setuptools-version;:src \
     59python3 -m pip install --no-index --find-links dist wheel --force-reinstall</userinput></screen>
    4660
    4761    <variablelist>
    48       <title>The meaning of the pip3 options:</title>
     62      <title>The meaning of the install parameters:</title>
    4963
    5064      <varlistentry>
    51         <term><command>install</command></term>
     65        <term><parameter>-w dist</parameter></term>
    5266        <listitem>
    53            <para>Install the package.</para>
     67           <para>Put the created wheel into the
     68           <filename class='directory'>dist</filename> directory.</para>
    5469        </listitem>
    5570      </varlistentry>
    5671
    5772      <varlistentry>
    58         <term><parameter>--no-index</parameter></term>
     73        <term><parameter>--find-links dist</parameter></term>
    5974        <listitem>
    60           <para>Prevent pip from fetching files from the online package
    61           repository (PyPI). If packages are installed in the correct order,
    62           then it won't need to fetch any files in the first place, but this
    63           option adds some safety in case of user error.</para>
     75           <para>Install wheel from the
     76           <filename class='directory'>dist</filename> directory.</para>
    6477        </listitem>
    6578      </varlistentry>
    6679
    6780      <varlistentry>
    68         <term><parameter>$PWD</parameter></term>
     81        <term><parameter>--force-reinstall</parameter></term>
    6982        <listitem>
    70            <para>Look for files to install in the current working directory.</para>
     83           <para>Install the package even if it can be found in
     84           <envar>PYTHONPATH</envar>.</para>
    7185        </listitem>
    7286      </varlistentry>
    7387
    7488    </variablelist>
    75 
    7689  </sect2>
    7790
  • packages.ent

    r799c424 r22f5a1a  
    603603<!ENTITY python-docs-size "7,484 KB">
    604604
     605<!ENTITY pip-version "22.3.1">
     606<!ENTITY pip-size "2,032 KB">
     607<!ENTITY pip-url "&pypi-src;/p/pip/pip-&pip-version;.tar.gz">
     608<!ENTITY pip-md5 "996f58a94fe0b8b82b6795c42bd171ba">
     609<!ENTITY pip-home "&pypi-home;/pip/">
     610
    605611<!ENTITY readline-version "8.2">
    606612<!ENTITY readline-soversion "8.2"><!-- used for stripping -->
     
    621627<!ENTITY sed-fin-du "31 MB">
    622628<!ENTITY sed-fin-sbu "0.4 SBU">
     629
     630<!ENTITY setuptools-version "65.5.1">
     631<!ENTITY setuptools-size "2,556 KB">
     632<!ENTITY setuptools-url "&pypi-src;/s/setuptools/setuptools-&setuptools-version;.tar.gz">
     633<!ENTITY setuptools-md5 "3f062858ddfb5efa564c9c02a30cb104">
     634<!ENTITY setuptools-home "&pypi-home;/setuptools/">
    623635
    624636<!ENTITY shadow-version "4.12.3">
     
    734746<!ENTITY wheel-md5 "f490f1399e5903706cb1d4fbed9ecb28">
    735747<!ENTITY wheel-home "&pypi-home;/wheel/">
    736 <!ENTITY wheel-fin-du "956 KB">
     748<!ENTITY wheel-fin-du "28,700 KB">
    737749<!ENTITY wheel-fin-sbu "less than 0.1 SBU">
    738750
Note: See TracChangeset for help on using the changeset viewer.