• Home
  • Raw
  • Download

Lines Matching +full:default +full:- +full:build

5 .. _configure-options:
12 ./configure --help
17 ---------------
19 .. cmdoption:: --enable-loadable-sqlite-extensions
21 Support loadable extensions in the :mod:`_sqlite` extension module (default
29 .. cmdoption:: --disable-ipv6
31 Disable IPv6 support (enabled by default if supported), see the
34 .. cmdoption:: --enable-big-digits=[15|30]
38 By default, the digit size is 30.
44 .. cmdoption:: --with-cxx-main
45 .. cmdoption:: --with-cxx-main=COMPILER
50 .. cmdoption:: --with-suffix=SUFFIX
54 The default suffix is ``.exe`` on Windows and macOS (``python.exe``
60 The default suffix on WASM platform is one of ``.js``, ``.html``
63 .. cmdoption:: --with-tzpath=<list of absolute paths separated by pathsep>
65 Select the default time zone search path for :data:`zoneinfo.TZPATH`.
66 See the :ref:`Compile-time configuration
69 Default: ``/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo``.
75 .. cmdoption:: --without-decimal-contextvar
77 Build the ``_decimal`` extension module using a thread-local context rather
78 than a coroutine-local context (default), see the :mod:`decimal` module.
84 .. cmdoption:: --with-dbmliborder=<list of backend names>
94 .. cmdoption:: --without-c-locale-coercion
96 Disable C locale coercion to a UTF-8 based locale (enabled by default).
102 .. cmdoption:: --with-platlibdir=DIRNAME
104 Python library directory name (default is ``lib``).
106 Fedora and SuSE use ``lib64`` on 64-bit platforms.
112 .. cmdoption:: --with-wheel-pkg-dir=PATH
115 (none by default).
119 ``/usr/share/python-wheels/`` directory and don't install the
124 .. cmdoption:: --with-pkg-config=[check|yes|no]
126 Whether configure should use :program:`pkg-config` to detect build
129 * ``check`` (default): :program:`pkg-config` is optional
130 * ``yes``: :program:`pkg-config` is mandatory
131 * ``no``: configure does not use :program:`pkg-config` even when present
135 .. cmdoption:: --enable-pystats
147 -------------------
149 .. cmdoption:: --with-emscripten-target=[browser|node]
151 Set build flavor for ``wasm32-emscripten``.
153 * ``browser`` (default): preload minimal stdlib, default MEMFS.
158 .. cmdoption:: --enable-wasm-dynamic-linking
167 .. cmdoption:: --enable-wasm-pthreads
175 ---------------
177 .. cmdoption:: --prefix=PREFIX
179 Install architecture-independent files in PREFIX. On Unix, it
184 As an example, one can use ``--prefix="$HOME/.local/"`` to install
187 .. cmdoption:: --exec-prefix=EPREFIX
189 Install architecture-dependent files in EPREFIX, defaults to :option:`--prefix`.
193 .. cmdoption:: --disable-test-modules
195 Don't build nor install test modules, like the :mod:`test` package or the
196 :mod:`_testcapi` extension module (built and installed by default).
200 .. cmdoption:: --with-ensurepip=[upgrade|install|no]
204 * ``upgrade`` (default): run ``python -m ensurepip --altinstall --upgrade``
206 * ``install``: run ``python -m ensurepip --altinstall`` command;
213 -------------------
215 Configuring Python using ``--enable-optimizations --with-lto`` (PGO + LTO) is
218 .. cmdoption:: --enable-optimizations
221 (disabled by default).
223 The C compiler Clang requires ``llvm-profdata`` program for PGO. On
226 Disable also semantic interposition in libpython if ``--enable-shared`` and
227 GCC is used: add ``-fno-semantic-interposition`` to the compiler and linker
233 Use ``-fno-semantic-interposition`` on GCC.
240 Default: ``-m test --pgo --timeout=$(TESTTIMEOUT)``.
244 .. cmdoption:: --with-lto=[full|thin|no|yes]
246 Enable Link Time Optimization (LTO) in any build (disabled by default).
248 The C compiler Clang requires ``llvm-ar`` for LTO (``ar`` on macOS), as well
249 as an LTO-aware linker (``ld.gold`` or ``lld``).
254 To use ThinLTO feature, use ``--with-lto=thin`` on Clang.
256 .. cmdoption:: --with-computed-gotos
258 Enable computed gotos in evaluation loop (enabled by default on supported
261 .. cmdoption:: --without-pymalloc
264 (enabled by default).
268 .. cmdoption:: --without-doc-strings
271 by default). Documentation strings defined in Python are not affected.
277 .. cmdoption:: --enable-profiling
279 Enable C-level code profiling with ``gprof`` (disabled by default).
282 .. _debug-build:
284 Python Debug Build
285 ------------------
287 A debug build is Python built with the :option:`--with-pydebug` configure
290 Effects of a debug build:
292 * Display all warnings by default: the list of default warning filters is empty
296 * Add :option:`-X showrefcount <-X>` command line option.
298 * Add support for the ``__lltrace__`` variable: enable low-level tracing in the
300 * Install :ref:`debug hooks on memory allocators <default-memory-allocators>`
305 the ``NDEBUG`` macro (see also the :option:`--with-assertions` configure
320 :option:`--with-trace-refs` configure option.
325 :option:`--with-trace-refs` option), which introduces the only ABI
330 -------------
332 .. cmdoption:: --with-pydebug
334 :ref:`Build Python in debug mode <debug-build>`: define the ``Py_DEBUG``
335 macro (disabled by default).
337 .. cmdoption:: --with-trace-refs
339 Enable tracing references for debugging purpose (disabled by default).
347 This build is not ABI compatible with release build (default build) or debug
348 build (``Py_DEBUG`` and ``Py_REF_DEBUG`` macros).
352 .. cmdoption:: --with-assertions
354 Build with C assertions enabled (default is no): ``assert(...);`` and
360 See also the :option:`--with-pydebug` option (:ref:`debug build
361 <debug-build>`) which also enables assertions.
365 .. cmdoption:: --with-valgrind
367 Enable Valgrind support (default is no).
369 .. cmdoption:: --with-dtrace
371 Enable DTrace support (default is no).
378 .. cmdoption:: --with-address-sanitizer
380 Enable AddressSanitizer memory error detector, ``asan`` (default is no).
384 .. cmdoption:: --with-memory-sanitizer
386 Enable MemorySanitizer allocation error detector, ``msan`` (default is no).
390 .. cmdoption:: --with-undefined-behavior-sanitizer
393 (default is no).
399 --------------
401 .. cmdoption:: --enable-shared
403 Enable building a shared Python library: ``libpython`` (default is no).
405 .. cmdoption:: --without-static-libpython
407 Do not build ``libpythonMAJOR.MINOR.a`` and do not install ``python.o``
408 (built and enabled by default).
414 -----------------
416 .. cmdoption:: --with-libs='lib1 ...'
418 Link against additional libraries (default is no).
420 .. cmdoption:: --with-system-expat
422 Build the :mod:`pyexpat` module using an installed ``expat`` library
423 (default is no).
425 .. cmdoption:: --with-system-ffi
427 Build the :mod:`_ctypes` extension module using an installed ``ffi``
428 library, see the :mod:`ctypes` module (default is system-dependent).
430 .. cmdoption:: --with-system-libmpdec
432 Build the ``_decimal`` extension module using an installed ``mpdec``
433 library, see the :mod:`decimal` module (default is no).
437 .. cmdoption:: --with-readline=editline
445 .. cmdoption:: --without-readline
447 Don't build the :mod:`readline` module (built by default).
453 .. cmdoption:: --with-libm=STRING
455 Override ``libm`` math library to *STRING* (default is system-dependent).
457 .. cmdoption:: --with-libc=STRING
459 Override ``libc`` C library to *STRING* (default is system-dependent).
461 .. cmdoption:: --with-openssl=DIR
467 .. cmdoption:: --with-openssl-rpath=[no|auto|DIR]
471 * ``no`` (default): don't set rpath;
472 * ``auto``: auto-detect rpath from :option:`--with-openssl` and
473 ``pkg-config``;
480 ----------------
482 .. cmdoption:: --with-hash-algorithm=[fnv|siphash13|siphash24]
486 * ``siphash13`` (default);
493 ``siphash13`` is added and it is the new default.
495 .. cmdoption:: --with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2
497 Built-in hash modules:
508 .. cmdoption:: --with-ssl-default-suites=[python|openssl|STRING]
510 Override the OpenSSL default cipher suites string:
512 * ``python`` (default): use Python's preferred selection;
526 -------------
530 .. cmdoption:: --enable-universalsdk
531 .. cmdoption:: --enable-universalsdk=SDKDIR
533 Create a universal binary build. *SDKDIR* specifies which macOS SDK should
534 be used to perform the build (default is no).
536 .. cmdoption:: --enable-framework
537 .. cmdoption:: --enable-framework=INSTALLDIR
540 *INSTALLDIR* specifies the installation path (default is no).
542 .. cmdoption:: --with-universal-archs=ARCH
545 only valid when :option:`--enable-universalsdk` is set.
550 * ``32-bit``;
551 * ``64-bit``;
552 * ``3-way``;
554 * ``intel-32``;
555 * ``intel-64``;
558 .. cmdoption:: --with-framework-name=FRAMEWORK
561 :option:`--enable-framework` is set (default: ``Python``).
565 -----------------------
567 Cross compiling, also known as cross building, can be used to build Python
569 interpreter for the build platform. The version of the build Python must match
572 .. cmdoption:: --build=BUILD
574 configure for building on BUILD, usually guessed by :program:`config.guess`.
576 .. cmdoption:: --host=HOST
578 cross-compile to build programs to run on HOST (target platform)
580 .. cmdoption:: --with-build-python=path/to/python
582 path to build ``python`` binary for cross compiling
592 # config.site-aarch64
600 CONFIG_SITE=config.site-aarch64 ../configure \
601 --build=x86_64-pc-linux-gnu \
602 --host=aarch64-unknown-linux-gnu \
603 --with-build-python=../x86_64/python
606 Python Build System
609 Main files of the build system
610 ------------------------------
619 Main build steps
620 ----------------
627 and ``python setup.py build``.
630 ---------------------
632 * ``make``: Build Python with the standard library.
633 * ``make platform:``: build the ``python`` program, but don't build the
635 * ``make profile-opt``: build Python using Profile Guided Optimization (PGO).
636 You can use the configure :option:`--enable-optimizations` option to make
637 this the default target of the ``make`` command (``make all`` or just
639 * ``make buildbottest``: Build Python and run the Python test suite, the same
641 to change the test timeout (1200 by default: 20 minutes).
642 * ``make install``: Build and install Python.
643 * ``make regen-all``: Regenerate (almost) all generated files;
644 ``make regen-stdlib-module-names`` and ``autoconf`` must be run separately
651 ------------
653 Some C extensions are built as built-in modules, like the ``sys`` module.
655 Built-in modules have no ``__file__`` attribute::
659 <module 'sys' (built-in)>
667 Example on Linux x86-64::
671 …<module '_asyncio' from '/usr/lib64/python3.9/lib-dynload/_asyncio.cpython-39-x86_64-linux-gnu.so'>
673 '/usr/lib64/python3.9/lib-dynload/_asyncio.cpython-39-x86_64-linux-gnu.so'
675 :file:`Modules/Setup` is used to generate Makefile targets to build C extensions.
676 At the beginning of the files, C extensions are built as built-in modules.
701 ------------------
711 (Objective) C/C++ preprocessor flags, e.g. ``-I<include dir>`` if you have
715 value for setup.py to be able to build extension modules using the
726 Default: ``$(BASECPPFLAGS) -I. -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) $(CPPFLAGS)``.
731 --------------
737 Example: ``gcc -pthread``.
741 C compiler command used to build the ``main()`` function of programs like
744 Variable set by the :option:`--with-cxx-main` option of the configure
747 Default: ``$(CC)``.
753 Used if the :option:`--with-cxx-main` option is used.
755 Example: ``g++ -pthread``.
769 * the compiler flag ``-I`` (for setting the search path for include files).
770 The ``-I`` flags are processed from left to right, and any flags in
771 :envvar:`CFLAGS` would take precedence over user- and package-supplied ``-I``
774 * hardening flags such as ``-Werror`` because distributions cannot control
808 Strict or non-strict aliasing flags used to compile ``Python/dtoa.c``.
814 Compiler flags used to build a shared library.
816 For example, ``-fPIC`` is used on Linux and on BSD.
822 Default: ``$(CCSHARED)`` when :option:`--enable-shared` is used, or an empty
827 Default: ``$(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)``.
831 Default: ``$(CONFIGURE_CFLAGS_NODIST) $(CFLAGS_NODIST) -I$(srcdir)/Include/internal``.
839 Default: ``$(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) $(CFLAGSFORSHARED)``.
845 Default: ``$(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE``.
851 Compiler flags to build a standard library extension module as a built-in
854 Default: ``$(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN``.
862 Default: empty string (not used).
866 ------------
870 Linker command used to build programs like ``python`` and ``_testembed``.
872 Default: ``$(PURIFY) $(MAINCC)``.
880 pre-set values.
892 * the compiler flag ``-L`` (for setting the search path for libraries).
893 The ``-L`` flags are processed from left to right, and any flags in
894 :envvar:`LDFLAGS` would take precedence over user- and package-supplied ``-L``
906 Linker flags, e.g. ``-L<lib dir>`` if you have libraries in a nonstandard
910 value for setup.py to be able to build extension modules using the
918 Example: ``-lrt``.
922 Command to build a shared library.
924 Default: ``@LDSHARED@ $(PY_LDFLAGS)``.
928 Command to build ``libpython`` shared library.
930 Default: ``@BLDSHARED@ $(PY_CORE_LDFLAGS)``.
934 Default: ``$(CONFIGURE_LDFLAGS) $(LDFLAGS)``.
938 Default: ``$(CONFIGURE_LDFLAGS_NODIST) $(LDFLAGS_NODIST)``.