scons: Use pip3 wheel & pip3 install instead of setup.py

Also introduce entities for pip3 wheel and pip3 install for future use
(#18466).  Reuse the entities for gpgme and libpwquality, so the missed
--no-user in libpwquality is fixed as well.
This commit is contained in:
Xi Ruoyao 2023-09-06 04:11:02 +08:00
parent 8cc28db68b
commit 1cdea836b5
No known key found for this signature in database
GPG Key ID: ACAAD20E19E710E3
4 changed files with 22 additions and 10 deletions

View File

@ -203,3 +203,7 @@ export -f as_root</userinput></screen>
<!ENTITY qt5-deps
"(<xref linkend='qt5'/> or <xref role='nodep' linkend='qt5-alternate'/>)">
<!ENTITY build-wheel '<screen><userinput>pip3 wheel -w dist --no-build-isolation --no-deps --no-cache-dir .</userinput></screen>'>
<!ENTITY install-wheel 'pip3 install --no-index --find-links=dist --no-cache-dir --no-user'>

View File

@ -79,19 +79,27 @@
<sect2 role="installation">
<title>Installation of SCons</title>
<!-- Commented out because I don't think it's still needed. If
something bad happens please uncomment.
<screen><userinput>sed -i 's/env python/&amp;3/' SCons/Utilities/*.py &amp;&amp;</userinput></screen> -->
<para>
Install <application>SCons</application> by running the following
commands as the <systemitem class="username">root</systemitem> user:
Fix the install location of the man pages:
</para>
<screen role="root"><userinput>sed -i 's/env python/&amp;3/' SCons/Utilities/*.py &amp;&amp;
<screen><userinput>sed -i '/scons.1/s@^.@share/man/man1@' -i setup.cfg</userinput></screen>
python3 setup.py install --prefix=/usr \
--optimize=1 &amp;&amp;
<para>
Build the package:
</para>
mv -v /usr/lib/python&python3-majorver;/site-packages/SCons-&scons-version;-py&python3-majorver;.egg/*.1 \
/usr/share/man/man1</userinput></screen>
&build-wheel;
<para>
As the &root; user, install the package:
</para>
<screen role='root'><userinput>&install-wheel; SCons</userinput></screen>
</sect2>
<sect2 role="content">
@ -110,7 +118,7 @@ mv -v /usr/lib/python&python3-majorver;/site-packages/SCons-&scons-version;-py&p
None
</seg>
<seg>
/usr/lib/python&python3-majorver;/site-packages/SCons
/usr/lib/python&python3-majorver;/site-packages/SCons{,-&scons-version;.dist-info}
</seg>
</seglistitem>
</segmentedlist>

View File

@ -164,7 +164,7 @@ make -k check PYTHONS= PYTHON=$PWD/testenv/bin/python3</userinput></screen>
</para>
<screen role="root"><userinput>if swig -version > /dev/null; then
pip3 install --no-index --find-links=dist --no-cache-dir --no-user gpg
&install-wheel; gpg
fi</userinput></screen>
</sect2>

View File

@ -112,7 +112,7 @@ pip3 wheel -w dist --no-build-isolation --no-deps --no-cache-dir \
</para>
<screen role="root"><userinput>make install &amp;&amp;
pip3 install --no-index --find-links=dist --no-cache-dir pwquality</userinput></screen>
&install-wheel; pwquality</userinput></screen>
</sect2>