12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
- <meta property="og:title" content="3. Configure Python" />
- <meta property="og:type" content="website" />
- <meta property="og:url" content="https://docs.python.org/3/using/configure.html" />
- <meta property="og:site_name" content="Python documentation" />
- <meta property="og:description" content="Build Requirements: Features required to build CPython: A C11 compiler. Optional C11 features are not required., Support for IEEE 754 floating point numbers and floating point Not-a-Number (NaN)., ..." />
- <meta property="og:image" content="https://docs.python.org/3/_static/og-image.png" />
- <meta property="og:image:alt" content="Python documentation" />
- <meta name="description" content="Build Requirements: Features required to build CPython: A C11 compiler. Optional C11 features are not required., Support for IEEE 754 floating point numbers and floating point Not-a-Number (NaN)., ..." />
- <meta property="og:image:width" content="200" />
- <meta property="og:image:height" content="200" />
- <meta name="theme-color" content="#3776ab" />
- <title>3. Configure Python — Python 3.12.0 documentation</title><meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
- <link rel="stylesheet" type="text/css" href="../_static/pydoctheme.css?digest=b37c26da2f7529d09fe70b41c4b2133fe4931a90" />
- <link id="pygments_dark_css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css" href="../_static/pygments_dark.css" />
-
- <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
- <script src="../_static/jquery.js"></script>
- <script src="../_static/underscore.js"></script>
- <script src="../_static/doctools.js"></script>
-
- <script src="../_static/sidebar.js"></script>
-
- <link rel="search" type="application/opensearchdescription+xml"
- title="Search within Python 3.12.0 documentation"
- href="../_static/opensearch.xml"/>
- <link rel="author" title="About these documents" href="../about.html" />
- <link rel="index" title="Index" href="../genindex.html" />
- <link rel="search" title="Search" href="../search.html" />
- <link rel="copyright" title="Copyright" href="../copyright.html" />
- <link rel="next" title="4. Using Python on Windows" href="windows.html" />
- <link rel="prev" title="2. Using Python on Unix platforms" href="unix.html" />
- <link rel="canonical" href="https://docs.python.org/3/using/configure.html" />
-
-
-
-
- <style>
- @media only screen {
- table.full-width-table {
- width: 100%;
- }
- }
- </style>
- <link rel="stylesheet" href="../_static/pydoctheme_dark.css" media="(prefers-color-scheme: dark)" id="pydoctheme_dark_css">
- <link rel="shortcut icon" type="image/png" href="../_static/py.svg" />
- <script type="text/javascript" src="../_static/copybutton.js"></script>
- <script type="text/javascript" src="../_static/menu.js"></script>
- <script type="text/javascript" src="../_static/themetoggle.js"></script>
- </head>
- <body>
- <div class="mobile-nav">
- <input type="checkbox" id="menuToggler" class="toggler__input" aria-controls="navigation"
- aria-pressed="false" aria-expanded="false" role="button" aria-label="Menu" />
- <nav class="nav-content" role="navigation">
- <label for="menuToggler" class="toggler__label">
- <span></span>
- </label>
- <span class="nav-items-wrapper">
- <a href="https://www.python.org/" class="nav-logo">
- <img src="../_static/py.svg" alt="Logo"/>
- </a>
- <span class="version_switcher_placeholder"></span>
- <form role="search" class="search" action="../search.html" method="get">
- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" class="search-icon">
- <path fill-rule="nonzero" fill="currentColor" d="M15.5 14h-.79l-.28-.27a6.5 6.5 0 001.48-5.34c-.47-2.78-2.79-5-5.59-5.34a6.505 6.505 0 00-7.27 7.27c.34 2.8 2.56 5.12 5.34 5.59a6.5 6.5 0 005.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path>
- </svg>
- <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" />
- <input type="submit" value="Go"/>
- </form>
- </span>
- </nav>
- <div class="menu-wrapper">
- <nav class="menu" role="navigation" aria-label="main navigation">
- <div class="language_switcher_placeholder"></div>
-
- <label class="theme-selector-label">
- Theme
- <select class="theme-selector" oninput="activateTheme(this.value)">
- <option value="auto" selected>Auto</option>
- <option value="light">Light</option>
- <option value="dark">Dark</option>
- </select>
- </label>
- <div>
- <h3><a href="../contents.html">Table of Contents</a></h3>
- <ul>
- <li><a class="reference internal" href="#">3. Configure Python</a><ul>
- <li><a class="reference internal" href="#build-requirements">3.1. Build Requirements</a></li>
- <li><a class="reference internal" href="#generated-files">3.2. Generated files</a></li>
- <li><a class="reference internal" href="#configure-options">3.3. Configure Options</a><ul>
- <li><a class="reference internal" href="#general-options">3.3.1. General Options</a></li>
- <li><a class="reference internal" href="#webassembly-options">3.3.2. WebAssembly Options</a></li>
- <li><a class="reference internal" href="#install-options">3.3.3. Install Options</a></li>
- <li><a class="reference internal" href="#performance-options">3.3.4. Performance options</a></li>
- <li><a class="reference internal" href="#python-debug-build">3.3.5. Python Debug Build</a></li>
- <li><a class="reference internal" href="#debug-options">3.3.6. Debug options</a></li>
- <li><a class="reference internal" href="#linker-options">3.3.7. Linker options</a></li>
- <li><a class="reference internal" href="#libraries-options">3.3.8. Libraries options</a></li>
- <li><a class="reference internal" href="#security-options">3.3.9. Security Options</a></li>
- <li><a class="reference internal" href="#macos-options">3.3.10. macOS Options</a></li>
- <li><a class="reference internal" href="#cross-compiling-options">3.3.11. Cross Compiling Options</a></li>
- </ul>
- </li>
- <li><a class="reference internal" href="#python-build-system">3.4. Python Build System</a><ul>
- <li><a class="reference internal" href="#main-files-of-the-build-system">3.4.1. Main files of the build system</a></li>
- <li><a class="reference internal" href="#main-build-steps">3.4.2. Main build steps</a></li>
- <li><a class="reference internal" href="#main-makefile-targets">3.4.3. Main Makefile targets</a></li>
- <li><a class="reference internal" href="#c-extensions">3.4.4. C extensions</a></li>
- </ul>
- </li>
- <li><a class="reference internal" href="#compiler-and-linker-flags">3.5. Compiler and linker flags</a><ul>
- <li><a class="reference internal" href="#preprocessor-flags">3.5.1. Preprocessor flags</a></li>
- <li><a class="reference internal" href="#compiler-flags">3.5.2. Compiler flags</a></li>
- <li><a class="reference internal" href="#linker-flags">3.5.3. Linker flags</a></li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </div>
- <div>
- <h4>Previous topic</h4>
- <p class="topless"><a href="unix.html"
- title="previous chapter"><span class="section-number">2. </span>Using Python on Unix platforms</a></p>
- </div>
- <div>
- <h4>Next topic</h4>
- <p class="topless"><a href="windows.html"
- title="next chapter"><span class="section-number">4. </span>Using Python on Windows</a></p>
- </div>
- <div role="note" aria-label="source link">
- <h3>This Page</h3>
- <ul class="this-page-menu">
- <li><a href="../bugs.html">Report a Bug</a></li>
- <li>
- <a href="https://github.com/python/cpython/blob/main/Doc/using/configure.rst"
- rel="nofollow">Show Source
- </a>
- </li>
- </ul>
- </div>
- </nav>
- </div>
- </div>
-
- <div class="related" role="navigation" aria-label="related navigation">
- <h3>Navigation</h3>
- <ul>
- <li class="right" style="margin-right: 10px">
- <a href="../genindex.html" title="General Index"
- accesskey="I">index</a></li>
- <li class="right" >
- <a href="../py-modindex.html" title="Python Module Index"
- >modules</a> |</li>
- <li class="right" >
- <a href="windows.html" title="4. Using Python on Windows"
- accesskey="N">next</a> |</li>
- <li class="right" >
- <a href="unix.html" title="2. Using Python on Unix platforms"
- accesskey="P">previous</a> |</li>
- <li><img src="../_static/py.svg" alt="python logo" style="vertical-align: middle; margin-top: -1px"/></li>
- <li><a href="https://www.python.org/">Python</a> »</li>
- <li class="switchers">
- <div class="language_switcher_placeholder"></div>
- <div class="version_switcher_placeholder"></div>
- </li>
- <li>
-
- </li>
- <li id="cpython-language-and-version">
- <a href="../index.html">3.12.0 Documentation</a> »
- </li>
- <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Python Setup and Usage</a> »</li>
- <li class="nav-item nav-item-this"><a href=""><span class="section-number">3. </span>Configure Python</a></li>
- <li class="right">
-
- <div class="inline-search" role="search">
- <form class="inline-search" action="../search.html" method="get">
- <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" />
- <input type="submit" value="Go" />
- </form>
- </div>
- |
- </li>
- <li class="right">
- <label class="theme-selector-label">
- Theme
- <select class="theme-selector" oninput="activateTheme(this.value)">
- <option value="auto" selected>Auto</option>
- <option value="light">Light</option>
- <option value="dark">Dark</option>
- </select>
- </label> |</li>
-
- </ul>
- </div>
- <div class="document">
- <div class="documentwrapper">
- <div class="bodywrapper">
- <div class="body" role="main">
-
- <section id="configure-python">
- <h1><span class="section-number">3. </span>Configure Python<a class="headerlink" href="#configure-python" title="Permalink to this headline">¶</a></h1>
- <section id="build-requirements">
- <h2><span class="section-number">3.1. </span>Build Requirements<a class="headerlink" href="#build-requirements" title="Permalink to this headline">¶</a></h2>
- <p>Features required to build CPython:</p>
- <ul class="simple">
- <li><p>A <a class="reference external" href="https://en.cppreference.com/w/c/11">C11</a> compiler. <a class="reference external" href="https://en.wikipedia.org/wiki/C11_(C_standard_revision)#Optional_features">Optional C11
- features</a>
- are not required.</p></li>
- <li><p>Support for <a class="reference external" href="https://en.wikipedia.org/wiki/IEEE_754">IEEE 754</a> floating
- point numbers and <a class="reference external" href="https://en.wikipedia.org/wiki/NaN#Floating_point">floating point Not-a-Number (NaN)</a>.</p></li>
- <li><p>Support for threads.</p></li>
- <li><p>OpenSSL 1.1.1 or newer for the <a class="reference internal" href="../library/ssl.html#module-ssl" title="ssl: TLS/SSL wrapper for socket objects"><code class="xref py py-mod docutils literal notranslate"><span class="pre">ssl</span></code></a> and <a class="reference internal" href="../library/hashlib.html#module-hashlib" title="hashlib: Secure hash and message digest algorithms."><code class="xref py py-mod docutils literal notranslate"><span class="pre">hashlib</span></code></a> modules.</p></li>
- <li><p>On Windows, Microsoft Visual Studio 2017 or later is required.</p></li>
- </ul>
- <div class="versionchanged">
- <p><span class="versionmodified changed">Changed in version 3.11: </span>C11 compiler, IEEE 754 and NaN support are now required.
- On Windows, Visual Studio 2017 or later is required.</p>
- </div>
- <div class="versionchanged">
- <p><span class="versionmodified changed">Changed in version 3.10: </span>OpenSSL 1.1.1 is now required.</p>
- </div>
- <div class="versionchanged">
- <p><span class="versionmodified changed">Changed in version 3.7: </span>Thread support and OpenSSL 1.0.2 are now required.</p>
- </div>
- <div class="versionchanged">
- <p><span class="versionmodified changed">Changed in version 3.6: </span>Selected C99 features are now required, like <code class="docutils literal notranslate"><span class="pre"><stdint.h></span></code> and <code class="docutils literal notranslate"><span class="pre">static</span>
- <span class="pre">inline</span></code> functions.</p>
- </div>
- <div class="versionchanged">
- <p><span class="versionmodified changed">Changed in version 3.5: </span>On Windows, Visual Studio 2015 or later is required.</p>
- </div>
- <p>See also <span class="target" id="index-0"></span><a class="pep reference external" href="https://peps.python.org/pep-0007/"><strong>PEP 7</strong></a> “Style Guide for C Code” and <span class="target" id="index-1"></span><a class="pep reference external" href="https://peps.python.org/pep-0011/"><strong>PEP 11</strong></a> “CPython platform
- support”.</p>
- </section>
- <section id="generated-files">
- <h2><span class="section-number">3.2. </span>Generated files<a class="headerlink" href="#generated-files" title="Permalink to this headline">¶</a></h2>
- <p>To reduce build dependencies, Python source code contains multiple generated
- files. Commands to regenerate all generated files:</p>
- <div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">regen</span><span class="o">-</span><span class="nb">all</span>
- <span class="n">make</span> <span class="n">regen</span><span class="o">-</span><span class="n">stdlib</span><span class="o">-</span><span class="n">module</span><span class="o">-</span><span class="n">names</span>
- <span class="n">make</span> <span class="n">regen</span><span class="o">-</span><span class="n">limited</span><span class="o">-</span><span class="n">abi</span>
- <span class="n">make</span> <span class="n">regen</span><span class="o">-</span><span class="n">configure</span>
- </pre></div>
- </div>
- <p>The <code class="docutils literal notranslate"><span class="pre">Makefile.pre.in</span></code> file documents generated files, their inputs, and tools used
- to regenerate them. Search for <code class="docutils literal notranslate"><span class="pre">regen-*</span></code> make targets.</p>
- <p>The <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">regen-configure</span></code> command runs <a class="reference external" href="https://github.com/tiran/cpython_autoconf">tiran/cpython_autoconf</a> container for reproducible build;
- see container <code class="docutils literal notranslate"><span class="pre">entry.sh</span></code> script. The container is optional, the following
- command can be run locally, the generated files depend on autoconf and aclocal
- versions:</p>
- <div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="n">autoreconf</span> <span class="o">-</span><span class="n">ivf</span> <span class="o">-</span><span class="n">Werror</span>
- </pre></div>
- </div>
- </section>
- <section id="configure-options">
- <span id="id1"></span><h2><span class="section-number">3.3. </span>Configure Options<a class="headerlink" href="#configure-options" title="Permalink to this headline">¶</a></h2>
- <p>List all <code class="docutils literal notranslate"><span class="pre">./configure</span></code> script options using:</p>
- <div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="o">./</span><span class="n">configure</span> <span class="o">--</span><span class="n">help</span>
- </pre></div>
- </div>
- <p>See also the <code class="file docutils literal notranslate"><span class="pre">Misc/SpecialBuilds.txt</span></code> in the Python source distribution.</p>
- <section id="general-options">
- <h3><span class="section-number">3.3.1. </span>General Options<a class="headerlink" href="#general-options" title="Permalink to this headline">¶</a></h3>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-enable-loadable-sqlite-extensions">
- <span class="sig-name descname"><span class="pre">--enable-loadable-sqlite-extensions</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-enable-loadable-sqlite-extensions" title="Permalink to this definition">¶</a></dt>
- <dd><p>Support loadable extensions in the <code class="xref py py-mod docutils literal notranslate"><span class="pre">_sqlite</span></code> extension module (default
- is no) of the <a class="reference internal" href="../library/sqlite3.html#module-sqlite3" title="sqlite3: A DB-API 2.0 implementation using SQLite 3.x."><code class="xref py py-mod docutils literal notranslate"><span class="pre">sqlite3</span></code></a> module.</p>
- <p>See the <a class="reference internal" href="../library/sqlite3.html#sqlite3.Connection.enable_load_extension" title="sqlite3.Connection.enable_load_extension"><code class="xref py py-meth docutils literal notranslate"><span class="pre">sqlite3.Connection.enable_load_extension()</span></code></a> method of the
- <a class="reference internal" href="../library/sqlite3.html#module-sqlite3" title="sqlite3: A DB-API 2.0 implementation using SQLite 3.x."><code class="xref py py-mod docutils literal notranslate"><span class="pre">sqlite3</span></code></a> module.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.6.</span></p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-disable-ipv6">
- <span class="sig-name descname"><span class="pre">--disable-ipv6</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-disable-ipv6" title="Permalink to this definition">¶</a></dt>
- <dd><p>Disable IPv6 support (enabled by default if supported), see the
- <a class="reference internal" href="../library/socket.html#module-socket" title="socket: Low-level networking interface."><code class="xref py py-mod docutils literal notranslate"><span class="pre">socket</span></code></a> module.</p>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-enable-big-digits">
- <span class="sig-name descname"><span class="pre">--enable-big-digits</span></span><span class="sig-prename descclassname"><span class="pre">=[15|30]</span></span><a class="headerlink" href="#cmdoption-enable-big-digits" title="Permalink to this definition">¶</a></dt>
- <dd><p>Define the size in bits of Python <a class="reference internal" href="../library/functions.html#int" title="int"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a> digits: 15 or 30 bits.</p>
- <p>By default, the digit size is 30.</p>
- <p>Define the <code class="docutils literal notranslate"><span class="pre">PYLONG_BITS_IN_DIGIT</span></code> to <code class="docutils literal notranslate"><span class="pre">15</span></code> or <code class="docutils literal notranslate"><span class="pre">30</span></code>.</p>
- <p>See <a class="reference internal" href="../library/sys.html#sys.int_info" title="sys.int_info"><code class="xref py py-data docutils literal notranslate"><span class="pre">sys.int_info.bits_per_digit</span></code></a>.</p>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-suffix">
- <span class="sig-name descname"><span class="pre">--with-suffix</span></span><span class="sig-prename descclassname"><span class="pre">=SUFFIX</span></span><a class="headerlink" href="#cmdoption-with-suffix" title="Permalink to this definition">¶</a></dt>
- <dd><p>Set the Python executable suffix to <em>SUFFIX</em>.</p>
- <p>The default suffix is <code class="docutils literal notranslate"><span class="pre">.exe</span></code> on Windows and macOS (<code class="docutils literal notranslate"><span class="pre">python.exe</span></code>
- executable), <code class="docutils literal notranslate"><span class="pre">.js</span></code> on Emscripten node, <code class="docutils literal notranslate"><span class="pre">.html</span></code> on Emscripten browser,
- <code class="docutils literal notranslate"><span class="pre">.wasm</span></code> on WASI, and an empty string on other platforms (<code class="docutils literal notranslate"><span class="pre">python</span></code>
- executable).</p>
- <div class="versionchanged">
- <p><span class="versionmodified changed">Changed in version 3.11: </span>The default suffix on WASM platform is one of <code class="docutils literal notranslate"><span class="pre">.js</span></code>, <code class="docutils literal notranslate"><span class="pre">.html</span></code>
- or <code class="docutils literal notranslate"><span class="pre">.wasm</span></code>.</p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-tzpath">
- <span class="sig-name descname"><span class="pre">--with-tzpath</span></span><span class="sig-prename descclassname"><span class="pre">=<list</span> <span class="pre">of</span> <span class="pre">absolute</span> <span class="pre">paths</span> <span class="pre">separated</span> <span class="pre">by</span> <span class="pre">pathsep></span></span><a class="headerlink" href="#cmdoption-with-tzpath" title="Permalink to this definition">¶</a></dt>
- <dd><p>Select the default time zone search path for <a class="reference internal" href="../library/zoneinfo.html#zoneinfo.TZPATH" title="zoneinfo.TZPATH"><code class="xref py py-const docutils literal notranslate"><span class="pre">zoneinfo.TZPATH</span></code></a>.
- See the <a class="reference internal" href="../library/zoneinfo.html#zoneinfo-data-compile-time-config"><span class="std std-ref">Compile-time configuration</span></a> of the <a class="reference internal" href="../library/zoneinfo.html#module-zoneinfo" title="zoneinfo: IANA time zone support"><code class="xref py py-mod docutils literal notranslate"><span class="pre">zoneinfo</span></code></a> module.</p>
- <p>Default: <code class="docutils literal notranslate"><span class="pre">/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo</span></code>.</p>
- <p>See <a class="reference internal" href="../library/os.html#os.pathsep" title="os.pathsep"><code class="xref py py-data docutils literal notranslate"><span class="pre">os.pathsep</span></code></a> path separator.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.9.</span></p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-without-decimal-contextvar">
- <span class="sig-name descname"><span class="pre">--without-decimal-contextvar</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-without-decimal-contextvar" title="Permalink to this definition">¶</a></dt>
- <dd><p>Build the <code class="docutils literal notranslate"><span class="pre">_decimal</span></code> extension module using a thread-local context rather
- than a coroutine-local context (default), see the <a class="reference internal" href="../library/decimal.html#module-decimal" title="decimal: Implementation of the General Decimal Arithmetic Specification."><code class="xref py py-mod docutils literal notranslate"><span class="pre">decimal</span></code></a> module.</p>
- <p>See <a class="reference internal" href="../library/decimal.html#decimal.HAVE_CONTEXTVAR" title="decimal.HAVE_CONTEXTVAR"><code class="xref py py-const docutils literal notranslate"><span class="pre">decimal.HAVE_CONTEXTVAR</span></code></a> and the <a class="reference internal" href="../library/contextvars.html#module-contextvars" title="contextvars: Context Variables"><code class="xref py py-mod docutils literal notranslate"><span class="pre">contextvars</span></code></a> module.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.9.</span></p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-dbmliborder">
- <span class="sig-name descname"><span class="pre">--with-dbmliborder</span></span><span class="sig-prename descclassname"><span class="pre">=<list</span> <span class="pre">of</span> <span class="pre">backend</span> <span class="pre">names></span></span><a class="headerlink" href="#cmdoption-with-dbmliborder" title="Permalink to this definition">¶</a></dt>
- <dd><p>Override order to check db backends for the <a class="reference internal" href="../library/dbm.html#module-dbm" title="dbm: Interfaces to various Unix "database" formats."><code class="xref py py-mod docutils literal notranslate"><span class="pre">dbm</span></code></a> module</p>
- <p>A valid value is a colon (<code class="docutils literal notranslate"><span class="pre">:</span></code>) separated string with the backend names:</p>
- <ul class="simple">
- <li><p><code class="docutils literal notranslate"><span class="pre">ndbm</span></code>;</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">gdbm</span></code>;</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">bdb</span></code>.</p></li>
- </ul>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-without-c-locale-coercion">
- <span class="sig-name descname"><span class="pre">--without-c-locale-coercion</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-without-c-locale-coercion" title="Permalink to this definition">¶</a></dt>
- <dd><p>Disable C locale coercion to a UTF-8 based locale (enabled by default).</p>
- <p>Don’t define the <code class="docutils literal notranslate"><span class="pre">PY_COERCE_C_LOCALE</span></code> macro.</p>
- <p>See <span class="target" id="index-2"></span><a class="reference internal" href="cmdline.html#envvar-PYTHONCOERCECLOCALE"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">PYTHONCOERCECLOCALE</span></code></a> and the <span class="target" id="index-3"></span><a class="pep reference external" href="https://peps.python.org/pep-0538/"><strong>PEP 538</strong></a>.</p>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-without-freelists">
- <span class="sig-name descname"><span class="pre">--without-freelists</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-without-freelists" title="Permalink to this definition">¶</a></dt>
- <dd><p>Disable all freelists except the empty tuple singleton.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.11.</span></p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-platlibdir">
- <span class="sig-name descname"><span class="pre">--with-platlibdir</span></span><span class="sig-prename descclassname"><span class="pre">=DIRNAME</span></span><a class="headerlink" href="#cmdoption-with-platlibdir" title="Permalink to this definition">¶</a></dt>
- <dd><p>Python library directory name (default is <code class="docutils literal notranslate"><span class="pre">lib</span></code>).</p>
- <p>Fedora and SuSE use <code class="docutils literal notranslate"><span class="pre">lib64</span></code> on 64-bit platforms.</p>
- <p>See <a class="reference internal" href="../library/sys.html#sys.platlibdir" title="sys.platlibdir"><code class="xref py py-data docutils literal notranslate"><span class="pre">sys.platlibdir</span></code></a>.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.9.</span></p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-wheel-pkg-dir">
- <span class="sig-name descname"><span class="pre">--with-wheel-pkg-dir</span></span><span class="sig-prename descclassname"><span class="pre">=PATH</span></span><a class="headerlink" href="#cmdoption-with-wheel-pkg-dir" title="Permalink to this definition">¶</a></dt>
- <dd><p>Directory of wheel packages used by the <a class="reference internal" href="../library/ensurepip.html#module-ensurepip" title="ensurepip: Bootstrapping the "pip" installer into an existing Python installation or virtual environment."><code class="xref py py-mod docutils literal notranslate"><span class="pre">ensurepip</span></code></a> module
- (none by default).</p>
- <p>Some Linux distribution packaging policies recommend against bundling
- dependencies. For example, Fedora installs wheel packages in the
- <code class="docutils literal notranslate"><span class="pre">/usr/share/python-wheels/</span></code> directory and don’t install the
- <code class="xref py py-mod docutils literal notranslate"><span class="pre">ensurepip._bundled</span></code> package.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.10.</span></p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-pkg-config">
- <span class="sig-name descname"><span class="pre">--with-pkg-config</span></span><span class="sig-prename descclassname"><span class="pre">=[check|yes|no]</span></span><a class="headerlink" href="#cmdoption-with-pkg-config" title="Permalink to this definition">¶</a></dt>
- <dd><p>Whether configure should use <strong class="program">pkg-config</strong> to detect build
- dependencies.</p>
- <ul class="simple">
- <li><p><code class="docutils literal notranslate"><span class="pre">check</span></code> (default): <strong class="program">pkg-config</strong> is optional</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">yes</span></code>: <strong class="program">pkg-config</strong> is mandatory</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">no</span></code>: configure does not use <strong class="program">pkg-config</strong> even when present</p></li>
- </ul>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.11.</span></p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-enable-pystats">
- <span class="sig-name descname"><span class="pre">--enable-pystats</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-enable-pystats" title="Permalink to this definition">¶</a></dt>
- <dd><p>Turn on internal statistics gathering.</p>
- <p>The statistics will be dumped to a arbitrary (probably unique) file in
- <code class="docutils literal notranslate"><span class="pre">/tmp/py_stats/</span></code>, or <code class="docutils literal notranslate"><span class="pre">C:\temp\py_stats\</span></code> on Windows. If that directory
- does not exist, results will be printed on stdout.</p>
- <p>Use <code class="docutils literal notranslate"><span class="pre">Tools/scripts/summarize_stats.py</span></code> to read the stats.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.11.</span></p>
- </div>
- </dd></dl>
- </section>
- <section id="webassembly-options">
- <h3><span class="section-number">3.3.2. </span>WebAssembly Options<a class="headerlink" href="#webassembly-options" title="Permalink to this headline">¶</a></h3>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-emscripten-target">
- <span class="sig-name descname"><span class="pre">--with-emscripten-target</span></span><span class="sig-prename descclassname"><span class="pre">=[browser|node]</span></span><a class="headerlink" href="#cmdoption-with-emscripten-target" title="Permalink to this definition">¶</a></dt>
- <dd><p>Set build flavor for <code class="docutils literal notranslate"><span class="pre">wasm32-emscripten</span></code>.</p>
- <ul class="simple">
- <li><p><code class="docutils literal notranslate"><span class="pre">browser</span></code> (default): preload minimal stdlib, default MEMFS.</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">node</span></code>: NODERAWFS and pthread support.</p></li>
- </ul>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.11.</span></p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-enable-wasm-dynamic-linking">
- <span class="sig-name descname"><span class="pre">--enable-wasm-dynamic-linking</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-enable-wasm-dynamic-linking" title="Permalink to this definition">¶</a></dt>
- <dd><p>Turn on dynamic linking support for WASM.</p>
- <p>Dynamic linking enables <code class="docutils literal notranslate"><span class="pre">dlopen</span></code>. File size of the executable
- increases due to limited dead code elimination and additional features.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.11.</span></p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-enable-wasm-pthreads">
- <span class="sig-name descname"><span class="pre">--enable-wasm-pthreads</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-enable-wasm-pthreads" title="Permalink to this definition">¶</a></dt>
- <dd><p>Turn on pthreads support for WASM.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.11.</span></p>
- </div>
- </dd></dl>
- </section>
- <section id="install-options">
- <h3><span class="section-number">3.3.3. </span>Install Options<a class="headerlink" href="#install-options" title="Permalink to this headline">¶</a></h3>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-prefix">
- <span class="sig-name descname"><span class="pre">--prefix</span></span><span class="sig-prename descclassname"><span class="pre">=PREFIX</span></span><a class="headerlink" href="#cmdoption-prefix" title="Permalink to this definition">¶</a></dt>
- <dd><p>Install architecture-independent files in PREFIX. On Unix, it
- defaults to <code class="file docutils literal notranslate"><span class="pre">/usr/local</span></code>.</p>
- <p>This value can be retrieved at runtime using <a class="reference internal" href="../library/sys.html#sys.prefix" title="sys.prefix"><code class="xref py py-data docutils literal notranslate"><span class="pre">sys.prefix</span></code></a>.</p>
- <p>As an example, one can use <code class="docutils literal notranslate"><span class="pre">--prefix="$HOME/.local/"</span></code> to install
- a Python in its home directory.</p>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-exec-prefix">
- <span class="sig-name descname"><span class="pre">--exec-prefix</span></span><span class="sig-prename descclassname"><span class="pre">=EPREFIX</span></span><a class="headerlink" href="#cmdoption-exec-prefix" title="Permalink to this definition">¶</a></dt>
- <dd><p>Install architecture-dependent files in EPREFIX, defaults to <a class="reference internal" href="#cmdoption-prefix"><code class="xref std std-option docutils literal notranslate"><span class="pre">--prefix</span></code></a>.</p>
- <p>This value can be retrieved at runtime using <a class="reference internal" href="../library/sys.html#sys.exec_prefix" title="sys.exec_prefix"><code class="xref py py-data docutils literal notranslate"><span class="pre">sys.exec_prefix</span></code></a>.</p>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-disable-test-modules">
- <span class="sig-name descname"><span class="pre">--disable-test-modules</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-disable-test-modules" title="Permalink to this definition">¶</a></dt>
- <dd><p>Don’t build nor install test modules, like the <a class="reference internal" href="../library/test.html#module-test" title="test: Regression tests package containing the testing suite for Python."><code class="xref py py-mod docutils literal notranslate"><span class="pre">test</span></code></a> package or the
- <code class="xref py py-mod docutils literal notranslate"><span class="pre">_testcapi</span></code> extension module (built and installed by default).</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.10.</span></p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-ensurepip">
- <span class="sig-name descname"><span class="pre">--with-ensurepip</span></span><span class="sig-prename descclassname"><span class="pre">=[upgrade|install|no]</span></span><a class="headerlink" href="#cmdoption-with-ensurepip" title="Permalink to this definition">¶</a></dt>
- <dd><p>Select the <a class="reference internal" href="../library/ensurepip.html#module-ensurepip" title="ensurepip: Bootstrapping the "pip" installer into an existing Python installation or virtual environment."><code class="xref py py-mod docutils literal notranslate"><span class="pre">ensurepip</span></code></a> command run on Python installation:</p>
- <ul class="simple">
- <li><p><code class="docutils literal notranslate"><span class="pre">upgrade</span></code> (default): run <code class="docutils literal notranslate"><span class="pre">python</span> <span class="pre">-m</span> <span class="pre">ensurepip</span> <span class="pre">--altinstall</span> <span class="pre">--upgrade</span></code>
- command.</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">install</span></code>: run <code class="docutils literal notranslate"><span class="pre">python</span> <span class="pre">-m</span> <span class="pre">ensurepip</span> <span class="pre">--altinstall</span></code> command;</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">no</span></code>: don’t run ensurepip;</p></li>
- </ul>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.6.</span></p>
- </div>
- </dd></dl>
- </section>
- <section id="performance-options">
- <h3><span class="section-number">3.3.4. </span>Performance options<a class="headerlink" href="#performance-options" title="Permalink to this headline">¶</a></h3>
- <p>Configuring Python using <code class="docutils literal notranslate"><span class="pre">--enable-optimizations</span> <span class="pre">--with-lto</span></code> (PGO + LTO) is
- recommended for best performance. The experimental <code class="docutils literal notranslate"><span class="pre">--enable-bolt</span></code> flag can
- also be used to improve performance.</p>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-enable-optimizations">
- <span class="sig-name descname"><span class="pre">--enable-optimizations</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-enable-optimizations" title="Permalink to this definition">¶</a></dt>
- <dd><p>Enable Profile Guided Optimization (PGO) using <span class="target" id="index-4"></span><a class="reference internal" href="#envvar-PROFILE_TASK"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">PROFILE_TASK</span></code></a>
- (disabled by default).</p>
- <p>The C compiler Clang requires <code class="docutils literal notranslate"><span class="pre">llvm-profdata</span></code> program for PGO. On
- macOS, GCC also requires it: GCC is just an alias to Clang on macOS.</p>
- <p>Disable also semantic interposition in libpython if <code class="docutils literal notranslate"><span class="pre">--enable-shared</span></code> and
- GCC is used: add <code class="docutils literal notranslate"><span class="pre">-fno-semantic-interposition</span></code> to the compiler and linker
- flags.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.6.</span></p>
- </div>
- <div class="versionchanged">
- <p><span class="versionmodified changed">Changed in version 3.10: </span>Use <code class="docutils literal notranslate"><span class="pre">-fno-semantic-interposition</span></code> on GCC.</p>
- </div>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-PROFILE_TASK">
- <span class="sig-name descname"><span class="pre">PROFILE_TASK</span></span><a class="headerlink" href="#envvar-PROFILE_TASK" title="Permalink to this definition">¶</a></dt>
- <dd><p>Environment variable used in the Makefile: Python command line arguments for
- the PGO generation task.</p>
- <p>Default: <code class="docutils literal notranslate"><span class="pre">-m</span> <span class="pre">test</span> <span class="pre">--pgo</span> <span class="pre">--timeout=$(TESTTIMEOUT)</span></code>.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.8.</span></p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-lto">
- <span class="sig-name descname"><span class="pre">--with-lto</span></span><span class="sig-prename descclassname"><span class="pre">=[full|thin|no|yes]</span></span><a class="headerlink" href="#cmdoption-with-lto" title="Permalink to this definition">¶</a></dt>
- <dd><p>Enable Link Time Optimization (LTO) in any build (disabled by default).</p>
- <p>The C compiler Clang requires <code class="docutils literal notranslate"><span class="pre">llvm-ar</span></code> for LTO (<code class="docutils literal notranslate"><span class="pre">ar</span></code> on macOS), as well
- as an LTO-aware linker (<code class="docutils literal notranslate"><span class="pre">ld.gold</span></code> or <code class="docutils literal notranslate"><span class="pre">lld</span></code>).</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.6.</span></p>
- </div>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.11: </span>To use ThinLTO feature, use <code class="docutils literal notranslate"><span class="pre">--with-lto=thin</span></code> on Clang.</p>
- </div>
- <div class="versionchanged">
- <p><span class="versionmodified changed">Changed in version 3.12: </span>Use ThinLTO as the default optimization policy on Clang if the compiler accepts the flag.</p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-enable-bolt">
- <span class="sig-name descname"><span class="pre">--enable-bolt</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-enable-bolt" title="Permalink to this definition">¶</a></dt>
- <dd><p>Enable usage of the <a class="reference external" href="https://github.com/llvm/llvm-project/tree/main/bolt">BOLT post-link binary optimizer</a> (disabled by
- default).</p>
- <p>BOLT is part of the LLVM project but is not always included in their binary
- distributions. This flag requires that <code class="docutils literal notranslate"><span class="pre">llvm-bolt</span></code> and <code class="docutils literal notranslate"><span class="pre">merge-fdata</span></code>
- are available.</p>
- <p>BOLT is still a fairly new project so this flag should be considered
- experimental for now. Because this tool operates on machine code its success
- is dependent on a combination of the build environment + the other
- optimization configure args + the CPU architecture, and not all combinations
- are supported.
- BOLT versions before LLVM 16 are known to crash BOLT under some scenarios.
- Use of LLVM 16 or newer for BOLT optimization is strongly encouraged.</p>
- <p>The <code class="xref std std-envvar docutils literal notranslate"><span class="pre">BOLT_INSTRUMENT_FLAGS</span></code> and <code class="xref std std-envvar docutils literal notranslate"><span class="pre">BOLT_APPLY_FLAGS</span></code>
- <strong class="program">configure</strong> variables can be defined to override the default set of
- arguments for <strong class="program">llvm-bolt</strong> to instrument and apply BOLT data to
- binaries, respectively.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.12.</span></p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-computed-gotos">
- <span class="sig-name descname"><span class="pre">--with-computed-gotos</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-with-computed-gotos" title="Permalink to this definition">¶</a></dt>
- <dd><p>Enable computed gotos in evaluation loop (enabled by default on supported
- compilers).</p>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-without-pymalloc">
- <span class="sig-name descname"><span class="pre">--without-pymalloc</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-without-pymalloc" title="Permalink to this definition">¶</a></dt>
- <dd><p>Disable the specialized Python memory allocator <a class="reference internal" href="../c-api/memory.html#pymalloc"><span class="std std-ref">pymalloc</span></a>
- (enabled by default).</p>
- <p>See also <span class="target" id="index-5"></span><a class="reference internal" href="cmdline.html#envvar-PYTHONMALLOC"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">PYTHONMALLOC</span></code></a> environment variable.</p>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-without-doc-strings">
- <span class="sig-name descname"><span class="pre">--without-doc-strings</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-without-doc-strings" title="Permalink to this definition">¶</a></dt>
- <dd><p>Disable static documentation strings to reduce the memory footprint (enabled
- by default). Documentation strings defined in Python are not affected.</p>
- <p>Don’t define the <code class="docutils literal notranslate"><span class="pre">WITH_DOC_STRINGS</span></code> macro.</p>
- <p>See the <code class="docutils literal notranslate"><span class="pre">PyDoc_STRVAR()</span></code> macro.</p>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-enable-profiling">
- <span class="sig-name descname"><span class="pre">--enable-profiling</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-enable-profiling" title="Permalink to this definition">¶</a></dt>
- <dd><p>Enable C-level code profiling with <code class="docutils literal notranslate"><span class="pre">gprof</span></code> (disabled by default).</p>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-strict-overflow">
- <span class="sig-name descname"><span class="pre">--with-strict-overflow</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-with-strict-overflow" title="Permalink to this definition">¶</a></dt>
- <dd><p>Add <code class="docutils literal notranslate"><span class="pre">-fstrict-overflow</span></code> to the C compiler flags (by default we add
- <code class="docutils literal notranslate"><span class="pre">-fno-strict-overflow</span></code> instead).</p>
- </dd></dl>
- </section>
- <section id="python-debug-build">
- <span id="debug-build"></span><h3><span class="section-number">3.3.5. </span>Python Debug Build<a class="headerlink" href="#python-debug-build" title="Permalink to this headline">¶</a></h3>
- <p>A debug build is Python built with the <a class="reference internal" href="#cmdoption-with-pydebug"><code class="xref std std-option docutils literal notranslate"><span class="pre">--with-pydebug</span></code></a> configure
- option.</p>
- <p>Effects of a debug build:</p>
- <ul class="simple">
- <li><p>Display all warnings by default: the list of default warning filters is empty
- in the <a class="reference internal" href="../library/warnings.html#module-warnings" title="warnings: Issue warning messages and control their disposition."><code class="xref py py-mod docutils literal notranslate"><span class="pre">warnings</span></code></a> module.</p></li>
- <li><p>Add <code class="docutils literal notranslate"><span class="pre">d</span></code> to <a class="reference internal" href="../library/sys.html#sys.abiflags" title="sys.abiflags"><code class="xref py py-data docutils literal notranslate"><span class="pre">sys.abiflags</span></code></a>.</p></li>
- <li><p>Add <code class="xref py py-func docutils literal notranslate"><span class="pre">sys.gettotalrefcount()</span></code> function.</p></li>
- <li><p>Add <a class="reference internal" href="cmdline.html#cmdoption-X"><code class="xref std std-option docutils literal notranslate"><span class="pre">-X</span> <span class="pre">showrefcount</span></code></a> command line option.</p></li>
- <li><p>Add <a class="reference internal" href="cmdline.html#cmdoption-d"><code class="xref std std-option docutils literal notranslate"><span class="pre">-d</span></code></a> command line option and <span class="target" id="index-6"></span><a class="reference internal" href="cmdline.html#envvar-PYTHONDEBUG"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">PYTHONDEBUG</span></code></a> environment
- variable to debug the parser.</p></li>
- <li><p>Add support for the <code class="docutils literal notranslate"><span class="pre">__lltrace__</span></code> variable: enable low-level tracing in the
- bytecode evaluation loop if the variable is defined.</p></li>
- <li><p>Install <a class="reference internal" href="../c-api/memory.html#default-memory-allocators"><span class="std std-ref">debug hooks on memory allocators</span></a>
- to detect buffer overflow and other memory errors.</p></li>
- <li><p>Define <code class="docutils literal notranslate"><span class="pre">Py_DEBUG</span></code> and <code class="docutils literal notranslate"><span class="pre">Py_REF_DEBUG</span></code> macros.</p></li>
- <li><p>Add runtime checks: code surrounded by <code class="docutils literal notranslate"><span class="pre">#ifdef</span> <span class="pre">Py_DEBUG</span></code> and <code class="docutils literal notranslate"><span class="pre">#endif</span></code>.
- Enable <code class="docutils literal notranslate"><span class="pre">assert(...)</span></code> and <code class="docutils literal notranslate"><span class="pre">_PyObject_ASSERT(...)</span></code> assertions: don’t set
- the <code class="docutils literal notranslate"><span class="pre">NDEBUG</span></code> macro (see also the <a class="reference internal" href="#cmdoption-with-assertions"><code class="xref std std-option docutils literal notranslate"><span class="pre">--with-assertions</span></code></a> configure
- option). Main runtime checks:</p>
- <ul>
- <li><p>Add sanity checks on the function arguments.</p></li>
- <li><p>Unicode and int objects are created with their memory filled with a pattern
- to detect usage of uninitialized objects.</p></li>
- <li><p>Ensure that functions which can clear or replace the current exception are
- not called with an exception raised.</p></li>
- <li><p>Check that deallocator functions don’t change the current exception.</p></li>
- <li><p>The garbage collector (<a class="reference internal" href="../library/gc.html#gc.collect" title="gc.collect"><code class="xref py py-func docutils literal notranslate"><span class="pre">gc.collect()</span></code></a> function) runs some basic checks
- on objects consistency.</p></li>
- <li><p>The <code class="xref c c-macro docutils literal notranslate"><span class="pre">Py_SAFE_DOWNCAST()</span></code> macro checks for integer underflow and
- overflow when downcasting from wide types to narrow types.</p></li>
- </ul>
- </li>
- </ul>
- <p>See also the <a class="reference internal" href="../library/devmode.html#devmode"><span class="std std-ref">Python Development Mode</span></a> and the
- <a class="reference internal" href="#cmdoption-with-trace-refs"><code class="xref std std-option docutils literal notranslate"><span class="pre">--with-trace-refs</span></code></a> configure option.</p>
- <div class="versionchanged">
- <p><span class="versionmodified changed">Changed in version 3.8: </span>Release builds and debug builds are now ABI compatible: defining the
- <code class="docutils literal notranslate"><span class="pre">Py_DEBUG</span></code> macro no longer implies the <code class="docutils literal notranslate"><span class="pre">Py_TRACE_REFS</span></code> macro (see the
- <a class="reference internal" href="#cmdoption-with-trace-refs"><code class="xref std std-option docutils literal notranslate"><span class="pre">--with-trace-refs</span></code></a> option), which introduces the only ABI
- incompatibility.</p>
- </div>
- </section>
- <section id="debug-options">
- <h3><span class="section-number">3.3.6. </span>Debug options<a class="headerlink" href="#debug-options" title="Permalink to this headline">¶</a></h3>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-pydebug">
- <span class="sig-name descname"><span class="pre">--with-pydebug</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-with-pydebug" title="Permalink to this definition">¶</a></dt>
- <dd><p><a class="reference internal" href="#debug-build"><span class="std std-ref">Build Python in debug mode</span></a>: define the <code class="docutils literal notranslate"><span class="pre">Py_DEBUG</span></code>
- macro (disabled by default).</p>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-trace-refs">
- <span class="sig-name descname"><span class="pre">--with-trace-refs</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-with-trace-refs" title="Permalink to this definition">¶</a></dt>
- <dd><p>Enable tracing references for debugging purpose (disabled by default).</p>
- <p>Effects:</p>
- <ul class="simple">
- <li><p>Define the <code class="docutils literal notranslate"><span class="pre">Py_TRACE_REFS</span></code> macro.</p></li>
- <li><p>Add <code class="xref py py-func docutils literal notranslate"><span class="pre">sys.getobjects()</span></code> function.</p></li>
- <li><p>Add <span class="target" id="index-7"></span><a class="reference internal" href="cmdline.html#envvar-PYTHONDUMPREFS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">PYTHONDUMPREFS</span></code></a> environment variable.</p></li>
- </ul>
- <p>This build is not ABI compatible with release build (default build) or debug
- build (<code class="docutils literal notranslate"><span class="pre">Py_DEBUG</span></code> and <code class="docutils literal notranslate"><span class="pre">Py_REF_DEBUG</span></code> macros).</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.8.</span></p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-assertions">
- <span class="sig-name descname"><span class="pre">--with-assertions</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-with-assertions" title="Permalink to this definition">¶</a></dt>
- <dd><p>Build with C assertions enabled (default is no): <code class="docutils literal notranslate"><span class="pre">assert(...);</span></code> and
- <code class="docutils literal notranslate"><span class="pre">_PyObject_ASSERT(...);</span></code>.</p>
- <p>If set, the <code class="docutils literal notranslate"><span class="pre">NDEBUG</span></code> macro is not defined in the <span class="target" id="index-8"></span><a class="reference internal" href="#envvar-OPT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">OPT</span></code></a> compiler
- variable.</p>
- <p>See also the <a class="reference internal" href="#cmdoption-with-pydebug"><code class="xref std std-option docutils literal notranslate"><span class="pre">--with-pydebug</span></code></a> option (<a class="reference internal" href="#debug-build"><span class="std std-ref">debug build</span></a>) which also enables assertions.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.6.</span></p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-valgrind">
- <span class="sig-name descname"><span class="pre">--with-valgrind</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-with-valgrind" title="Permalink to this definition">¶</a></dt>
- <dd><p>Enable Valgrind support (default is no).</p>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-dtrace">
- <span class="sig-name descname"><span class="pre">--with-dtrace</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-with-dtrace" title="Permalink to this definition">¶</a></dt>
- <dd><p>Enable DTrace support (default is no).</p>
- <p>See <a class="reference internal" href="../howto/instrumentation.html#instrumentation"><span class="std std-ref">Instrumenting CPython with DTrace and SystemTap</span></a>.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.6.</span></p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-address-sanitizer">
- <span class="sig-name descname"><span class="pre">--with-address-sanitizer</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-with-address-sanitizer" title="Permalink to this definition">¶</a></dt>
- <dd><p>Enable AddressSanitizer memory error detector, <code class="docutils literal notranslate"><span class="pre">asan</span></code> (default is no).</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.6.</span></p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-memory-sanitizer">
- <span class="sig-name descname"><span class="pre">--with-memory-sanitizer</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-with-memory-sanitizer" title="Permalink to this definition">¶</a></dt>
- <dd><p>Enable MemorySanitizer allocation error detector, <code class="docutils literal notranslate"><span class="pre">msan</span></code> (default is no).</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.6.</span></p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-undefined-behavior-sanitizer">
- <span class="sig-name descname"><span class="pre">--with-undefined-behavior-sanitizer</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-with-undefined-behavior-sanitizer" title="Permalink to this definition">¶</a></dt>
- <dd><p>Enable UndefinedBehaviorSanitizer undefined behaviour detector, <code class="docutils literal notranslate"><span class="pre">ubsan</span></code>
- (default is no).</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.6.</span></p>
- </div>
- </dd></dl>
- </section>
- <section id="linker-options">
- <h3><span class="section-number">3.3.7. </span>Linker options<a class="headerlink" href="#linker-options" title="Permalink to this headline">¶</a></h3>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-enable-shared">
- <span class="sig-name descname"><span class="pre">--enable-shared</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-enable-shared" title="Permalink to this definition">¶</a></dt>
- <dd><p>Enable building a shared Python library: <code class="docutils literal notranslate"><span class="pre">libpython</span></code> (default is no).</p>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-without-static-libpython">
- <span class="sig-name descname"><span class="pre">--without-static-libpython</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-without-static-libpython" title="Permalink to this definition">¶</a></dt>
- <dd><p>Do not build <code class="docutils literal notranslate"><span class="pre">libpythonMAJOR.MINOR.a</span></code> and do not install <code class="docutils literal notranslate"><span class="pre">python.o</span></code>
- (built and enabled by default).</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.10.</span></p>
- </div>
- </dd></dl>
- </section>
- <section id="libraries-options">
- <h3><span class="section-number">3.3.8. </span>Libraries options<a class="headerlink" href="#libraries-options" title="Permalink to this headline">¶</a></h3>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-libs">
- <span class="sig-name descname"><span class="pre">--with-libs</span></span><span class="sig-prename descclassname"><span class="pre">='lib1</span> <span class="pre">...'</span></span><a class="headerlink" href="#cmdoption-with-libs" title="Permalink to this definition">¶</a></dt>
- <dd><p>Link against additional libraries (default is no).</p>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-system-expat">
- <span class="sig-name descname"><span class="pre">--with-system-expat</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-with-system-expat" title="Permalink to this definition">¶</a></dt>
- <dd><p>Build the <code class="xref py py-mod docutils literal notranslate"><span class="pre">pyexpat</span></code> module using an installed <code class="docutils literal notranslate"><span class="pre">expat</span></code> library
- (default is no).</p>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-system-libmpdec">
- <span class="sig-name descname"><span class="pre">--with-system-libmpdec</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-with-system-libmpdec" title="Permalink to this definition">¶</a></dt>
- <dd><p>Build the <code class="docutils literal notranslate"><span class="pre">_decimal</span></code> extension module using an installed <code class="docutils literal notranslate"><span class="pre">mpdec</span></code>
- library, see the <a class="reference internal" href="../library/decimal.html#module-decimal" title="decimal: Implementation of the General Decimal Arithmetic Specification."><code class="xref py py-mod docutils literal notranslate"><span class="pre">decimal</span></code></a> module (default is no).</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.3.</span></p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-readline">
- <span class="sig-name descname"><span class="pre">--with-readline</span></span><span class="sig-prename descclassname"><span class="pre">=editline</span></span><a class="headerlink" href="#cmdoption-with-readline" title="Permalink to this definition">¶</a></dt>
- <dd><p>Use <code class="docutils literal notranslate"><span class="pre">editline</span></code> library for backend of the <a class="reference internal" href="../library/readline.html#module-readline" title="readline: GNU readline support for Python. (Unix)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">readline</span></code></a> module.</p>
- <p>Define the <code class="docutils literal notranslate"><span class="pre">WITH_EDITLINE</span></code> macro.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.10.</span></p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-without-readline">
- <span class="sig-name descname"><span class="pre">--without-readline</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-without-readline" title="Permalink to this definition">¶</a></dt>
- <dd><p>Don’t build the <a class="reference internal" href="../library/readline.html#module-readline" title="readline: GNU readline support for Python. (Unix)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">readline</span></code></a> module (built by default).</p>
- <p>Don’t define the <code class="docutils literal notranslate"><span class="pre">HAVE_LIBREADLINE</span></code> macro.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.10.</span></p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-libm">
- <span class="sig-name descname"><span class="pre">--with-libm</span></span><span class="sig-prename descclassname"><span class="pre">=STRING</span></span><a class="headerlink" href="#cmdoption-with-libm" title="Permalink to this definition">¶</a></dt>
- <dd><p>Override <code class="docutils literal notranslate"><span class="pre">libm</span></code> math library to <em>STRING</em> (default is system-dependent).</p>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-libc">
- <span class="sig-name descname"><span class="pre">--with-libc</span></span><span class="sig-prename descclassname"><span class="pre">=STRING</span></span><a class="headerlink" href="#cmdoption-with-libc" title="Permalink to this definition">¶</a></dt>
- <dd><p>Override <code class="docutils literal notranslate"><span class="pre">libc</span></code> C library to <em>STRING</em> (default is system-dependent).</p>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-openssl">
- <span class="sig-name descname"><span class="pre">--with-openssl</span></span><span class="sig-prename descclassname"><span class="pre">=DIR</span></span><a class="headerlink" href="#cmdoption-with-openssl" title="Permalink to this definition">¶</a></dt>
- <dd><p>Root of the OpenSSL directory.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.7.</span></p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-openssl-rpath">
- <span class="sig-name descname"><span class="pre">--with-openssl-rpath</span></span><span class="sig-prename descclassname"><span class="pre">=[no|auto|DIR]</span></span><a class="headerlink" href="#cmdoption-with-openssl-rpath" title="Permalink to this definition">¶</a></dt>
- <dd><p>Set runtime library directory (rpath) for OpenSSL libraries:</p>
- <ul class="simple">
- <li><p><code class="docutils literal notranslate"><span class="pre">no</span></code> (default): don’t set rpath;</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">auto</span></code>: auto-detect rpath from <a class="reference internal" href="#cmdoption-with-openssl"><code class="xref std std-option docutils literal notranslate"><span class="pre">--with-openssl</span></code></a> and
- <code class="docutils literal notranslate"><span class="pre">pkg-config</span></code>;</p></li>
- <li><p><em>DIR</em>: set an explicit rpath.</p></li>
- </ul>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.10.</span></p>
- </div>
- </dd></dl>
- </section>
- <section id="security-options">
- <h3><span class="section-number">3.3.9. </span>Security Options<a class="headerlink" href="#security-options" title="Permalink to this headline">¶</a></h3>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-hash-algorithm">
- <span class="sig-name descname"><span class="pre">--with-hash-algorithm</span></span><span class="sig-prename descclassname"><span class="pre">=[fnv|siphash13|siphash24]</span></span><a class="headerlink" href="#cmdoption-with-hash-algorithm" title="Permalink to this definition">¶</a></dt>
- <dd><p>Select hash algorithm for use in <code class="docutils literal notranslate"><span class="pre">Python/pyhash.c</span></code>:</p>
- <ul class="simple">
- <li><p><code class="docutils literal notranslate"><span class="pre">siphash13</span></code> (default);</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">siphash24</span></code>;</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">fnv</span></code>.</p></li>
- </ul>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.4.</span></p>
- </div>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.11: </span><code class="docutils literal notranslate"><span class="pre">siphash13</span></code> is added and it is the new default.</p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-builtin-hashlib-hashes">
- <span class="sig-name descname"><span class="pre">--with-builtin-hashlib-hashes</span></span><span class="sig-prename descclassname"><span class="pre">=md5,sha1,sha256,sha512,sha3,blake2</span></span><a class="headerlink" href="#cmdoption-with-builtin-hashlib-hashes" title="Permalink to this definition">¶</a></dt>
- <dd><p>Built-in hash modules:</p>
- <ul class="simple">
- <li><p><code class="docutils literal notranslate"><span class="pre">md5</span></code>;</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">sha1</span></code>;</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">sha256</span></code>;</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">sha512</span></code>;</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">sha3</span></code> (with shake);</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">blake2</span></code>.</p></li>
- </ul>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.9.</span></p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-ssl-default-suites">
- <span class="sig-name descname"><span class="pre">--with-ssl-default-suites</span></span><span class="sig-prename descclassname"><span class="pre">=[python|openssl|STRING]</span></span><a class="headerlink" href="#cmdoption-with-ssl-default-suites" title="Permalink to this definition">¶</a></dt>
- <dd><p>Override the OpenSSL default cipher suites string:</p>
- <ul class="simple">
- <li><p><code class="docutils literal notranslate"><span class="pre">python</span></code> (default): use Python’s preferred selection;</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">openssl</span></code>: leave OpenSSL’s defaults untouched;</p></li>
- <li><p><em>STRING</em>: use a custom string</p></li>
- </ul>
- <p>See the <a class="reference internal" href="../library/ssl.html#module-ssl" title="ssl: TLS/SSL wrapper for socket objects"><code class="xref py py-mod docutils literal notranslate"><span class="pre">ssl</span></code></a> module.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.7.</span></p>
- </div>
- <div class="versionchanged">
- <p><span class="versionmodified changed">Changed in version 3.10: </span>The settings <code class="docutils literal notranslate"><span class="pre">python</span></code> and <em>STRING</em> also set TLS 1.2 as minimum
- protocol version.</p>
- </div>
- </dd></dl>
- </section>
- <section id="macos-options">
- <h3><span class="section-number">3.3.10. </span>macOS Options<a class="headerlink" href="#macos-options" title="Permalink to this headline">¶</a></h3>
- <p>See <code class="docutils literal notranslate"><span class="pre">Mac/README.rst</span></code>.</p>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-enable-universalsdk">
- <span class="sig-name descname"><span class="pre">--enable-universalsdk</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-enable-universalsdk" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-0">
- <span class="sig-name descname"><span class="pre">--enable-universalsdk</span></span><span class="sig-prename descclassname"><span class="pre">=SDKDIR</span></span><a class="headerlink" href="#cmdoption-0" title="Permalink to this definition">¶</a></dt>
- <dd><p>Create a universal binary build. <em>SDKDIR</em> specifies which macOS SDK should
- be used to perform the build (default is no).</p>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-enable-framework">
- <span class="sig-name descname"><span class="pre">--enable-framework</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-enable-framework" title="Permalink to this definition">¶</a></dt>
- <dd></dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-1">
- <span class="sig-name descname"><span class="pre">--enable-framework</span></span><span class="sig-prename descclassname"><span class="pre">=INSTALLDIR</span></span><a class="headerlink" href="#cmdoption-1" title="Permalink to this definition">¶</a></dt>
- <dd><p>Create a Python.framework rather than a traditional Unix install. Optional
- <em>INSTALLDIR</em> specifies the installation path (default is no).</p>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-universal-archs">
- <span class="sig-name descname"><span class="pre">--with-universal-archs</span></span><span class="sig-prename descclassname"><span class="pre">=ARCH</span></span><a class="headerlink" href="#cmdoption-with-universal-archs" title="Permalink to this definition">¶</a></dt>
- <dd><p>Specify the kind of universal binary that should be created. This option is
- only valid when <a class="reference internal" href="#cmdoption-0"><code class="xref std std-option docutils literal notranslate"><span class="pre">--enable-universalsdk</span></code></a> is set.</p>
- <p>Options:</p>
- <ul class="simple">
- <li><p><code class="docutils literal notranslate"><span class="pre">universal2</span></code>;</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">32-bit</span></code>;</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">64-bit</span></code>;</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">3-way</span></code>;</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">intel</span></code>;</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">intel-32</span></code>;</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">intel-64</span></code>;</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">all</span></code>.</p></li>
- </ul>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-framework-name">
- <span class="sig-name descname"><span class="pre">--with-framework-name</span></span><span class="sig-prename descclassname"><span class="pre">=FRAMEWORK</span></span><a class="headerlink" href="#cmdoption-with-framework-name" title="Permalink to this definition">¶</a></dt>
- <dd><p>Specify the name for the python framework on macOS only valid when
- <a class="reference internal" href="#cmdoption-1"><code class="xref std std-option docutils literal notranslate"><span class="pre">--enable-framework</span></code></a> is set (default: <code class="docutils literal notranslate"><span class="pre">Python</span></code>).</p>
- </dd></dl>
- </section>
- <section id="cross-compiling-options">
- <h3><span class="section-number">3.3.11. </span>Cross Compiling Options<a class="headerlink" href="#cross-compiling-options" title="Permalink to this headline">¶</a></h3>
- <p>Cross compiling, also known as cross building, can be used to build Python
- for another CPU architecture or platform. Cross compiling requires a Python
- interpreter for the build platform. The version of the build Python must match
- the version of the cross compiled host Python.</p>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-build">
- <span class="sig-name descname"><span class="pre">--build</span></span><span class="sig-prename descclassname"><span class="pre">=BUILD</span></span><a class="headerlink" href="#cmdoption-build" title="Permalink to this definition">¶</a></dt>
- <dd><p>configure for building on BUILD, usually guessed by <strong class="program">config.guess</strong>.</p>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-host">
- <span class="sig-name descname"><span class="pre">--host</span></span><span class="sig-prename descclassname"><span class="pre">=HOST</span></span><a class="headerlink" href="#cmdoption-host" title="Permalink to this definition">¶</a></dt>
- <dd><p>cross-compile to build programs to run on HOST (target platform)</p>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-with-build-python">
- <span class="sig-name descname"><span class="pre">--with-build-python</span></span><span class="sig-prename descclassname"><span class="pre">=path/to/python</span></span><a class="headerlink" href="#cmdoption-with-build-python" title="Permalink to this definition">¶</a></dt>
- <dd><p>path to build <code class="docutils literal notranslate"><span class="pre">python</span></code> binary for cross compiling</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.11.</span></p>
- </div>
- </dd></dl>
- <dl class="std cmdoption">
- <dt class="sig sig-object std" id="cmdoption-arg-CONFIG_SITE">
- <span id="cmdoption-arg-config-site"></span><span class="sig-name descname"><span class="pre">CONFIG_SITE</span></span><span class="sig-prename descclassname"><span class="pre">=file</span></span><a class="headerlink" href="#cmdoption-arg-CONFIG_SITE" title="Permalink to this definition">¶</a></dt>
- <dd><p>An environment variable that points to a file with configure overrides.</p>
- <p>Example <em>config.site</em> file:</p>
- <div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="c1"># config.site-aarch64</span>
- <span class="n">ac_cv_buggy_getaddrinfo</span><span class="o">=</span><span class="n">no</span>
- <span class="n">ac_cv_file__dev_ptmx</span><span class="o">=</span><span class="n">yes</span>
- <span class="n">ac_cv_file__dev_ptc</span><span class="o">=</span><span class="n">no</span>
- </pre></div>
- </div>
- </dd></dl>
- <p>Cross compiling example:</p>
- <div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="n">CONFIG_SITE</span><span class="o">=</span><span class="n">config</span><span class="o">.</span><span class="n">site</span><span class="o">-</span><span class="n">aarch64</span> <span class="o">../</span><span class="n">configure</span> \
- <span class="o">--</span><span class="n">build</span><span class="o">=</span><span class="n">x86_64</span><span class="o">-</span><span class="n">pc</span><span class="o">-</span><span class="n">linux</span><span class="o">-</span><span class="n">gnu</span> \
- <span class="o">--</span><span class="n">host</span><span class="o">=</span><span class="n">aarch64</span><span class="o">-</span><span class="n">unknown</span><span class="o">-</span><span class="n">linux</span><span class="o">-</span><span class="n">gnu</span> \
- <span class="o">--</span><span class="k">with</span><span class="o">-</span><span class="n">build</span><span class="o">-</span><span class="n">python</span><span class="o">=../</span><span class="n">x86_64</span><span class="o">/</span><span class="n">python</span>
- </pre></div>
- </div>
- </section>
- </section>
- <section id="python-build-system">
- <h2><span class="section-number">3.4. </span>Python Build System<a class="headerlink" href="#python-build-system" title="Permalink to this headline">¶</a></h2>
- <section id="main-files-of-the-build-system">
- <h3><span class="section-number">3.4.1. </span>Main files of the build system<a class="headerlink" href="#main-files-of-the-build-system" title="Permalink to this headline">¶</a></h3>
- <ul class="simple">
- <li><p><code class="file docutils literal notranslate"><span class="pre">configure.ac</span></code> => <code class="file docutils literal notranslate"><span class="pre">configure</span></code>;</p></li>
- <li><p><code class="file docutils literal notranslate"><span class="pre">Makefile.pre.in</span></code> => <code class="file docutils literal notranslate"><span class="pre">Makefile</span></code> (created by <code class="file docutils literal notranslate"><span class="pre">configure</span></code>);</p></li>
- <li><p><code class="file docutils literal notranslate"><span class="pre">pyconfig.h</span></code> (created by <code class="file docutils literal notranslate"><span class="pre">configure</span></code>);</p></li>
- <li><p><code class="file docutils literal notranslate"><span class="pre">Modules/Setup</span></code>: C extensions built by the Makefile using
- <code class="file docutils literal notranslate"><span class="pre">Module/makesetup</span></code> shell script;</p></li>
- </ul>
- </section>
- <section id="main-build-steps">
- <h3><span class="section-number">3.4.2. </span>Main build steps<a class="headerlink" href="#main-build-steps" title="Permalink to this headline">¶</a></h3>
- <ul class="simple">
- <li><p>C files (<code class="docutils literal notranslate"><span class="pre">.c</span></code>) are built as object files (<code class="docutils literal notranslate"><span class="pre">.o</span></code>).</p></li>
- <li><p>A static <code class="docutils literal notranslate"><span class="pre">libpython</span></code> library (<code class="docutils literal notranslate"><span class="pre">.a</span></code>) is created from objects files.</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">python.o</span></code> and the static <code class="docutils literal notranslate"><span class="pre">libpython</span></code> library are linked into the
- final <code class="docutils literal notranslate"><span class="pre">python</span></code> program.</p></li>
- <li><p>C extensions are built by the Makefile (see <code class="file docutils literal notranslate"><span class="pre">Modules/Setup</span></code>).</p></li>
- </ul>
- </section>
- <section id="main-makefile-targets">
- <h3><span class="section-number">3.4.3. </span>Main Makefile targets<a class="headerlink" href="#main-makefile-targets" title="Permalink to this headline">¶</a></h3>
- <ul class="simple">
- <li><p><code class="docutils literal notranslate"><span class="pre">make</span></code>: Build Python with the standard library.</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">platform:</span></code>: build the <code class="docutils literal notranslate"><span class="pre">python</span></code> program, but don’t build the
- standard library extension modules.</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">profile-opt</span></code>: build Python using Profile Guided Optimization (PGO).
- You can use the configure <a class="reference internal" href="#cmdoption-enable-optimizations"><code class="xref std std-option docutils literal notranslate"><span class="pre">--enable-optimizations</span></code></a> option to make
- this the default target of the <code class="docutils literal notranslate"><span class="pre">make</span></code> command (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">all</span></code> or just
- <code class="docutils literal notranslate"><span class="pre">make</span></code>).</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">buildbottest</span></code>: Build Python and run the Python test suite, the same
- way than buildbots test Python. Set <code class="docutils literal notranslate"><span class="pre">TESTTIMEOUT</span></code> variable (in seconds)
- to change the test timeout (1200 by default: 20 minutes).</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">install</span></code>: Build and install Python.</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">regen-all</span></code>: Regenerate (almost) all generated files;
- <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">regen-stdlib-module-names</span></code> and <code class="docutils literal notranslate"><span class="pre">autoconf</span></code> must be run separately
- for the remaining generated files.</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code>: Remove built files.</p></li>
- <li><p><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">distclean</span></code>: Same than <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code>, but remove also files created
- by the configure script.</p></li>
- </ul>
- </section>
- <section id="c-extensions">
- <h3><span class="section-number">3.4.4. </span>C extensions<a class="headerlink" href="#c-extensions" title="Permalink to this headline">¶</a></h3>
- <p>Some C extensions are built as built-in modules, like the <code class="docutils literal notranslate"><span class="pre">sys</span></code> module.
- They are built with the <code class="docutils literal notranslate"><span class="pre">Py_BUILD_CORE_BUILTIN</span></code> macro defined.
- Built-in modules have no <code class="docutils literal notranslate"><span class="pre">__file__</span></code> attribute:</p>
- <div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">import</span> <span class="nn">sys</span>
- <span class="gp">>>> </span><span class="n">sys</span>
- <span class="go"><module 'sys' (built-in)></span>
- <span class="gp">>>> </span><span class="n">sys</span><span class="o">.</span><span class="vm">__file__</span>
- <span class="gt">Traceback (most recent call last):</span>
- File <span class="nb">"<stdin>"</span>, line <span class="m">1</span>, in <span class="n"><module></span>
- <span class="gr">AttributeError</span>: <span class="n">module 'sys' has no attribute '__file__'</span>
- </pre></div>
- </div>
- <p>Other C extensions are built as dynamic libraries, like the <code class="docutils literal notranslate"><span class="pre">_asyncio</span></code> module.
- They are built with the <code class="docutils literal notranslate"><span class="pre">Py_BUILD_CORE_MODULE</span></code> macro defined.
- Example on Linux x86-64:</p>
- <div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">import</span> <span class="nn">_asyncio</span>
- <span class="gp">>>> </span><span class="n">_asyncio</span>
- <span class="go"><module '_asyncio' from '/usr/lib64/python3.9/lib-dynload/_asyncio.cpython-39-x86_64-linux-gnu.so'></span>
- <span class="gp">>>> </span><span class="n">_asyncio</span><span class="o">.</span><span class="vm">__file__</span>
- <span class="go">'/usr/lib64/python3.9/lib-dynload/_asyncio.cpython-39-x86_64-linux-gnu.so'</span>
- </pre></div>
- </div>
- <p><code class="file docutils literal notranslate"><span class="pre">Modules/Setup</span></code> is used to generate Makefile targets to build C extensions.
- At the beginning of the files, C extensions are built as built-in modules.
- Extensions defined after the <code class="docutils literal notranslate"><span class="pre">*shared*</span></code> marker are built as dynamic libraries.</p>
- <p>The <code class="xref c c-macro docutils literal notranslate"><span class="pre">PyAPI_FUNC()</span></code>, <code class="xref c c-macro docutils literal notranslate"><span class="pre">PyAPI_DATA()</span></code> and
- <a class="reference internal" href="../c-api/intro.html#c.PyMODINIT_FUNC" title="PyMODINIT_FUNC"><code class="xref c c-macro docutils literal notranslate"><span class="pre">PyMODINIT_FUNC</span></code></a> macros of <code class="file docutils literal notranslate"><span class="pre">Include/exports.h</span></code> are defined
- differently depending if the <code class="docutils literal notranslate"><span class="pre">Py_BUILD_CORE_MODULE</span></code> macro is defined:</p>
- <ul class="simple">
- <li><p>Use <code class="docutils literal notranslate"><span class="pre">Py_EXPORTED_SYMBOL</span></code> if the <code class="docutils literal notranslate"><span class="pre">Py_BUILD_CORE_MODULE</span></code> is defined</p></li>
- <li><p>Use <code class="docutils literal notranslate"><span class="pre">Py_IMPORTED_SYMBOL</span></code> otherwise.</p></li>
- </ul>
- <p>If the <code class="docutils literal notranslate"><span class="pre">Py_BUILD_CORE_BUILTIN</span></code> macro is used by mistake on a C extension
- built as a shared library, its <code class="samp docutils literal notranslate"><span class="pre">PyInit_</span><em><span class="pre">xxx</span></em><span class="pre">()</span></code> function is not exported,
- causing an <a class="reference internal" href="../library/exceptions.html#ImportError" title="ImportError"><code class="xref py py-exc docutils literal notranslate"><span class="pre">ImportError</span></code></a> on import.</p>
- </section>
- </section>
- <section id="compiler-and-linker-flags">
- <h2><span class="section-number">3.5. </span>Compiler and linker flags<a class="headerlink" href="#compiler-and-linker-flags" title="Permalink to this headline">¶</a></h2>
- <p>Options set by the <code class="docutils literal notranslate"><span class="pre">./configure</span></code> script and environment variables and used by
- <code class="docutils literal notranslate"><span class="pre">Makefile</span></code>.</p>
- <section id="preprocessor-flags">
- <h3><span class="section-number">3.5.1. </span>Preprocessor flags<a class="headerlink" href="#preprocessor-flags" title="Permalink to this headline">¶</a></h3>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-CONFIGURE_CPPFLAGS">
- <span class="sig-name descname"><span class="pre">CONFIGURE_CPPFLAGS</span></span><a class="headerlink" href="#envvar-CONFIGURE_CPPFLAGS" title="Permalink to this definition">¶</a></dt>
- <dd><p>Value of <span class="target" id="index-9"></span><a class="reference internal" href="#envvar-CPPFLAGS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">CPPFLAGS</span></code></a> variable passed to the <code class="docutils literal notranslate"><span class="pre">./configure</span></code> script.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.6.</span></p>
- </div>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-CPPFLAGS">
- <span class="sig-name descname"><span class="pre">CPPFLAGS</span></span><a class="headerlink" href="#envvar-CPPFLAGS" title="Permalink to this definition">¶</a></dt>
- <dd><p>(Objective) C/C++ preprocessor flags, e.g. <code class="samp docutils literal notranslate"><span class="pre">-I</span><em><span class="pre">include_dir</span></em></code> if you have
- headers in a nonstandard directory <em>include_dir</em>.</p>
- <p>Both <span class="target" id="index-10"></span><a class="reference internal" href="#envvar-CPPFLAGS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">CPPFLAGS</span></code></a> and <span class="target" id="index-11"></span><a class="reference internal" href="#envvar-LDFLAGS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">LDFLAGS</span></code></a> need to contain the shell’s
- value to be able to build extension modules using the
- directories specified in the environment variables.</p>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-BASECPPFLAGS">
- <span class="sig-name descname"><span class="pre">BASECPPFLAGS</span></span><a class="headerlink" href="#envvar-BASECPPFLAGS" title="Permalink to this definition">¶</a></dt>
- <dd><div class="versionadded">
- <p><span class="versionmodified added">New in version 3.4.</span></p>
- </div>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-PY_CPPFLAGS">
- <span class="sig-name descname"><span class="pre">PY_CPPFLAGS</span></span><a class="headerlink" href="#envvar-PY_CPPFLAGS" title="Permalink to this definition">¶</a></dt>
- <dd><p>Extra preprocessor flags added for building the interpreter object files.</p>
- <p>Default: <code class="docutils literal notranslate"><span class="pre">$(BASECPPFLAGS)</span> <span class="pre">-I.</span> <span class="pre">-I$(srcdir)/Include</span> <span class="pre">$(CONFIGURE_CPPFLAGS)</span> <span class="pre">$(CPPFLAGS)</span></code>.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.2.</span></p>
- </div>
- </dd></dl>
- </section>
- <section id="compiler-flags">
- <h3><span class="section-number">3.5.2. </span>Compiler flags<a class="headerlink" href="#compiler-flags" title="Permalink to this headline">¶</a></h3>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-CC">
- <span class="sig-name descname"><span class="pre">CC</span></span><a class="headerlink" href="#envvar-CC" title="Permalink to this definition">¶</a></dt>
- <dd><p>C compiler command.</p>
- <p>Example: <code class="docutils literal notranslate"><span class="pre">gcc</span> <span class="pre">-pthread</span></code>.</p>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-CXX">
- <span class="sig-name descname"><span class="pre">CXX</span></span><a class="headerlink" href="#envvar-CXX" title="Permalink to this definition">¶</a></dt>
- <dd><p>C++ compiler command.</p>
- <p>Example: <code class="docutils literal notranslate"><span class="pre">g++</span> <span class="pre">-pthread</span></code>.</p>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-CFLAGS">
- <span class="sig-name descname"><span class="pre">CFLAGS</span></span><a class="headerlink" href="#envvar-CFLAGS" title="Permalink to this definition">¶</a></dt>
- <dd><p>C compiler flags.</p>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-CFLAGS_NODIST">
- <span class="sig-name descname"><span class="pre">CFLAGS_NODIST</span></span><a class="headerlink" href="#envvar-CFLAGS_NODIST" title="Permalink to this definition">¶</a></dt>
- <dd><p><span class="target" id="index-12"></span><a class="reference internal" href="#envvar-CFLAGS_NODIST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">CFLAGS_NODIST</span></code></a> is used for building the interpreter and stdlib C
- extensions. Use it when a compiler flag should <em>not</em> be part of
- <span class="target" id="index-13"></span><a class="reference internal" href="#envvar-CFLAGS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">CFLAGS</span></code></a> once Python is installed (<a class="reference external" href="https://github.com/python/cpython/issues/65320">gh-65320</a>).</p>
- <p>In particular, <span class="target" id="index-14"></span><a class="reference internal" href="#envvar-CFLAGS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">CFLAGS</span></code></a> should not contain:</p>
- <ul class="simple">
- <li><p>the compiler flag <code class="docutils literal notranslate"><span class="pre">-I</span></code> (for setting the search path for include files).
- The <code class="docutils literal notranslate"><span class="pre">-I</span></code> flags are processed from left to right, and any flags in
- <span class="target" id="index-15"></span><a class="reference internal" href="#envvar-CFLAGS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">CFLAGS</span></code></a> would take precedence over user- and package-supplied <code class="docutils literal notranslate"><span class="pre">-I</span></code>
- flags.</p></li>
- <li><p>hardening flags such as <code class="docutils literal notranslate"><span class="pre">-Werror</span></code> because distributions cannot control
- whether packages installed by users conform to such heightened
- standards.</p></li>
- </ul>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.5.</span></p>
- </div>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-COMPILEALL_OPTS">
- <span class="sig-name descname"><span class="pre">COMPILEALL_OPTS</span></span><a class="headerlink" href="#envvar-COMPILEALL_OPTS" title="Permalink to this definition">¶</a></dt>
- <dd><p>Options passed to the <a class="reference internal" href="../library/compileall.html#module-compileall" title="compileall: Tools for byte-compiling all Python source files in a directory tree."><code class="xref py py-mod docutils literal notranslate"><span class="pre">compileall</span></code></a> command line when building PYC files
- in <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">install</span></code>. Default: <code class="docutils literal notranslate"><span class="pre">-j0</span></code>.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.12.</span></p>
- </div>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-EXTRA_CFLAGS">
- <span class="sig-name descname"><span class="pre">EXTRA_CFLAGS</span></span><a class="headerlink" href="#envvar-EXTRA_CFLAGS" title="Permalink to this definition">¶</a></dt>
- <dd><p>Extra C compiler flags.</p>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-CONFIGURE_CFLAGS">
- <span class="sig-name descname"><span class="pre">CONFIGURE_CFLAGS</span></span><a class="headerlink" href="#envvar-CONFIGURE_CFLAGS" title="Permalink to this definition">¶</a></dt>
- <dd><p>Value of <span class="target" id="index-16"></span><a class="reference internal" href="#envvar-CFLAGS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">CFLAGS</span></code></a> variable passed to the <code class="docutils literal notranslate"><span class="pre">./configure</span></code>
- script.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.2.</span></p>
- </div>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-CONFIGURE_CFLAGS_NODIST">
- <span class="sig-name descname"><span class="pre">CONFIGURE_CFLAGS_NODIST</span></span><a class="headerlink" href="#envvar-CONFIGURE_CFLAGS_NODIST" title="Permalink to this definition">¶</a></dt>
- <dd><p>Value of <span class="target" id="index-17"></span><a class="reference internal" href="#envvar-CFLAGS_NODIST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">CFLAGS_NODIST</span></code></a> variable passed to the <code class="docutils literal notranslate"><span class="pre">./configure</span></code>
- script.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.5.</span></p>
- </div>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-BASECFLAGS">
- <span class="sig-name descname"><span class="pre">BASECFLAGS</span></span><a class="headerlink" href="#envvar-BASECFLAGS" title="Permalink to this definition">¶</a></dt>
- <dd><p>Base compiler flags.</p>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-OPT">
- <span class="sig-name descname"><span class="pre">OPT</span></span><a class="headerlink" href="#envvar-OPT" title="Permalink to this definition">¶</a></dt>
- <dd><p>Optimization flags.</p>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-CFLAGS_ALIASING">
- <span class="sig-name descname"><span class="pre">CFLAGS_ALIASING</span></span><a class="headerlink" href="#envvar-CFLAGS_ALIASING" title="Permalink to this definition">¶</a></dt>
- <dd><p>Strict or non-strict aliasing flags used to compile <code class="docutils literal notranslate"><span class="pre">Python/dtoa.c</span></code>.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.7.</span></p>
- </div>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-CCSHARED">
- <span class="sig-name descname"><span class="pre">CCSHARED</span></span><a class="headerlink" href="#envvar-CCSHARED" title="Permalink to this definition">¶</a></dt>
- <dd><p>Compiler flags used to build a shared library.</p>
- <p>For example, <code class="docutils literal notranslate"><span class="pre">-fPIC</span></code> is used on Linux and on BSD.</p>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-CFLAGSFORSHARED">
- <span class="sig-name descname"><span class="pre">CFLAGSFORSHARED</span></span><a class="headerlink" href="#envvar-CFLAGSFORSHARED" title="Permalink to this definition">¶</a></dt>
- <dd><p>Extra C flags added for building the interpreter object files.</p>
- <p>Default: <code class="docutils literal notranslate"><span class="pre">$(CCSHARED)</span></code> when <a class="reference internal" href="#cmdoption-enable-shared"><code class="xref std std-option docutils literal notranslate"><span class="pre">--enable-shared</span></code></a> is used, or an empty
- string otherwise.</p>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-PY_CFLAGS">
- <span class="sig-name descname"><span class="pre">PY_CFLAGS</span></span><a class="headerlink" href="#envvar-PY_CFLAGS" title="Permalink to this definition">¶</a></dt>
- <dd><p>Default: <code class="docutils literal notranslate"><span class="pre">$(BASECFLAGS)</span> <span class="pre">$(OPT)</span> <span class="pre">$(CONFIGURE_CFLAGS)</span> <span class="pre">$(CFLAGS)</span> <span class="pre">$(EXTRA_CFLAGS)</span></code>.</p>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-PY_CFLAGS_NODIST">
- <span class="sig-name descname"><span class="pre">PY_CFLAGS_NODIST</span></span><a class="headerlink" href="#envvar-PY_CFLAGS_NODIST" title="Permalink to this definition">¶</a></dt>
- <dd><p>Default: <code class="docutils literal notranslate"><span class="pre">$(CONFIGURE_CFLAGS_NODIST)</span> <span class="pre">$(CFLAGS_NODIST)</span> <span class="pre">-I$(srcdir)/Include/internal</span></code>.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.5.</span></p>
- </div>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-PY_STDMODULE_CFLAGS">
- <span class="sig-name descname"><span class="pre">PY_STDMODULE_CFLAGS</span></span><a class="headerlink" href="#envvar-PY_STDMODULE_CFLAGS" title="Permalink to this definition">¶</a></dt>
- <dd><p>C flags used for building the interpreter object files.</p>
- <p>Default: <code class="docutils literal notranslate"><span class="pre">$(PY_CFLAGS)</span> <span class="pre">$(PY_CFLAGS_NODIST)</span> <span class="pre">$(PY_CPPFLAGS)</span> <span class="pre">$(CFLAGSFORSHARED)</span></code>.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.7.</span></p>
- </div>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-PY_CORE_CFLAGS">
- <span class="sig-name descname"><span class="pre">PY_CORE_CFLAGS</span></span><a class="headerlink" href="#envvar-PY_CORE_CFLAGS" title="Permalink to this definition">¶</a></dt>
- <dd><p>Default: <code class="docutils literal notranslate"><span class="pre">$(PY_STDMODULE_CFLAGS)</span> <span class="pre">-DPy_BUILD_CORE</span></code>.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.2.</span></p>
- </div>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-PY_BUILTIN_MODULE_CFLAGS">
- <span class="sig-name descname"><span class="pre">PY_BUILTIN_MODULE_CFLAGS</span></span><a class="headerlink" href="#envvar-PY_BUILTIN_MODULE_CFLAGS" title="Permalink to this definition">¶</a></dt>
- <dd><p>Compiler flags to build a standard library extension module as a built-in
- module, like the <a class="reference internal" href="../library/posix.html#module-posix" title="posix: The most common POSIX system calls (normally used via module os). (Unix)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">posix</span></code></a> module.</p>
- <p>Default: <code class="docutils literal notranslate"><span class="pre">$(PY_STDMODULE_CFLAGS)</span> <span class="pre">-DPy_BUILD_CORE_BUILTIN</span></code>.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.8.</span></p>
- </div>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-PURIFY">
- <span class="sig-name descname"><span class="pre">PURIFY</span></span><a class="headerlink" href="#envvar-PURIFY" title="Permalink to this definition">¶</a></dt>
- <dd><p>Purify command. Purify is a memory debugger program.</p>
- <p>Default: empty string (not used).</p>
- </dd></dl>
- </section>
- <section id="linker-flags">
- <h3><span class="section-number">3.5.3. </span>Linker flags<a class="headerlink" href="#linker-flags" title="Permalink to this headline">¶</a></h3>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-LINKCC">
- <span class="sig-name descname"><span class="pre">LINKCC</span></span><a class="headerlink" href="#envvar-LINKCC" title="Permalink to this definition">¶</a></dt>
- <dd><p>Linker command used to build programs like <code class="docutils literal notranslate"><span class="pre">python</span></code> and <code class="docutils literal notranslate"><span class="pre">_testembed</span></code>.</p>
- <p>Default: <code class="docutils literal notranslate"><span class="pre">$(PURIFY)</span> <span class="pre">$(CC)</span></code>.</p>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-CONFIGURE_LDFLAGS">
- <span class="sig-name descname"><span class="pre">CONFIGURE_LDFLAGS</span></span><a class="headerlink" href="#envvar-CONFIGURE_LDFLAGS" title="Permalink to this definition">¶</a></dt>
- <dd><p>Value of <span class="target" id="index-18"></span><a class="reference internal" href="#envvar-LDFLAGS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">LDFLAGS</span></code></a> variable passed to the <code class="docutils literal notranslate"><span class="pre">./configure</span></code> script.</p>
- <p>Avoid assigning <span class="target" id="index-19"></span><a class="reference internal" href="#envvar-CFLAGS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">CFLAGS</span></code></a>, <span class="target" id="index-20"></span><a class="reference internal" href="#envvar-LDFLAGS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">LDFLAGS</span></code></a>, etc. so users can use
- them on the command line to append to these values without stomping the
- pre-set values.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.2.</span></p>
- </div>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-LDFLAGS_NODIST">
- <span class="sig-name descname"><span class="pre">LDFLAGS_NODIST</span></span><a class="headerlink" href="#envvar-LDFLAGS_NODIST" title="Permalink to this definition">¶</a></dt>
- <dd><p><span class="target" id="index-21"></span><a class="reference internal" href="#envvar-LDFLAGS_NODIST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">LDFLAGS_NODIST</span></code></a> is used in the same manner as
- <span class="target" id="index-22"></span><a class="reference internal" href="#envvar-CFLAGS_NODIST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">CFLAGS_NODIST</span></code></a>. Use it when a linker flag should <em>not</em> be part of
- <span class="target" id="index-23"></span><a class="reference internal" href="#envvar-LDFLAGS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">LDFLAGS</span></code></a> once Python is installed (<a class="reference external" href="https://github.com/python/cpython/issues/65320">gh-65320</a>).</p>
- <p>In particular, <span class="target" id="index-24"></span><a class="reference internal" href="#envvar-LDFLAGS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">LDFLAGS</span></code></a> should not contain:</p>
- <ul class="simple">
- <li><p>the compiler flag <code class="docutils literal notranslate"><span class="pre">-L</span></code> (for setting the search path for libraries).
- The <code class="docutils literal notranslate"><span class="pre">-L</span></code> flags are processed from left to right, and any flags in
- <span class="target" id="index-25"></span><a class="reference internal" href="#envvar-LDFLAGS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">LDFLAGS</span></code></a> would take precedence over user- and package-supplied <code class="docutils literal notranslate"><span class="pre">-L</span></code>
- flags.</p></li>
- </ul>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-CONFIGURE_LDFLAGS_NODIST">
- <span class="sig-name descname"><span class="pre">CONFIGURE_LDFLAGS_NODIST</span></span><a class="headerlink" href="#envvar-CONFIGURE_LDFLAGS_NODIST" title="Permalink to this definition">¶</a></dt>
- <dd><p>Value of <span class="target" id="index-26"></span><a class="reference internal" href="#envvar-LDFLAGS_NODIST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">LDFLAGS_NODIST</span></code></a> variable passed to the <code class="docutils literal notranslate"><span class="pre">./configure</span></code>
- script.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.8.</span></p>
- </div>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-LDFLAGS">
- <span class="sig-name descname"><span class="pre">LDFLAGS</span></span><a class="headerlink" href="#envvar-LDFLAGS" title="Permalink to this definition">¶</a></dt>
- <dd><p>Linker flags, e.g. <code class="samp docutils literal notranslate"><span class="pre">-L</span><em><span class="pre">lib_dir</span></em></code> if you have libraries in a nonstandard
- directory <em>lib_dir</em>.</p>
- <p>Both <span class="target" id="index-27"></span><a class="reference internal" href="#envvar-CPPFLAGS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">CPPFLAGS</span></code></a> and <span class="target" id="index-28"></span><a class="reference internal" href="#envvar-LDFLAGS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">LDFLAGS</span></code></a> need to contain the shell’s
- value to be able to build extension modules using the
- directories specified in the environment variables.</p>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-LIBS">
- <span class="sig-name descname"><span class="pre">LIBS</span></span><a class="headerlink" href="#envvar-LIBS" title="Permalink to this definition">¶</a></dt>
- <dd><p>Linker flags to pass libraries to the linker when linking the Python
- executable.</p>
- <p>Example: <code class="docutils literal notranslate"><span class="pre">-lrt</span></code>.</p>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-LDSHARED">
- <span class="sig-name descname"><span class="pre">LDSHARED</span></span><a class="headerlink" href="#envvar-LDSHARED" title="Permalink to this definition">¶</a></dt>
- <dd><p>Command to build a shared library.</p>
- <p>Default: <code class="docutils literal notranslate"><span class="pre">@LDSHARED@</span> <span class="pre">$(PY_LDFLAGS)</span></code>.</p>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-BLDSHARED">
- <span class="sig-name descname"><span class="pre">BLDSHARED</span></span><a class="headerlink" href="#envvar-BLDSHARED" title="Permalink to this definition">¶</a></dt>
- <dd><p>Command to build <code class="docutils literal notranslate"><span class="pre">libpython</span></code> shared library.</p>
- <p>Default: <code class="docutils literal notranslate"><span class="pre">@BLDSHARED@</span> <span class="pre">$(PY_CORE_LDFLAGS)</span></code>.</p>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-PY_LDFLAGS">
- <span class="sig-name descname"><span class="pre">PY_LDFLAGS</span></span><a class="headerlink" href="#envvar-PY_LDFLAGS" title="Permalink to this definition">¶</a></dt>
- <dd><p>Default: <code class="docutils literal notranslate"><span class="pre">$(CONFIGURE_LDFLAGS)</span> <span class="pre">$(LDFLAGS)</span></code>.</p>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-PY_LDFLAGS_NODIST">
- <span class="sig-name descname"><span class="pre">PY_LDFLAGS_NODIST</span></span><a class="headerlink" href="#envvar-PY_LDFLAGS_NODIST" title="Permalink to this definition">¶</a></dt>
- <dd><p>Default: <code class="docutils literal notranslate"><span class="pre">$(CONFIGURE_LDFLAGS_NODIST)</span> <span class="pre">$(LDFLAGS_NODIST)</span></code>.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.8.</span></p>
- </div>
- </dd></dl>
- <dl class="std envvar">
- <dt class="sig sig-object std" id="envvar-PY_CORE_LDFLAGS">
- <span class="sig-name descname"><span class="pre">PY_CORE_LDFLAGS</span></span><a class="headerlink" href="#envvar-PY_CORE_LDFLAGS" title="Permalink to this definition">¶</a></dt>
- <dd><p>Linker flags used for building the interpreter object files.</p>
- <div class="versionadded">
- <p><span class="versionmodified added">New in version 3.8.</span></p>
- </div>
- </dd></dl>
- </section>
- </section>
- </section>
- <div class="clearer"></div>
- </div>
- </div>
- </div>
- <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
- <div class="sphinxsidebarwrapper">
- <div>
- <h3><a href="../contents.html">Table of Contents</a></h3>
- <ul>
- <li><a class="reference internal" href="#">3. Configure Python</a><ul>
- <li><a class="reference internal" href="#build-requirements">3.1. Build Requirements</a></li>
- <li><a class="reference internal" href="#generated-files">3.2. Generated files</a></li>
- <li><a class="reference internal" href="#configure-options">3.3. Configure Options</a><ul>
- <li><a class="reference internal" href="#general-options">3.3.1. General Options</a></li>
- <li><a class="reference internal" href="#webassembly-options">3.3.2. WebAssembly Options</a></li>
- <li><a class="reference internal" href="#install-options">3.3.3. Install Options</a></li>
- <li><a class="reference internal" href="#performance-options">3.3.4. Performance options</a></li>
- <li><a class="reference internal" href="#python-debug-build">3.3.5. Python Debug Build</a></li>
- <li><a class="reference internal" href="#debug-options">3.3.6. Debug options</a></li>
- <li><a class="reference internal" href="#linker-options">3.3.7. Linker options</a></li>
- <li><a class="reference internal" href="#libraries-options">3.3.8. Libraries options</a></li>
- <li><a class="reference internal" href="#security-options">3.3.9. Security Options</a></li>
- <li><a class="reference internal" href="#macos-options">3.3.10. macOS Options</a></li>
- <li><a class="reference internal" href="#cross-compiling-options">3.3.11. Cross Compiling Options</a></li>
- </ul>
- </li>
- <li><a class="reference internal" href="#python-build-system">3.4. Python Build System</a><ul>
- <li><a class="reference internal" href="#main-files-of-the-build-system">3.4.1. Main files of the build system</a></li>
- <li><a class="reference internal" href="#main-build-steps">3.4.2. Main build steps</a></li>
- <li><a class="reference internal" href="#main-makefile-targets">3.4.3. Main Makefile targets</a></li>
- <li><a class="reference internal" href="#c-extensions">3.4.4. C extensions</a></li>
- </ul>
- </li>
- <li><a class="reference internal" href="#compiler-and-linker-flags">3.5. Compiler and linker flags</a><ul>
- <li><a class="reference internal" href="#preprocessor-flags">3.5.1. Preprocessor flags</a></li>
- <li><a class="reference internal" href="#compiler-flags">3.5.2. Compiler flags</a></li>
- <li><a class="reference internal" href="#linker-flags">3.5.3. Linker flags</a></li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </div>
- <div>
- <h4>Previous topic</h4>
- <p class="topless"><a href="unix.html"
- title="previous chapter"><span class="section-number">2. </span>Using Python on Unix platforms</a></p>
- </div>
- <div>
- <h4>Next topic</h4>
- <p class="topless"><a href="windows.html"
- title="next chapter"><span class="section-number">4. </span>Using Python on Windows</a></p>
- </div>
- <div role="note" aria-label="source link">
- <h3>This Page</h3>
- <ul class="this-page-menu">
- <li><a href="../bugs.html">Report a Bug</a></li>
- <li>
- <a href="https://github.com/python/cpython/blob/main/Doc/using/configure.rst"
- rel="nofollow">Show Source
- </a>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <div class="clearer"></div>
- </div>
- <div class="related" role="navigation" aria-label="related navigation">
- <h3>Navigation</h3>
- <ul>
- <li class="right" style="margin-right: 10px">
- <a href="../genindex.html" title="General Index"
- >index</a></li>
- <li class="right" >
- <a href="../py-modindex.html" title="Python Module Index"
- >modules</a> |</li>
- <li class="right" >
- <a href="windows.html" title="4. Using Python on Windows"
- >next</a> |</li>
- <li class="right" >
- <a href="unix.html" title="2. Using Python on Unix platforms"
- >previous</a> |</li>
- <li><img src="../_static/py.svg" alt="python logo" style="vertical-align: middle; margin-top: -1px"/></li>
- <li><a href="https://www.python.org/">Python</a> »</li>
- <li class="switchers">
- <div class="language_switcher_placeholder"></div>
- <div class="version_switcher_placeholder"></div>
- </li>
- <li>
-
- </li>
- <li id="cpython-language-and-version">
- <a href="../index.html">3.12.0 Documentation</a> »
- </li>
- <li class="nav-item nav-item-1"><a href="index.html" >Python Setup and Usage</a> »</li>
- <li class="nav-item nav-item-this"><a href=""><span class="section-number">3. </span>Configure Python</a></li>
- <li class="right">
-
- <div class="inline-search" role="search">
- <form class="inline-search" action="../search.html" method="get">
- <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" />
- <input type="submit" value="Go" />
- </form>
- </div>
- |
- </li>
- <li class="right">
- <label class="theme-selector-label">
- Theme
- <select class="theme-selector" oninput="activateTheme(this.value)">
- <option value="auto" selected>Auto</option>
- <option value="light">Light</option>
- <option value="dark">Dark</option>
- </select>
- </label> |</li>
-
- </ul>
- </div>
- <div class="footer">
- © <a href="../copyright.html">Copyright</a> 2001-2023, Python Software Foundation.
- <br />
- This page is licensed under the Python Software Foundation License Version 2.
- <br />
- Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
- <br />
- See <a href="/license.html">History and License</a> for more information.<br />
- <br />
- The Python Software Foundation is a non-profit corporation.
- <a href="https://www.python.org/psf/donations/">Please donate.</a>
- <br />
- <br />
- Last updated on Oct 02, 2023.
- <a href="/bugs.html">Found a bug</a>?
- <br />
- Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.5.0.
- </div>
- </body>
- </html>
|