Changeset c3ad4c38


Ignore:
Timestamp:
09/03/2023 08:35:51 AM (9 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
12.1, ken/TL2024, ken/tuningfonts, lazarus, plabs/newcss, python3.11, rahul/power-profiles-daemon, renodr/vulkan-addition, trunk, xry111/llvm18
Children:
b512e97
Parents:
2868741
Message:

gpgme: Install the Python module as a wheel

Addresses #18455 (comment 1).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • postlfs/security/gpgme.xml

    r2868741 rc3ad4c38  
    121121
    122122../configure --prefix=/usr --disable-gpg-test &amp;&amp;
    123 make</userinput></screen>
     123make PYTHONS=</userinput></screen>
     124
     125    <para>
     126      If <xref linkend='swig'/> is installed, build the Python 3 binding as
     127      a wheel:
     128    </para>
     129
     130<screen><userinput>if swig -version > /dev/null; then
     131  srcdir=$PWD/../lang/python \
     132  top_builddir=$PWD          \
     133  pip3 wheel -w dist --no-build-isolation --no-deps --no-cache-dir \
     134             $PWD/lang/python
     135fi</userinput></screen>
    124136
    125137    <para>
    126138      To test the results, you should have <xref linkend="gnupg2"/> installed
    127       and remove the <command>--disable-gpg-test</command> above. Issue:
    128       <command>make -k check</command>.
    129     </para>
     139      and remove the <command>--disable-gpg-test</command> above. If
     140      <xref linkend='swig'/> is installed, it's necessary to adapt the
     141      test suite to use the Python 3 binding just built as a wheel as well.
     142      Issue:
     143    </para>
     144
     145<screen remap='test'><userinput>if swig -version > /dev/null; then
     146  python3 -m venv testenv                                              &amp;&amp;
     147  testenv/bin/pip3 install --no-index --find-links=dist --no-cache-dir \
     148                           gpg                                         &amp;&amp;
     149  sed '/PYTHON/s#run-tests.py#&amp; --python-libdir=/dev/null#'            \
     150      -i lang/python/tests/Makefile
     151fi &amp;&amp;
     152
     153make -k check PYTHONS= PYTHON=$PWD/testenv/bin/python3</userinput></screen>
    130154
    131155    <para>
     
    133157    </para>
    134158
    135 <screen role="root"><userinput>make install</userinput></screen>
     159<screen role="root"><userinput>make install PYTHONS=</userinput></screen>
     160
     161    <para>
     162      If <xref linkend='swig'/> is installed, still as the &root; user,
     163      install the Python 3 binding:
     164    </para>
     165
     166<screen role="root"><userinput>if swig -version > /dev/null; then
     167  pip3 install --no-index --find-links=dist --no-cache-dir --no-user gpg
     168fi</userinput></screen>
    136169
    137170  </sect2>
     
    145178      <command>make</command> stage, which requires <xref linkend="gnupg2"/>.
    146179      This parameter is not needed if <xref linkend="gnupg2"/> is installed.
     180    </para>
     181
     182    <para>
     183      <parameter>PYTHONS=</parameter>: Disable building Python binding
     184      using the deprecated <command>python3 setup.py build</command>
     185      command.  The explicit instruction to build the Python 3 binding with
     186      the <command>pip3 wheel</command> command is provided.
    147187    </para>
    148188
Note: See TracChangeset for help on using the changeset viewer.