Changeset 5bd4e666
- Timestamp:
- 12/26/2023 06:34:06 PM (5 months ago)
- Branches:
- 12.1, ken/TL2024, lazarus, plabs/newcss, python3.11, rahul/power-profiles-daemon, trunk, xry111/llvm18
- Children:
- 01c1ac6
- Parents:
- 105d06c
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
general/prog/python311.xml
r105d06c r5bd4e666 9 9 <!ENTITY python311-md5sum "4efe92adf28875c77d3b9b2e8d3bc44a"> 10 10 <!ENTITY python311-size "19 MB"> 11 <!ENTITY python311-buildsize "301 MB (add 53 MB for tests)">12 <!ENTITY python311-time "1.1 SBU ( add 3.9 SBU for tests; both using parallelism=4)">11 <!ENTITY python311-buildsize "301 MB"> 12 <!ENTITY python311-time "1.1 SBU (Using parallelism=4)"> 13 13 ]> 14 14 15 15 <sect1 id="python311" xreflabel="Python-&python311-version;"> 16 16 <?dbhtml filename="python311.html" ?> 17 18 17 19 18 <title>Python-&python311-version;</title> … … 29 28 The <application>Python 3.11</application> package contains an 30 29 older version of the <application>Python</application> development 31 environment. This is almost required for building any Mozilla program 32 (e.g <xref linkend="firefox"/>, <xref linkend="thunderbird"/>, and 33 <xref linkend="seamonkey"/>) or <xref linkend="qtwebengine"/>) 30 environment. This is <emphasis role="bold">only</emphasis>needed for 31 building specific programs in BLFS 32 that have not updated their build systems to support 33 <xref linkend="python3"/> (e.g <xref linkend="firefox"/>, 34 <xref linkend="thunderbird"/>, <xref linkend="seamonkey"/>) and 35 <xref linkend="qtwebengine"/>) 34 36 </para> 35 37 36 38 <note> 37 39 <para> 38 It is NOT recommended to install this package if you are39 not installing one ofthe above programs.40 Do NOT install this package if you are not installing one of 41 the above programs. 40 42 </para> 41 43 </note> … … 79 81 </para> 80 82 81 <bridgehead renderas="sect4">Optional</bridgehead>82 <para role="optional">83 <xref linkend="bluez"/>,84 <xref linkend="gdb"/> (required for some tests),85 <xref linkend="valgrind"/>, and86 <ulink url="https://www.bytereef.org/mpdecimal/">libmpdec</ulink>87 </para>88 89 90 <para condition="html" role="usernotes">Editor Notes:91 <ulink url="&blfs-wiki;/Python3"/>92 </para>93 83 </sect2> 94 84 … … 101 91 </para> 102 92 103 <screen><userinput>CXX="/usr/bin/g++" \ 93 <screen><userinput> 94 CXX="/usr/bin/g++" \ 104 95 ./configure --prefix=/opt/python3.11 \ 105 96 --disable-shared \ 106 --with-system-expat &&97 --with-system-expat && 107 98 make</userinput></screen> 108 99 109 100 <para> 110 To test the result, issue <command>LC_ALL=en_US.UTF-8 111 make test</command>. 112 Some tests may need an Internet connection. 101 Since this package is only used in very limited situations, 102 tests are not recommended. 113 103 </para> 114 104 … … 130 120 131 121 <para> 132 <parameter>--prefix=/opt/python3.11</parameter>: This installs python 3.11 133 into /opt in order to avoid conflicts with the system version of python, and 134 allow for easy removal/isolation once programs update to python3.12. 122 <parameter>--prefix=/opt/python3.11</parameter>: This installs python 123 3.11 into /opt in order to avoid conflicts with the system version of 124 python, and allows for easy removal/isolation once programs update to 125 python3.12 or later. 135 126 </para> 136 127 137 128 <para> 138 <parameter>--disable-shared</parameter>: This switch disables building shared 139 libraries. Since all the packages that need python-3.11 have built in modules and 140 don't directly link to python, it is safe to turn off shared library support. 129 <parameter>--disable-shared</parameter>: This switch disables building 130 shared libraries. Since all the packages that need python-3.11 have built 131 in modules and don't directly link to python, it is safe to turn off 132 shared library support. 141 133 </para> 142 134 … … 145 137 against the system version of <application>Expat</application>. 146 138 </para> 147 148 <!--149 <para>150 <parameter>- -with-ensurepip=yes</parameter> : This switch enables building151 the <command>pip</command> and <command>setuptools</command> packaging152 programs. <command>setuptools</command> is needed for building some153 Python modules.154 </para>155 -->156 157 <!--158 This was removed from the book159 <para>160 <option>- -with-dbmliborder=bdb:gdbm:ndbm</option>: Use this switch161 if you want to build the <application>Python</application> DBM Module162 against <application>Berkeley DB</application> instead of163 <application>GDBM</application>.164 </para>165 -->166 167 <para>168 <parameter>--enable-optimizations</parameter>: This switch enables169 stable, but expensive, optimizations.170 </para>171 172 </sect2>173 174 <sect2 role="configuration">175 <title>Configuring Python 3.11</title>176 177 <para>178 In order to maintain compatibility with programs that look for it,179 optionally, create the following versioned symlink to run python3.11,180 </para>181 182 <screen role="root"><userinput>ln -svfn /opt/python3.11/bin/python3.11 /usr/bin/python3.11</userinput></screen>183 184 139 185 140 </sect2> … … 197 152 python3.11 198 153 </seg> 199 154 <seg> 200 155 libpython3.11.a 201 156 </seg> … … 211 166 <?dbfo list-presentation="list"?> 212 167 <?dbhtml list-presentation="table"?> 213 <!-- 214 <varlistentry id="2to3"> 215 <term><command>2to3</command></term> 216 <listitem> 217 <para> 218 is designed to assist in the transition between python2 and python3 219 by automatically converting code to be Python3 compatible. 220 </para> 221 <indexterm zone="python3 2to3"> 222 <primary sortas="b-2to3">2to3</primary> 223 </indexterm> 224 </listitem> 225 </varlistentry> 226 Put here for easy use when removing Python2 --> 227 <!-- 228 <varlistentry id="easy_install"> 229 <term><command>easy_install</command></term> 230 <listitem> 231 <para> 232 is a frontend to pip3 to make it easier to configure python modules 233 through the PIP package manager 234 </para> 235 <indexterm zone="python3 easy_install"> 236 <primary sortas="python3 easy_install">easy_install</primary> 237 </indexterm> 238 </listitem> 239 </varlistentry> 240 --> 168 241 169 <varlistentry id="python311-ver"> 242 170 <term><command>python3.11</command></term> … … 251 179 </listitem> 252 180 </varlistentry> 253 <!--254 <varlistentry id="pyvenv">255 <term><command>pyvenv</command></term>256 <listitem>257 <para>258 creates virtual <application>Python</application> environments in259 one or more target directories.260 </para>261 <indexterm zone="python3 pyvenv">262 <primary263 sortas="b-python&python3-majorver;">python&python3-majorver;</primary>264 </indexterm>265 </listitem>266 </varlistentry>267 -->268 181 </variablelist> 269 182 -
xsoft/graphweb/firefox.xml
r105d06c r5bd4e666 192 192 <title>Installation of Firefox</title> 193 193 194 <!--195 <para>196 The building system ships several internal copies of the Python 3197 modules <application>setuptools</application> and198 <filename>six.py</filename>. The shipped copies are too old199 to work well with Python 3.12 or later. Replace them with the200 symlinks to the LFS <application>setuptools</application> package and201 <xref linkend='six'/> already installed on the system, and adapt the202 building system for these updated Python modules. We also need to203 rewrite the code based on the <filename>imp</filename> module removed204 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); do209 ln -sfv /usr/lib/python&python3-majorver;/site-packages/six.py $i210 [ $? = 0 ] || exit $?211 done) &&212 213 sed '/ConfigParser/s/Safe//' \214 -i testing/mozbase/mozprofile/mozprofile/prefs.py &&215 216 (for i in setuptools distutils-precedence.pth \217 pkg_resources _distutils_hack; do218 rm -rf third_party/python/setuptools/$i &&219 ln -sv /usr/lib/python&python3-majorver;/site-packages/$i \220 third_party/python/setuptools221 [ $? = 0 ] || exit $?222 done) &&223 224 sed 's/distutils/setuptools._&/' \225 -i python/mozbuild/mozbuild/nodeutil.py &&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 &&233 sed '/import imp/d' -i netwerk/dns/prepare_tlds.py234 </userinput></screen>235 -->236 237 194 <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=1859752 238 195 https://hg.mozilla.org/try/rev/d5f3b0c4f08a --> … … 421 378 </para> 422 379 423 <screen><userinput>export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none && 380 <screen><userinput> 381 export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none && 424 382 export MOZBUILD_STATE_PATH=${PWD}/mozbuild && 425 python3.11 ./mach configure && 426 python3.11 ./mach build</userinput></screen> 383 export PYTHON311=/opt/python3.11/bin/python3.11 && 384 PYTHON311 ./mach configure && 385 PYTHPN311 ./mach build</userinput></screen> 427 386 428 387 <para> … … 441 400 </para> 442 401 443 <screen role="root"><userinput>MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none python3.11 ./mach install</userinput></screen> 402 <screen role="root"><userinput> 403 export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none && 404 export PYTHON311=/opt/python3.11/bin/python3.11 && 405 PYTHON ./mach install</userinput></screen> 444 406 445 407 <para> … … 447 409 </para> 448 410 449 <screen><userinput>unset MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE MOZBUILD_STATE_PATH</userinput></screen> 411 <screen><userinput> 412 unset MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE 413 unset MOZBUILD_STATE_PATH 414 unset PYTHON311</userinput></screen> 450 415 451 416 </sect2> … … 454 419 <title>Command Explanations</title> 455 420 456 <!--<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"457 href="../../xincludes/SIOCGSTAMP.xml"/>-->458 459 421 <para> 460 422 <command>export MOZBUILD_STATE_PATH=${PWD}/mozbuild</command>: The build 461 is now supposed to tellyou that it intends to create <filename423 tells you that it intends to create <filename 462 424 class="directory">~/.mozbuild</filename>, and offer you an option to 463 425 press <ENTER> to accept this, or Ctrl-C to cancel and restart the … … 468 430 <para> 469 431 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. 474 434 </para> 475 435 … … 477 437 <command>MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none</command>: Use the 478 438 system python to create a virtual environment for <command>mach</command> 479 without downloading any python wheels norusing the system python modules.439 without downloading any python wheels and without using the system python modules. 480 440 This prevents version mismatches between system modules and bundled ones. 481 441 </para>
Note:
See TracChangeset
for help on using the changeset viewer.