3. Configure Python

3.1. Configure Options

List all ./configure script options using:

./configure --help

See also the Misc/SpecialBuilds.txt in the Python source distribution.

3.1.1. General Options

--enable-loadable-sqlite-extensions

Support loadable extensions in the _sqlite extension module (default is no).

See the sqlite3.Connection.enable_load_extension() method of the sqlite3 module.

New in version 3.6.

--disable-ipv6

Disable IPv6 support (enabled by default if supported), see the socket module.

--enable-big-digits=[15|30]

Define the size in bits of Python int digits: 15 or 30 bits.

By default, the number of bits is selected depending on sizeof(void*): 30 bits if void* size is 64-bit or larger, 15 bits otherwise.

Define the PYLONG_BITS_IN_DIGIT to 15 or 30.

See sys.int_info.bits_per_digit.

--with-cxx-main
--with-cxx-main=COMPILER

Compile the Python main() function and link Python executable with C++ compiler: $CXX, or COMPILER if specified.

--with-suffix=SUFFIX

Set the Python executable suffix to SUFFIX.

The default suffix is .exe on Windows and macOS (python.exe executable), and an empty string on other platforms (python executable).

--with-tzpath=<list of absolute paths separated by pathsep>

Select the default time zone search path for zoneinfo.TZPATH. See the Compile-time configuration of the zoneinfo module.

Default: /usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo.

See os.pathsep path separator.

New in version 3.9.

--without-decimal-contextvar

Build the _decimal extension module using a thread-local context rather than a coroutine-local context (default), see the decimal module.

See decimal.HAVE_CONTEXTVAR and the contextvars module.

New in version 3.9.

--with-dbmliborder=db1:db2:...

Override order to check db backends for the dbm module

A valid value is a colon (:) separated string with the backend names:

  • ndbm;

  • gdbm;

  • bdb.

--without-c-locale-coercion

Disable C locale coercion to a UTF-8 based locale (enabled by default).

Don’t define the PY_COERCE_C_LOCALE macro.

See PYTHONCOERCECLOCALE and the PEP 538.

--with-platlibdir=DIRNAME

Python library directory name (default is lib).

Fedora and SuSE use lib64 on 64-bit platforms.

See sys.platlibdir.

New in version 3.9.

--with-wheel-pkg-dir=PATH

Directory of wheel packages used by the ensurepip module (none by default).