Ignore:
Timestamp:
12/26/2023 06:34:06 PM (6 months ago)
Author:
Bruce Dubbs <bdubbs@…>
Branches:
12.1, ken/TL2024, lazarus, plabs/newcss, python3.11, rahul/power-profiles-daemon, trunk, xry111/llvm18
Children:
01c1ac6
Parents:
105d06c
Message:

Simplify python3.11 page and firefox page.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • xsoft/graphweb/firefox.xml

    r105d06c r5bd4e666  
    192192    <title>Installation of Firefox</title>
    193193
    194 <!--
    195     <para>
    196       The building system ships several internal copies of the Python 3
    197       modules <application>setuptools</application> and
    198       <filename>six.py</filename>.  The shipped copies are too old
    199       to work well with Python 3.12 or later.  Replace them with the
    200       symlinks to the LFS <application>setuptools</application> package and
    201       <xref linkend='six'/> already installed on the system, and adapt the
    202       building system for these updated Python modules.  We also need to
    203       rewrite the code based on the <filename>imp</filename> module removed
    204       in Python 3.12 and later using the <filename>importlib</filename>
    205       module:
    206     </para>
    207 
    208 <screen><userinput>(for i in $(find -name six.py); do
    209    ln -sfv /usr/lib/python&python3-majorver;/site-packages/six.py $i
    210    [ $? = 0 ] || exit $?
    211  done) &amp;&amp;
    212 
    213 sed '/ConfigParser/s/Safe//'                          \
    214     -i testing/mozbase/mozprofile/mozprofile/prefs.py &amp;&amp;
    215 
    216 (for i in setuptools distutils-precedence.pth  \
    217           pkg_resources _distutils_hack; do
    218    rm -rf third_party/python/setuptools/$i     &amp;&amp;
    219    ln -sv /usr/lib/python&python3-majorver;/site-packages/$i \
    220           third_party/python/setuptools
    221    [ $? = 0 ] || exit $?
    222  done) &amp;&amp;
    223 
    224 sed 's/distutils/setuptools._&amp;/'            \
    225     -i python/mozbuild/mozbuild/nodeutil.py &amp;&amp;
    226 
    227 sed -e '/^import/s/imp$/importlib.util/'             \
    228     -e 's/imp.new_module/__import__/'                \
    229     -e "s/imp.load_source\(.*\)/spec =               \
    230         importlib.util.spec_from_file_location\1;    \
    231         mod = importlib.util.module_from_spec(spec); \
    232         spec.loader.exec_module(mod)/" -i python/mach/mach/main.py &amp;&amp;
    233 sed '/import imp/d' -i netwerk/dns/prepare_tlds.py
    234 </userinput></screen>
    235 -->
    236 
    237194    <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=1859752
    238195         https://hg.mozilla.org/try/rev/d5f3b0c4f08a -->
     
    421378    </para>
    422379
    423 <screen><userinput>export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none &amp;&amp;
     380<screen><userinput>
     381export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none &amp;&amp;
    424382export MOZBUILD_STATE_PATH=${PWD}/mozbuild          &amp;&amp;
    425 python3.11 ./mach configure                                    &amp;&amp;
    426 python3.11 ./mach build</userinput></screen>
     383export PYTHON311=/opt/python3.11/bin/python3.11     &amp;&amp;
     384PYTHON311 ./mach configure                          &amp;&amp;
     385PYTHPN311 ./mach build</userinput></screen>
    427386
    428387    <para>
     
    441400    </para>
    442401
    443 <screen role="root"><userinput>MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none python3.11 ./mach install</userinput></screen>
     402<screen role="root"><userinput>
     403export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none &amp;&amp;
     404export PYTHON311=/opt/python3.11/bin/python3.11     &amp;&amp;
     405PYTHON ./mach install</userinput></screen>
    444406
    445407    <para>
     
    447409    </para>
    448410
    449 <screen><userinput>unset MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE MOZBUILD_STATE_PATH</userinput></screen>
     411<screen><userinput>
     412unset MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE
     413unset MOZBUILD_STATE_PATH
     414unset PYTHON311</userinput></screen>
    450415
    451416  </sect2>
     
    454419    <title>Command Explanations</title>
    455420
    456 <!--<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    457       href="../../xincludes/SIOCGSTAMP.xml"/>-->
    458 
    459421    <para>
    460422      <command>export MOZBUILD_STATE_PATH=${PWD}/mozbuild</command>: The build
    461       is now supposed to tell you that it intends to create <filename
     423      tells you that it intends to create <filename
    462424      class="directory">~/.mozbuild</filename>, and offer you an option to
    463425      press &lt;ENTER&gt; to accept this, or Ctrl-C to cancel and restart the
     
    468430    <para>
    469431      That directory is used for a (probably random) telemetry identifier.
    470       Creating this in the build directory, and deleting that after the
    471       installation, prevents it being used. If you wish to participate in
    472       telemetry, export MOZBUILD_STATE_PATH to point to its default directory
    473       and remove the entry from the <filename>mozconfig</filename>.
     432      Creating this directory within the build directory and deleting it after the
     433      installation prevents it being used.
    474434    </para>
    475435
     
    477437      <command>MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none</command>: Use the
    478438      system python to create a virtual environment for <command>mach</command>
    479       without downloading any python wheels nor using the system python modules.
     439      without downloading any python wheels and without using the system python modules.
    480440      This prevents version mismatches between system modules and bundled ones.
    481441    </para>
Note: See TracChangeset for help on using the changeset viewer.