3. Python ਦੀ ਸੰਰਚਨਾ

3.1. Configure ਵਿਕਲਪ

List all ./configure script options using:

./configure --help

Python source distribution ਵਿੱਚ ਮੌਜੂਦ Misc/SpecialBuilds.txt ਵੀ ਵੇਖੋ।

3.1.1. ਆਮ ਵਿਕਲਪ

--enable-loadable-sqlite-extensions

sqlite3 ਮੋਡੀਊਲ ਦੇ _sqlite extension module ਵਿੱਚ load ਹੋਣ ਵਾਲੀਆਂ extensions ਲਈ ਸਮਰਥਨ (ਮੂਲ ਰੂਪ ਵਿੱਚ ਨਹੀਂ)।

sqlite3 ਮੋਡੀਊਲ ਦੀ sqlite3.Connection.enable_load_extension() ਵਿਧੀ ਵੇਖੋ।

New in version 3.6.

--disable-ipv6

IPv6 ਸਮਰਥਨ ਨੂੰ ਅਸਮਰੱਥ ਕਰੋ (ਜੇ ਸਮਰਥਿਤ ਹੋਵੇ ਤਾਂ ਮੂਲ ਰੂਪ ਵਿੱਚ ਸਮਰੱਥ ਹੁੰਦਾ ਹੈ)। ਵੇਰਵਿਆਂ ਲਈ socket ਮੋਡੀਊਲ ਵੇਖੋ।

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

Python int ਅੰਕਾਂ ਦਾ ਆਕਾਰ bits ਵਿੱਚ ਨਿਰਧਾਰਤ ਕਰੋ: 15 ਜਾਂ 30 bits।

ਮੂਲ ਰੂਪ ਵਿੱਚ ਅੰਕਾਂ ਦਾ ਆਕਾਰ 30 ਹੁੰਦਾ ਹੈ।

PYLONG_BITS_IN_DIGIT ਨੂੰ 15 ਜਾਂ 30 ਵਜੋਂ ਪਰਿਭਾਸ਼ਿਤ ਕਰੋ।

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

Python executable ਲਈ SUFFIX suffix ਸੈੱਟ ਕਰੋ।

Windows ਅਤੇ macOS ਉੱਤੇ ਮੂਲ suffix .exe ਹੈ (python.exe executable), Emscripten node ਉੱਤੇ .js, Emscripten browser ਉੱਤੇ .html, WASI ਉੱਤੇ .wasm ਅਤੇ ਹੋਰ platforms ਉੱਤੇ ਖਾਲੀ string (python executable) ਹੁੰਦੀ ਹੈ।

Changed in version 3.11: WASM platform ਉੱਤੇ ਮੂਲ suffix .js, .html ਜਾਂ .wasm ਵਿੱਚੋਂ ਇੱਕ ਹੁੰਦਾ ਹੈ।

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

zoneinfo.TZPATH ਲਈ ਮੂਲ time zone ਖੋਜ ਮਾਰਗ ਚੁਣੋ। ਵੇਰਵਿਆਂ ਲਈ zoneinfo ਮੋਡੀਊਲ ਦੀ Compile-time configuration ਵੇਖੋ।

ਮੂਲ ਮੁੱਲ: /usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo।

os.pathsep path separator ਵੇਖੋ।

New in version 3.9.

--without-decimal-contextvar

_decimal extension module ਨੂੰ coroutine-local context (ਮੂਲ ਰੂਪ) ਦੀ ਬਜਾਏ thread-local context ਨਾਲ ਬਿਲਡ ਕਰੋ। ਵੇਰਵਿਆਂ ਲਈ decimal ਮੋਡੀਊਲ ਵੇਖੋ।

decimal.HAVE_CONTEXTVAR ਅਤੇ contextvars ਮੋਡੀਊਲ ਵੇਖੋ।

New in version 3.9.

--with-dbmliborder=<list of backend names>

dbm ਮੋਡੀਊਲ ਲਈ db backends ਦੀ ਜਾਂਚ ਕਰਨ ਦਾ ਕ੍ਰਮ override ਕਰੋ।

ਵੈਧ ਮੁੱਲ colon (:) ਨਾਲ ਵੱਖ ਕੀਤੀ ਗਈ backend names ਦੀ string ਹੈ:

  • ndbm;

  • gdbm;

  • bdb.

--without-c-locale-coercion

C locale ਨੂੰ UTF-8 ਆਧਾਰਿਤ locale ਵਿੱਚ coercion ਕਰਨ ਦੀ ਵਿਵਸਥਾ ਅਸਮਰੱਥ ਕਰੋ (ਮੂਲ ਰੂਪ ਵਿੱਚ ਸਮਰੱਥ ਹੁੰਦੀ ਹੈ)।

PY_COERCE_C_LOCALE macro ਨੂੰ ਪਰਿਭਾਸ਼ਿਤ ਨਾ ਕਰੋ।

PYTHONCOERCECLOCALE ਅਤੇ PEP 538 ਵੇਖੋ।

--with-platlibdir=DIRNAME

Python library directory ਦਾ ਨਾਮ (ਮੂਲ ਰੂਪ ਵਿੱਚ lib)।

Fedora ਅਤੇ SuSE 64-bit platforms ਉੱਤੇ lib64 ਵਰਤਦੇ ਹਨ।

sys.platlibdir ਵੇਖੋ।

New in version 3.9.

--with-wheel-pkg-dir=PATH

ensurepip ਮੋਡੀਊਲ ਦੁਆਰਾ ਵਰਤੇ ਜਾਣ ਵਾਲੇ wheel packages ਦੀ ਡਾਇਰੈਕਟਰੀ (ਮੂਲ ਰੂਪ ਵਿੱਚ ਕੋਈ ਨਹੀਂ)।

ਕੁਝ Linux distributions ਦੀਆਂ packaging policies dependencies ਨੂੰ bundle ਕਰਨ ਦੇ ਵਿਰੁੱਧ ਸਿਫ਼ਾਰਸ਼ ਕਰਦੀਆਂ ਹਨ। ਉਦਾਹਰਨ ਲਈ, Fedora wheel packages ਨੂੰ /usr/share/python-wheels/ ਡਾਇਰੈਕਟਰੀ ਵਿੱਚ ਸਥਾਪਿਤ ਕਰਦਾ ਹੈ ਅਤੇ ensurepip._bundled package ਨੂੰ ਸਥਾਪਿਤ ਨਹੀਂ ਕਰਦਾ।

New in version 3.10.

--with-pkg-config=[check|yes|no]

ਕੀ configure ਨੂੰ build dependencies ਦੀ ਪਛਾਣ ਕਰਨ ਲਈ pkg-config ਦੀ ਵਰਤੋਂ ਕਰਨੀ ਚਾਹੀਦੀ ਹੈ।

  • check (ਮੂਲ): pkg-config ਵਿਕਲਪਿਕ ਹੈ

  • yes: pkg-config ਲਾਜ਼ਮੀ ਹੈ

  • no: configure pkg-config ਮੌਜੂਦ ਹੋਣ ਦੇ ਬਾਵਜੂਦ ਇਸਦੀ ਵਰਤੋਂ ਨਹੀਂ ਕਰਦਾ

New in version 3.11.

--enable-pystats

Turn on internal statistics gathering.

The statistics will be dumped to a arbitrary (probably unique) file in /tmp/py_stats/, or C:\temp\py_stats\ on Windows.

ਅੰਕੜੇ ਪੜ੍ਹਨ ਲਈ Tools/scripts/summarize_stats.py ਵਰਤੋ।

New in version 3.11.

3.1.2. WebAssembly ਦੇ ਵਿਕਲਪ

--with-emscripten-target=[browser|node]

Set build flavor for wasm32-emscripten.

  • browser (default): preload minimal stdlib, default MEMFS.

  • node: NODERAWFS and pthread support.

New in version 3.11.

--enable-wasm-dynamic-linking

WASM ਲਈ dynamic linking ਸਮਰਥਨ ਸਮਰੱਥ ਕਰੋ।

Dynamic linking, dlopen ਨੂੰ ਸਮਰੱਥ ਬਣਾਉਂਦੀ ਹੈ। ਸੀਮਿਤ dead code elimination ਅਤੇ ਵਾਧੂ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਕਾਰਨ executable ਦੀ ਫ਼ਾਈਲ ਆਕਾਰ ਵੱਧ ਜਾਂਦੀ ਹੈ।

New in version 3.11.

--enable-wasm-pthreads

WASM ਲਈ pthreads ਸਮਰਥਨ ਸਮਰੱਥ ਕਰੋ।

New in version 3.11.

3.1.3. ਇੰਸਟਾਲੇਸ਼ਨ ਦੇ ਵਿਕਲਪ

--prefix=PREFIX

ਆਰਕੀਟੈਕਚਰ-ਤੋਂ-ਸੁਤੰਤਰ ਫ਼ਾਈਲਾਂ ਨੂੰ PREFIX ਵਿੱਚ ਇੰਸਟਾਲ ਕਰੋ। Unix 'ਤੇ ਮੂਲ ਰੂਪ ਵਿੱਚ ਇਹ /usr/local ਹੁੰਦਾ ਹੈ।

ਇਹ ਮੁੱਲ ਰਨਟਾਈਮ ਦੌਰਾਨ sys.prefix ਦੀ ਵਰਤੋਂ ਕਰਕੇ ਪ੍ਰਾਪਤ ਕੀਤਾ ਜਾ ਸਕਦਾ ਹੈ।

ਉਦਾਹਰਨ ਵਜੋਂ, --prefix="$HOME/.local/" ਦੀ ਵਰਤੋਂ ਕਰਕੇ Python ਨੂੰ ਆਪਣੇ home directory ਵਿੱਚ ਇੰਸਟਾਲ ਕੀਤਾ ਜਾ ਸਕਦਾ ਹੈ।

--exec-prefix=EPREFIX

ਆਰਕੀਟੈਕਚਰ-ਨਿਰਭਰ ਫ਼ਾਈਲਾਂ ਨੂੰ EPREFIX ਵਿੱਚ ਇੰਸਟਾਲ ਕਰੋ; ਮੂਲ ਰੂਪ ਵਿੱਚ ਇਹ --prefix ਦੇ ਬਰਾਬਰ ਹੁੰਦਾ ਹੈ।

ਇਹ ਮੁੱਲ ਰਨਟਾਈਮ ਦੌਰਾਨ sys.exec_prefix ਦੀ ਵਰਤੋਂ ਕਰਕੇ ਪ੍ਰਾਪਤ ਕੀਤਾ ਜਾ ਸਕਦਾ ਹੈ।

--disable-test-modules

ਟੈਸਟ ਮੋਡੀਊਲ ਜਿਵੇਂ test package ਜਾਂ _testcapi extension module ਨਾ ਬਣਾਓ ਅਤੇ ਨਾ ਹੀ ਇੰਸਟਾਲ ਕਰੋ (ਮੂਲ ਰੂਪ ਵਿੱਚ ਇਹ ਬਣਾਏ ਅਤੇ ਇੰਸਟਾਲ ਕੀਤੇ ਜਾਂਦੇ ਹਨ)।

New in version 3.10.

--with-ensurepip=[upgrade|install|no]

Python ਇੰਸਟਾਲੇਸ਼ਨ ਦੌਰਾਨ ਚਲਾਈ ਜਾਣ ਵਾਲੀ ensurepip ਕਮਾਂਡ ਚੁਣੋ:

  • upgrade (ਮੂਲ): python -m ensurepip --altinstall --upgrade ਕਮਾਂਡ ਚਲਾਓ।

  • install: python -m ensurepip --altinstall ਕਮਾਂਡ ਚਲਾਓ;

  • no: ensurepip ਨਾ ਚਲਾਓ;

New in version 3.6.

3.1.4. ਕਾਰਗੁਜ਼ਾਰੀ ਦੇ ਵਿਕਲਪ

Configuring Python using --enable-optimizations --with-lto (PGO + LTO) is recommended for best performance.

--enable-optimizations

PROFILE_TASK ਦੀ ਵਰਤੋਂ ਕਰਕੇ Profile Guided Optimization (PGO) ਸਮਰੱਥ ਕਰੋ (ਮੂਲ ਰੂਪ ਵਿੱਚ ਅਸਮਰੱਥ)।

PGO ਲਈ Clang C compiler ਨੂੰ llvm-profdata ਪ੍ਰੋਗਰਾਮ ਦੀ ਲੋੜ ਹੁੰਦੀ ਹੈ। macOS 'ਤੇ GCC ਨੂੰ ਵੀ ਇਸਦੀ ਲੋੜ ਹੁੰਦੀ ਹੈ, ਕਿਉਂਕਿ macOS 'ਤੇ GCC ਅਸਲ ਵਿੱਚ Clang ਦਾ ਹੀ alias ਹੈ।

ਜੇ --enable-shared ਅਤੇ GCC ਵਰਤੇ ਜਾ ਰਹੇ ਹੋਣ, ਤਾਂ libpython ਵਿੱਚ semantic interposition ਵੀ ਅਸਮਰੱਥ ਕਰੋ: compiler ਅਤੇ linker flags ਵਿੱਚ -fno-semantic-interposition ਸ਼ਾਮਲ ਕਰੋ।

New in version 3.6.

Changed in version 3.10: GCC ਨਾਲ -fno-semantic-interposition ਵਰਤੋ।

PROFILE_TASK

Makefile ਵਿੱਚ ਵਰਤੀ ਜਾਣ ਵਾਲੀ environment variable: PGO generation task ਲਈ Python command line arguments।

ਮੂਲ: -m test --pgo --timeout=$(TESTTIMEOUT)।

New in version 3.8.

--with-lto=[full|thin|no|yes]

ਕਿਸੇ ਵੀ build ਵਿੱਚ Link Time Optimization (LTO) ਸਮਰੱਥ ਕਰੋ (ਮੂਲ ਰੂਪ ਵਿੱਚ ਅਸਮਰੱਥ)।

Clang C compiler ਨੂੰ LTO ਲਈ llvm-ar (macOS 'ਤੇ ar) ਅਤੇ LTO-ਸਮਰੱਥ linker (ld.gold ਜਾਂ lld) ਦੀ ਲੋੜ ਹੁੰਦੀ ਹੈ।

New in version 3.6.

New in version 3.11: ThinLTO ਵਿਸ਼ੇਸ਼ਤਾ ਵਰਤਣ ਲਈ Clang ਨਾਲ --with-lto=thin ਵਰਤੋ।

--with-computed-gotos

Evaluation loop ਵਿੱਚ computed gotos ਸਮਰੱਥ ਕਰੋ (ਸਮਰਥਿਤ compilers 'ਤੇ ਮੂਲ ਰੂਪ ਵਿੱਚ ਸਮਰੱਥ)।

--without-pymalloc

ਵਿਸ਼ੇਸ਼ Python memory allocator pymalloc ਨੂੰ ਅਸਮਰੱਥ ਕਰੋ (ਮੂਲ ਰੂਪ ਵਿੱਚ ਸਮਰੱਥ)।

PYTHONMALLOC environment variable ਵੀ ਵੇਖੋ।

--without-doc-strings

ਮੈਮੋਰੀ ਦੀ ਵਰਤੋਂ ਘਟਾਉਣ ਲਈ static documentation strings ਨੂੰ ਅਸਮਰੱਥ ਕਰੋ (ਮੂਲ ਰੂਪ ਵਿੱਚ ਸਮਰੱਥ)। Python ਵਿੱਚ ਪਰਿਭਾਸ਼ਿਤ documentation strings ਇਸ ਨਾਲ ਪ੍ਰਭਾਵਿਤ ਨਹੀਂ ਹੁੰਦੀਆਂ।

WITH_DOC_STRINGS macro ਨੂੰ ਪਰਿਭਾਸ਼ਿਤ ਨਾ ਕਰੋ।

PyDoc_STRVAR() macro ਵੇਖੋ।

--enable-profiling

gprof ਨਾਲ C-ਪੱਧਰੀ code profiling ਸਮਰੱਥ ਕਰੋ (ਮੂਲ ਰੂਪ ਵਿੱਚ ਅਸਮਰੱਥ)।

3.1.5. Python Debug Build

Debug build ਉਹ Python build ਹੈ ਜੋ --with-pydebug configure ਵਿਕਲਪ ਨਾਲ ਬਣਾਈ ਗਈ ਹੋਵੇ।

Debug build ਦੇ ਪ੍ਰਭਾਵ:

  • ਮੂਲ ਰੂਪ ਵਿੱਚ ਸਾਰੀਆਂ warnings ਦਿਖਾਓ: warnings ਮੋਡੀਊਲ ਵਿੱਚ ਮੂਲ warning filters ਦੀ ਸੂਚੀ ਖਾਲੀ ਹੁੰਦੀ ਹੈ।

  • sys.abiflags ਵਿੱਚ d ਜੋੜੋ।

  • sys.gettotalrefcount() function ਜੋੜੋ।

  • -X showrefcount command line ਵਿਕਲਪ ਜੋੜੋ।

  • Add PYTHONTHREADDEBUG environment variable.

  • __lltrace__ variable ਲਈ ਸਮਰਥਨ ਜੋੜੋ: ਜੇ ਇਹ variable ਪਰਿਭਾਸ਼ਿਤ ਹੋਵੇ, ਤਾਂ bytecode evaluation loop ਵਿੱਚ low-level tracing ਸਮਰੱਥ ਕਰੋ।

  • Buffer overflow ਅਤੇ ਹੋਰ memory errors ਦੀ ਪਛਾਣ ਕਰਨ ਲਈ memory allocators ਉੱਤੇ debug hooks ਇੰਸਟਾਲ ਕਰੋ।

  • Py_DEBUG ਅਤੇ Py_REF_DEBUG macros ਪਰਿਭਾਸ਼ਿਤ ਕਰੋ।

  • Runtime checks ਜੋੜੋ: #ifdef Py_DEBUG ਅਤੇ #endif ਨਾਲ ਘਿਰਿਆ code। assert(...) ਅਤੇ _PyObject_ASSERT(...) assertions ਨੂੰ ਸਮਰੱਥ ਕਰੋ: NDEBUG macro ਸੈੱਟ ਨਾ ਕਰੋ (--with-assertions configure ਵਿਕਲਪ ਵੀ ਵੇਖੋ)। ਮੁੱਖ runtime checks:

    • Function arguments ਉੱਤੇ sanity checks ਜੋੜੋ।

    • Unicode ਅਤੇ int objects ਬਣਾਉਂਦੇ ਸਮੇਂ ਉਨ੍ਹਾਂ ਦੀ memory ਨੂੰ ਇੱਕ pattern ਨਾਲ ਭਰਿਆ ਜਾਂਦਾ ਹੈ ਤਾਂ ਜੋ uninitialized objects ਦੀ ਵਰਤੋਂ ਦਾ ਪਤਾ ਲੱਗ ਸਕੇ।

    • ਯਕੀਨੀ ਬਣਾਓ ਕਿ ਉਹ functions ਜੋ ਮੌਜੂਦਾ exception ਨੂੰ ਸਾਫ਼ ਜਾਂ ਬਦਲ ਸਕਦੀਆਂ ਹਨ, ਕਿਸੇ exception ਦੇ ਉੱਠੇ ਹੋਏ ਹੋਣ ਦੀ ਸਥਿਤੀ ਵਿੱਚ ਨਾ ਬੁਲਾਈਆਂ ਜਾਣ।

    • ਜਾਂਚੋ ਕਿ deallocator functions ਮੌਜੂਦਾ exception ਨੂੰ ਨਹੀਂ ਬਦਲਦੀਆਂ।

    • Garbage collector (gc.collect() function) objects ਦੀ ਇਕਸਾਰਤਾ ਉੱਤੇ ਕੁਝ ਬੁਨਿਆਦੀ ਜਾਂਚਾਂ ਕਰਦਾ ਹੈ।

    • Py_SAFE_DOWNCAST() macro, ਵੱਡੀਆਂ ਕਿਸਮਾਂ ਤੋਂ ਛੋਟੀਆਂ ਕਿਸਮਾਂ ਵਿੱਚ downcast ਕਰਦੇ ਸਮੇਂ integer underflow ਅਤੇ overflow ਦੀ ਜਾਂਚ ਕਰਦੀ ਹੈ।

Python Development Mode ਅਤੇ --with-trace-refs configure ਵਿਕਲਪ ਵੀ ਵੇਖੋ।

Changed in version 3.8: Release builds and debug builds are now ABI compatible: defining the Py_DEBUG macro no longer implies the Py_TRACE_REFS macro (see the --with-trace-refs option), which introduces the only ABI incompatibility.

3.1.6. Debug ਵਿਕਲਪ

--with-pydebug

Python ਨੂੰ debug mode ਵਿੱਚ ਬਣਾਓ: Py_DEBUG macro ਪਰਿਭਾਸ਼ਿਤ ਕਰੋ (ਮੂਲ ਰੂਪ ਵਿੱਚ ਅਸਮਰੱਥ)।

--with-trace-refs

Debugging ਦੇ ਉਦੇਸ਼ ਲਈ tracing references ਸਮਰੱਥ ਕਰੋ (ਮੂਲ ਰੂਪ ਵਿੱਚ ਅਸਮਰੱਥ)।

ਅਸਰ:

  • Py_TRACE_REFS macro ਪਰਿਭਾਸ਼ਿਤ ਕਰੋ।

  • Add sys.getobjects() function.

  • PYTHONDUMPREFS environment variable ਜੋੜੋ।

This build is not ABI compatible with release build (default build) or debug build (Py_DEBUG and Py_REF_DEBUG macros).

New in version 3.8.

--with-assertions

C assertions ਸਮਰੱਥ ਕਰਕੇ build ਕਰੋ (ਮੂਲ ਰੂਪ ਵਿੱਚ ਨਹੀਂ): assert(...); ਅਤੇ _PyObject_ASSERT(...);।

ਜੇ ਇਹ ਸੈੱਟ ਕੀਤਾ ਗਿਆ ਹੋਵੇ, ਤਾਂ NDEBUG macro ਨੂੰ OPT compiler variable ਵਿੱਚ ਪਰਿਭਾਸ਼ਿਤ ਨਹੀਂ ਕੀਤਾ ਜਾਂਦਾ।

--with-pydebug ਵਿਕਲਪ (debug build) ਵੀ ਵੇਖੋ, ਜੋ assertions ਨੂੰ ਵੀ ਸਮਰੱਥ ਕਰਦਾ ਹੈ।

New in version 3.6.

--with-valgrind

Valgrind ਸਮਰਥਨ ਸਮਰੱਥ ਕਰੋ (ਮੂਲ ਰੂਪ ਵਿੱਚ ਨਹੀਂ)।

--with-dtrace

DTrace ਸਮਰਥਨ ਸਮਰੱਥ ਕਰੋ (ਮੂਲ ਰੂਪ ਵਿੱਚ ਨਹੀਂ)।

Instrumenting CPython with DTrace and SystemTap ਵੇਖੋ।

New in version 3.6.

--with-address-sanitizer

Enable AddressSanitizer memory error detector, asan (default is no).

New in version 3.6.

--with-memory-sanitizer

MemorySanitizer allocation error detector, msan, ਨੂੰ ਸਮਰੱਥ ਕਰੋ (ਮੂਲ ਰੂਪ ਵਿੱਚ ਨਹੀਂ)।

New in version 3.6.

--with-undefined-behavior-sanitizer

UndefinedBehaviorSanitizer undefined behaviour detector, ubsan, ਨੂੰ ਸਮਰੱਥ ਕਰੋ (ਮੂਲ ਰੂਪ ਵਿੱਚ ਨਹੀਂ)।

New in version 3.6.

3.1.7. Linker ਦੇ ਵਿਕਲਪ

--enable-shared

Shared Python library libpython ਬਣਾਉਣ ਨੂੰ ਸਮਰੱਥ ਕਰੋ (ਮੂਲ ਰੂਪ ਵਿੱਚ ਨਹੀਂ)।

--without-static-libpython

libpythonMAJOR.MINOR.a ਨਾ ਬਣਾਓ ਅਤੇ python.o ਇੰਸਟਾਲ ਨਾ ਕਰੋ (ਮੂਲ ਰੂਪ ਵਿੱਚ ਬਣਾਇਆ ਅਤੇ ਸਮਰੱਥ ਕੀਤਾ ਜਾਂਦਾ ਹੈ)।

New in version 3.10.

3.1.8. Libraries ਦੇ ਵਿਕਲਪ

--with-libs='lib1 ...'

ਵਾਧੂ libraries ਨਾਲ link ਕਰੋ (ਮੂਲ ਰੂਪ ਵਿੱਚ ਨਹੀਂ)।

--with-system-expat

ਇੰਸਟਾਲ ਕੀਤੀ ਹੋਈ expat library ਦੀ ਵਰਤੋਂ ਕਰਕੇ pyexpat ਮੋਡੀਊਲ ਬਣਾਓ (ਮੂਲ ਰੂਪ ਵਿੱਚ ਨਹੀਂ)।

--with-system-ffi

Build the _ctypes extension module using an installed ffi library, see the ctypes module (default is system-dependent).

--with-system-libmpdec

Build the _decimal extension module using an installed mpdec library, see the decimal module (default is no).

New in version 3.3.

--with-readline=editline

Use editline library for backend of the readline module.

Define the WITH_EDITLINE macro.

New in version 3.10.

--without-readline

readline ਮੋਡੀਊਲ ਨਾ ਬਣਾਓ (ਮੂਲ ਰੂਪ ਵਿੱਚ ਬਣਾਇਆ ਜਾਂਦਾ ਹੈ)।

HAVE_LIBREADLINE macro ਨੂੰ ਪਰਿਭਾਸ਼ਿਤ ਨਾ ਕਰੋ।

New in version 3.10.

--with-libm=STRING

libm ਗਣਿਤ library ਨੂੰ STRING ਨਾਲ override ਕਰੋ (ਮੂਲ ਰੂਪ ਵਿੱਚ ਇਹ ਸਿਸਟਮ-ਨਿਰਭਰ ਹੁੰਦੀ ਹੈ)।

--with-libc=STRING

libc C library ਨੂੰ STRING ਨਾਲ override ਕਰੋ (ਮੂਲ ਰੂਪ ਵਿੱਚ ਇਹ ਸਿਸਟਮ-ਨਿਰਭਰ ਹੁੰਦੀ ਹੈ)।

--with-openssl=DIR

OpenSSL directory ਦਾ root।

New in version 3.7.

--with-openssl-rpath=[no|auto|DIR]

OpenSSL libraries ਲਈ runtime library directory (rpath) ਸੈੱਟ ਕਰੋ:

  • no (ਮੂਲ): rpath ਸੈੱਟ ਨਾ ਕਰੋ।

  • auto: --with-openssl ਅਤੇ pkg-config ਤੋਂ rpath ਆਪਣੇ ਆਪ ਪਤਾ ਲਗਾਓ।

  • DIR: ਇੱਕ ਸਪਸ਼ਟ rpath ਸੈੱਟ ਕਰੋ।

New in version 3.10.

3.1.9. ਸੁਰੱਖਿਆ ਵਿਕਲਪ

--with-hash-algorithm=[fnv|siphash13|siphash24]

Python/pyhash.c ਵਿੱਚ ਵਰਤੋਂ ਲਈ hash algorithm ਚੁਣੋ:

  • siphash13 (ਮੂਲ);

  • siphash24;

  • fnv.

New in version 3.4.

New in version 3.11: siphash13 ਸ਼ਾਮਲ ਕੀਤਾ ਗਿਆ ਹੈ ਅਤੇ ਹੁਣ ਇਹ ਮੂਲ algorithm ਹੈ।

--with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2

ਅੰਦਰੂਨੀ hash modules:

  • md5;

  • sha1;

  • sha256;

  • sha512;

  • sha3 (shake ਸਮੇਤ);

  • blake2

New in version 3.9.

--with-ssl-default-suites=[python|openssl|STRING]

OpenSSL ਦੀ ਮੂਲ cipher suites string ਨੂੰ override ਕਰੋ:

  • python (ਮੂਲ): Python ਦੀ ਪਸੰਦੀਦਾ ਚੋਣ ਵਰਤੋ।

  • openssl: OpenSSL ਦੀਆਂ ਮੂਲ settings ਨੂੰ ਬਿਨਾਂ ਬਦਲੇ ਰਹਿਣ ਦਿਓ।

  • STRING: ਆਪਣੀ ਮਨਚਾਹੀ string ਵਰਤੋ।

ssl ਮੋਡੀਊਲ ਵੇਖੋ।

New in version 3.7.

Changed in version 3.10: python ਅਤੇ STRING ਦੋਵੇਂ settings TLS 1.2 ਨੂੰ ਘੱਟੋ-ਘੱਟ protocol version ਵਜੋਂ ਵੀ ਸੈੱਟ ਕਰਦੀਆਂ ਹਨ।

3.1.10. macOS ਵਿਕਲਪ

See Mac/README.rst.

--enable-universalsdk
--enable-universalsdk=SDKDIR

Universal binary build ਬਣਾਓ। SDKDIR ਦੱਸਦਾ ਹੈ ਕਿ build ਲਈ ਕਿਹੜਾ macOS SDK ਵਰਤਿਆ ਜਾਣਾ ਹੈ (ਮੂਲ ਰੂਪ ਵਿੱਚ ਨਹੀਂ)।

--enable-framework
--enable-framework=INSTALLDIR

ਰਵਾਇਤੀ Unix installation ਦੀ ਬਜਾਏ ਇੱਕ Python.framework ਬਣਾਓ। ਵਿਕਲਪੀ INSTALLDIR installation path ਨਿਰਧਾਰਤ ਕਰਦਾ ਹੈ (ਮੂਲ ਰੂਪ ਵਿੱਚ ਨਹੀਂ)।

--with-universal-archs=ARCH

ਕਿਹੜੀ ਕਿਸਮ ਦਾ universal binary ਬਣਾਇਆ ਜਾਣਾ ਹੈ, ਇਹ ਨਿਰਧਾਰਤ ਕਰੋ। ਇਹ ਵਿਕਲਪ ਕੇਵਲ ਤਦ ਹੀ ਵੈਧ ਹੈ ਜਦੋਂ --enable-universalsdk ਸੈੱਟ ਕੀਤਾ ਗਿਆ ਹੋਵੇ।

ਵਿਕਲਪ:

  • universal2;

  • 32-bit;

  • 64-bit;

  • 3-way;

  • intel;

  • intel-32;

  • intel-64;

  • all.

--with-framework-name=FRAMEWORK

ਕੇਵਲ macOS ਉੱਤੇ Python framework ਦਾ ਨਾਮ ਨਿਰਧਾਰਤ ਕਰੋ। ਇਹ ਵਿਕਲਪ ਤਦੋਂ ਹੀ ਵੈਧ ਹੈ ਜਦੋਂ --enable-framework ਸੈੱਟ ਕੀਤਾ ਗਿਆ ਹੋਵੇ (ਮੂਲ: Python)।

3.1.11. Cross Compiling ਵਿਕਲਪ

Cross compiling ਜਿਸਨੂੰ cross building ਵੀ ਕਿਹਾ ਜਾਂਦਾ ਹੈ ਦੀ ਵਰਤੋਂ ਕਿਸੇ ਹੋਰ CPU architecture ਜਾਂ platform ਲਈ Python ਬਣਾਉਣ ਵਾਸਤੇ ਕੀਤੀ ਜਾਂਦੀ ਹੈ। Cross compiling ਲਈ build platform ਉੱਤੇ ਇੱਕ Python interpreter ਦੀ ਲੋੜ ਹੁੰਦੀ ਹੈ। Build Python ਦਾ version, cross-compiled host Python ਦੇ version ਨਾਲ ਮਿਲਣਾ ਚਾਹੀਦਾ ਹੈ।

--build=BUILD

BUILD ਉੱਤੇ build ਕਰਨ ਲਈ configure ਕਰੋ; ਆਮ ਤੌਰ 'ਤੇ ਇਹ config.guess ਰਾਹੀਂ ਆਪਣੇ ਆਪ ਅਨੁਮਾਨਿਆ ਜਾਂਦਾ ਹੈ।

--host=HOST

HOST (target platform) ਉੱਤੇ ਚੱਲਣ ਵਾਲੇ ਪ੍ਰੋਗਰਾਮ ਬਣਾਉਣ ਲਈ cross-compile ਕਰੋ।

--with-build-python=path/to/python

Cross compiling ਲਈ ਵਰਤੇ ਜਾਣ ਵਾਲੇ python binary ਦਾ path।

New in version 3.11.

CONFIG_SITE=file

ਇੱਕ environment variable ਜੋ configure overrides ਵਾਲੀ file ਵੱਲ ਇਸ਼ਾਰਾ ਕਰਦਾ ਹੈ।

ਉਦਾਹਰਨ config.site file:

# config.site-aarch64
ac_cv_buggy_getaddrinfo=no
ac_cv_file__dev_ptmx=yes
ac_cv_file__dev_ptc=no

Cross compiling ਦੀ ਉਦਾਹਰਨ:

CONFIG_SITE=config.site-aarch64 ../configure \
    --build=x86_64-pc-linux-gnu \
    --host=aarch64-unknown-linux-gnu \
    --with-build-python=../x86_64/python

3.2. Python Build System

3.2.1. Build system ਦੀਆਂ ਮੁੱਖ files

  • configure.ac => configure;

  • Makefile.pre.in => Makefile (configure ਦੁਆਰਾ ਬਣਾਈ ਜਾਂਦੀ ਹੈ);

  • pyconfig.h (configure ਦੁਆਰਾ ਬਣਾਈ ਜਾਂਦੀ ਹੈ);

  • Modules/Setup: C extensions ਜਿਨ੍ਹਾਂ ਨੂੰ Makefile Module/makesetup shell script ਦੀ ਵਰਤੋਂ ਕਰਕੇ build ਕਰਦੀ ਹੈ;

  • setup.py: C extensions built using the distutils module.

3.2.2. ਮੁੱਖ ਬਿਲਡ ਕਦਮ

  • C ਫਾਈਲਾਂ (.c) ਨੂੰ ਆਬਜੈਕਟ ਫਾਈਲਾਂ (.o) ਵਜੋਂ ਬਿਲਡ ਕੀਤਾ ਜਾਂਦਾ ਹੈ।

  • ਆਬਜੈਕਟ ਫਾਈਲਾਂ ਤੋਂ ਇੱਕ ਸਥਿਰ libpython ਲਾਇਬ੍ਰੇਰੀ (.a) ਬਣਾਈ ਜਾਂਦੀ ਹੈ।

  • python.o ਅਤੇ ਸਥਿਰ libpython ਲਾਇਬ੍ਰੇਰੀ ਨੂੰ ਅੰਤਿਮ python ਪ੍ਰੋਗਰਾਮ ਵਿੱਚ ਲਿੰਕ ਕੀਤਾ ਜਾਂਦਾ ਹੈ।

  • C extensions are built by the Makefile (see Modules/Setup) and python setup.py build.

3.2.3. ਮੁੱਖ Makefile ਟਾਰਗੇਟ

  • make: Build Python with the standard library.

  • make platform:: build the python program, but don't build the standard library extension modules.

  • make profile-opt: build Python using Profile Guided Optimization (PGO). You can use the configure --enable-optimizations option to make this the default target of the make command (make all or just make).

  • make buildbottest: Build Python and run the Python test suite, the same way than buildbots test Python. Set TESTTIMEOUT variable (in seconds) to change the test timeout (1200 by default: 20 minutes).

  • make install: Build and install Python.

  • make regen-all: Regenerate (almost) all generated files; make regen-stdlib-module-names and autoconf must be run separately for the remaining generated files.

  • make clean: Remove built files.

  • make distclean: Same than make clean, but remove also files created by the configure script.

3.2.4. C ਐਕਸਟੈਂਸ਼ਨ

ਕੁਝ C ਐਕਸਟੈਂਸ਼ਨਾਂ ਨੂੰ built-in ਮੋਡੀਊਲ ਵਜੋਂ ਬਿਲਡ ਕੀਤਾ ਜਾਂਦਾ ਹੈ, ਜਿਵੇਂ ਕਿ sys ਮੋਡੀਊਲ। ਇਹਨਾਂ ਨੂੰ Py_BUILD_CORE_BUILTIN ਮੈਕਰੋ ਪਰਿਭਾਸ਼ਿਤ ਕਰਕੇ ਬਿਲਡ ਕੀਤਾ ਜਾਂਦਾ ਹੈ। Built-in ਮੋਡੀਊਲਾਂ ਵਿੱਚ __file__ ਐਟ੍ਰਿਬਿਊਟ ਨਹੀਂ ਹੁੰਦਾ:

>>> import sys
>>> sys
<module 'sys' (built-in)>
>>> sys.__file__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'sys' has no attribute '__file__'

ਹੋਰ C ਐਕਸਟੈਂਸ਼ਨਾਂ ਨੂੰ ਡਾਇਨਾਮਿਕ ਲਾਇਬ੍ਰੇਰੀਆਂ ਵਜੋਂ ਬਿਲਡ ਕੀਤਾ ਜਾਂਦਾ ਹੈ, ਜਿਵੇਂ ਕਿ _asyncio ਮੋਡੀਊਲ। ਇਹਨਾਂ ਨੂੰ Py_BUILD_CORE_MODULE ਮੈਕਰੋ ਪਰਿਭਾਸ਼ਿਤ ਕਰਕੇ ਬਿਲਡ ਕੀਤਾ ਜਾਂਦਾ ਹੈ। Linux x86-64 ਉੱਤੇ ਉਦਾਹਰਨ:

>>> import _asyncio
>>> _asyncio
<module '_asyncio' from '/usr/lib64/python3.9/lib-dynload/_asyncio.cpython-39-x86_64-linux-gnu.so'>
>>> _asyncio.__file__
'/usr/lib64/python3.9/lib-dynload/_asyncio.cpython-39-x86_64-linux-gnu.so'

Modules/Setup ਦੀ ਵਰਤੋਂ C ਐਕਸਟੈਂਸ਼ਨਾਂ ਨੂੰ ਬਿਲਡ ਕਰਨ ਲਈ Makefile ਟਾਰਗੇਟ ਬਣਾਉਣ ਵਾਸਤੇ ਕੀਤੀ ਜਾਂਦੀ ਹੈ। ਫਾਈਲ ਦੀ ਸ਼ੁਰੂਆਤ ਵਿੱਚ C ਐਕਸਟੈਂਸ਼ਨਾਂ ਨੂੰ built-in ਮੋਡੀਊਲਾਂ ਵਜੋਂ ਬਿਲਡ ਕੀਤਾ ਜਾਂਦਾ ਹੈ। *shared* ਮਾਰਕਰ ਤੋਂ ਬਾਅਦ ਪਰਿਭਾਸ਼ਿਤ ਐਕਸਟੈਂਸ਼ਨਾਂ ਨੂੰ ਡਾਇਨਾਮਿਕ ਲਾਇਬ੍ਰੇਰੀਆਂ ਵਜੋਂ ਬਿਲਡ ਕੀਤਾ ਜਾਂਦਾ ਹੈ।

The setup.py script only builds C extensions as shared libraries using the distutils module.

The PyAPI_FUNC(), PyAPI_DATA() and PyMODINIT_FUNC macros of Include/pyport.h are defined differently depending if the Py_BUILD_CORE_MODULE macro is defined:

  • ਜੇ Py_BUILD_CORE_MODULE ਪਰਿਭਾਸ਼ਿਤ ਹੈ ਤਾਂ Py_EXPORTED_SYMBOL ਵਰਤੋ

  • ਨਹੀਂ ਤਾਂ Py_IMPORTED_SYMBOL ਵਰਤੋ।

ਜੇ ਸਾਂਝੀ ਲਾਇਬ੍ਰੇਰੀ ਵਜੋਂ ਬਿਲਡ ਕੀਤੀ ਗਈ C ਐਕਸਟੈਂਸ਼ਨ 'ਤੇ ਗਲਤੀ ਨਾਲ Py_BUILD_CORE_BUILTIN ਮੈਕਰੋ ਵਰਤਿਆ ਜਾਵੇ, ਤਾਂ ਇਸਦਾ PyInit_xxx() ਫੰਕਸ਼ਨ ਐਕਸਪੋਰਟ ਨਹੀਂ ਹੁੰਦਾ, ਜਿਸ ਕਾਰਨ ਇੰਪੋਰਟ ਸਮੇਂ ImportError ਆ ਜਾਂਦੀ ਹੈ।

3.3. ਕੰਪਾਈਲਰ ਅਤੇ ਲਿੰਕਰ ਫਲੈਗ

./configure ਸਕ੍ਰਿਪਟ ਅਤੇ ਇਨਵਾਇਰਨਮੈਂਟ ਵੇਰੀਏਬਲਾਂ ਦੁਆਰਾ ਸੈੱਟ ਕੀਤੀਆਂ ਚੋਣਾਂ, ਜੋ Makefile ਦੁਆਰਾ ਵਰਤੀਆਂ ਜਾਂਦੀਆਂ ਹਨ।

3.3.1. ਪ੍ਰੀ-ਪ੍ਰੋਸੈਸਰ ਫਲੈਗ

CONFIGURE_CPPFLAGS

./configure ਸਕ੍ਰਿਪਟ ਨੂੰ ਦਿੱਤੇ ਗਏ CPPFLAGS ਵੇਰੀਏਬਲ ਦਾ ਮੁੱਲ।

New in version 3.6.

CPPFLAGS

(Objective) C/C++ ਪ੍ਰੀ-ਪ੍ਰੋਸੈਸਰ ਫਲੈਗ, ਉਦਾਹਰਨ ਲਈ -Iinclude_dir, ਜੇ ਤੁਹਾਡੀਆਂ ਹੈਡਰ ਫਾਈਲਾਂ ਕਿਸੇ ਗੈਰ-ਮਿਆਰੀ include_dir ਡਾਇਰੈਕਟਰੀ ਵਿੱਚ ਹਨ।

Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to be able to build extension modules using the directories specified in the environment variables.

BASECPPFLAGS

New in version 3.4.

PY_CPPFLAGS

ਇੰਟਰਪ੍ਰੀਟਰ ਆਬਜੈਕਟ ਫਾਈਲਾਂ ਨੂੰ ਬਿਲਡ ਕਰਨ ਲਈ ਸ਼ਾਮਲ ਕੀਤੇ ਵਾਧੂ ਪ੍ਰੀ-ਪ੍ਰੋਸੈਸਰ ਫਲੈਗ।

ਮੂਲ: $(BASECPPFLAGS) -I. -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) $(CPPFLAGS)।

New in version 3.2.

3.3.2. ਕੰਪਾਈਲਰ ਫਲੈਗ

CC

C compiler ਕਮਾਂਡ।

ਉਦਾਹਰਨ: gcc -pthread।

MAINCC

C compiler command used to build the main() function of programs like python.

Variable set by the --with-cxx-main option of the configure script.

Default: $(CC).

CXX

C++ ਕੰਪਾਈਲਰ ਕਮਾਂਡ।

Used if the --with-cxx-main option is used.

ਉਦਾਹਰਨ: g++ -pthread।

CFLAGS

C compiler flags।

CFLAGS_NODIST

CFLAGS_NODIST is used for building the interpreter and stdlib C extensions. Use it when a compiler flag should not be part of the distutils CFLAGS once Python is installed (bpo-21121).

ਖ਼ਾਸ ਤੌਰ 'ਤੇ, CFLAGS ਵਿੱਚ ਹੇਠ ਲਿਖੇ ਸ਼ਾਮਲ ਨਹੀਂ ਹੋਣੇ ਚਾਹੀਦੇ:

  • ਕੰਪਾਈਲਰ ਫਲੈਗ -I (include ਫਾਈਲਾਂ ਲਈ ਖੋਜ ਮਾਰਗ ਸੈੱਟ ਕਰਨ ਵਾਸਤੇ)। -I ਫਲੈਗ ਖੱਬੇ ਤੋਂ ਸੱਜੇ ਪ੍ਰੋਸੈਸ ਕੀਤੇ ਜਾਂਦੇ ਹਨ ਅਤੇ CFLAGS ਵਿੱਚ ਮੌਜੂਦ ਕੋਈ ਵੀ ਫਲੈਗ ਯੂਜ਼ਰ ਜਾਂ ਪੈਕੇਜ ਦੁਆਰਾ ਦਿੱਤੇ -I ਫਲੈਗਾਂ ਨਾਲੋਂ ਪਹਿਲਾਂ ਲਾਗੂ ਹੋ ਜਾਣਗੇ।

  • -Werror ਵਰਗੇ hardening ਫਲੈਗ, ਕਿਉਂਕਿ ਡਿਸਟ੍ਰਿਬਿਊਸ਼ਨ ਇਹ ਨਿਯੰਤਰਿਤ ਨਹੀਂ ਕਰ ਸਕਦੀਆਂ ਕਿ ਯੂਜ਼ਰਾਂ ਦੁਆਰਾ ਇੰਸਟਾਲ ਕੀਤੇ ਪੈਕੇਜ ਅਜਿਹੇ ਸਖ਼ਤ ਮਿਆਰਾਂ ਦੀ ਪਾਲਣਾ ਕਰਦੇ ਹਨ ਜਾਂ ਨਹੀਂ।

New in version 3.5.

EXTRA_CFLAGS

ਵਾਧੂ C ਕੰਪਾਈਲਰ ਫਲੈਗ।

CONFIGURE_CFLAGS

./configure ਸਕ੍ਰਿਪਟ ਨੂੰ ਦਿੱਤੇ ਗਏ CFLAGS ਵੇਰੀਏਬਲ ਦਾ ਮੁੱਲ।

New in version 3.2.

CONFIGURE_CFLAGS_NODIST

./configure ਸਕ੍ਰਿਪਟ ਨੂੰ ਦਿੱਤੇ ਗਏ CFLAGS_NODIST ਵੇਰੀਏਬਲ ਦਾ ਮੁੱਲ।

New in version 3.5.

BASECFLAGS

ਮੂਲ ਕੰਪਾਈਲਰ ਫਲੈਗ।

OPT

ਓਪਟੀਮਾਈਜ਼ੇਸ਼ਨ ਫਲੈਗ।

CFLAGS_ALIASING

Python/dtoa.c ਨੂੰ ਕੰਪਾਈਲ ਕਰਨ ਲਈ ਵਰਤੇ ਜਾਣ ਵਾਲੇ strict ਜਾਂ non-strict aliasing ਫਲੈਗ।

New in version 3.7.

CCSHARED

ਸਾਂਝੀ ਲਾਇਬ੍ਰੇਰੀ ਬਣਾਉਣ ਲਈ ਵਰਤੇ ਜਾਣ ਵਾਲੇ ਕੰਪਾਈਲਰ ਫਲੈਗ।

ਉਦਾਹਰਨ ਲਈ, Linux ਅਤੇ BSD ਉੱਤੇ -fPIC ਵਰਤਿਆ ਜਾਂਦਾ ਹੈ।

CFLAGSFORSHARED

ਇੰਟਰਪ੍ਰੀਟਰ ਆਬਜੈਕਟ ਫਾਈਲਾਂ ਨੂੰ ਬਿਲਡ ਕਰਨ ਲਈ ਸ਼ਾਮਲ ਕੀਤੇ ਵਾਧੂ C ਫਲੈਗ।

ਮੂਲ: ਜੇ --enable-shared ਵਰਤੀ ਗਈ ਹੈ ਤਾਂ $(CCSHARED), ਨਹੀਂ ਤਾਂ ਖਾਲੀ ਸਟਰਿੰਗ।

PY_CFLAGS

ਮੂਲ: $(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)।

PY_CFLAGS_NODIST

ਮੂਲ: $(CONFIGURE_CFLAGS_NODIST) $(CFLAGS_NODIST) -I$(srcdir)/Include/internal।

New in version 3.5.

PY_STDMODULE_CFLAGS

ਇੰਟਰਪ੍ਰੀਟਰ ਆਬਜੈਕਟ ਫਾਈਲਾਂ ਨੂੰ ਬਿਲਡ ਕਰਨ ਲਈ ਵਰਤੇ ਜਾਣ ਵਾਲੇ C ਫਲੈਗ।

ਮੂਲ: $(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) $(CFLAGSFORSHARED)।

New in version 3.7.

PY_CORE_CFLAGS

ਮੂਲ: $(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE।

New in version 3.2.

PY_BUILTIN_MODULE_CFLAGS

posix ਮੋਡੀਊਲ ਵਾਂਗ ਸਟੈਂਡਰਡ ਲਾਇਬ੍ਰੇਰੀ ਐਕਸਟੈਂਸ਼ਨ ਮੋਡੀਊਲ ਨੂੰ built-in ਮੋਡੀਊਲ ਵਜੋਂ ਬਿਲਡ ਕਰਨ ਲਈ ਕੰਪਾਈਲਰ ਫਲੈਗ।

ਮੂਲ: $(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN।

New in version 3.8.

PURIFY

Purify ਕਮਾਂਡ। Purify ਇੱਕ ਮੈਮੋਰੀ ਡੀਬੱਗਰ ਪ੍ਰੋਗਰਾਮ ਹੈ।

ਮੂਲ: ਖਾਲੀ ਸਟਰਿੰਗ (ਵਰਤੀ ਨਹੀਂ ਜਾਂਦੀ)।

3.3.3. ਲਿੰਕਰ ਫਲੈਗ

LINKCC

python ਅਤੇ _testembed ਵਰਗੇ ਪ੍ਰੋਗਰਾਮਾਂ ਨੂੰ ਬਿਲਡ ਕਰਨ ਲਈ ਵਰਤੀ ਜਾਣ ਵਾਲੀ ਲਿੰਕਰ ਕਮਾਂਡ।

Default: $(PURIFY) $(MAINCC).

CONFIGURE_LDFLAGS

./configure ਸਕ੍ਰਿਪਟ ਨੂੰ ਦਿੱਤੇ ਗਏ LDFLAGS ਵੇਰੀਏਬਲ ਦਾ ਮੁੱਲ।

CFLAGS, LDFLAGS ਆਦਿ ਨੂੰ ਸਿੱਧਾ ਮੁੱਲ ਨਾ ਦਿਓ, ਤਾਂ ਜੋ ਵਰਤੋਂਕਾਰ ਪਹਿਲਾਂ ਤੋਂ ਸੈੱਟ ਕੀਤੀਆਂ ਕੀਮਤਾਂ ਨੂੰ ਓਵਰਰਾਈਟ ਕੀਤੇ ਬਿਨਾਂ ਕਮਾਂਡ-ਲਾਈਨ ਰਾਹੀਂ ਇਨ੍ਹਾਂ ਵਿੱਚ ਆਪਣੀਆਂ ਕੀਮਤਾਂ ਜੋੜ ਸਕਣ।

New in version 3.2.

LDFLAGS_NODIST

LDFLAGS_NODIST is used in the same manner as CFLAGS_NODIST. Use it when a linker flag should not be part of the distutils LDFLAGS once Python is installed (bpo-35257).

ਖ਼ਾਸ ਤੌਰ 'ਤੇ, LDFLAGS ਵਿੱਚ ਹੇਠ ਲਿਖੇ ਸ਼ਾਮਲ ਨਹੀਂ ਹੋਣੇ ਚਾਹੀਦੇ:

  • ਕੰਪਾਈਲਰ ਫਲੈਗ -L (ਲਾਇਬ੍ਰੇਰੀਆਂ ਲਈ ਖੋਜ ਮਾਰਗ ਸੈੱਟ ਕਰਨ ਵਾਸਤੇ)। -L ਫਲੈਗ ਖੱਬੇ ਤੋਂ ਸੱਜੇ ਪ੍ਰੋਸੈਸ ਕੀਤੇ ਜਾਂਦੇ ਹਨ ਅਤੇ LDFLAGS ਵਿੱਚ ਮੌਜੂਦ ਕੋਈ ਵੀ ਫਲੈਗ ਯੂਜ਼ਰ ਜਾਂ ਪੈਕੇਜ ਦੁਆਰਾ ਦਿੱਤੇ -L ਫਲੈਗਾਂ ਨਾਲੋਂ ਪਹਿਲਾਂ ਲਾਗੂ ਹੋ ਜਾਣਗੇ।

CONFIGURE_LDFLAGS_NODIST

./configure ਸਕ੍ਰਿਪਟ ਨੂੰ ਦਿੱਤੇ ਗਏ LDFLAGS_NODIST ਵੇਰੀਏਬਲ ਦਾ ਮੁੱਲ।

New in version 3.8.

LDFLAGS

ਲਿੰਕਰ ਫਲੈਗ, ਉਦਾਹਰਨ ਲਈ -Llib_dir, ਜੇ ਤੁਹਾਡੀਆਂ ਲਾਇਬ੍ਰੇਰੀਆਂ ਕਿਸੇ ਗੈਰ-ਮਿਆਰੀ lib_dir ਡਾਇਰੈਕਟਰੀ ਵਿੱਚ ਹਨ।

Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to be able to build extension modules using the directories specified in the environment variables.

LIBS

Python ਐਗਜ਼ਿਕਿਊਟੇਬਲ ਨੂੰ ਲਿੰਕ ਕਰਦੇ ਸਮੇਂ ਲਾਇਬ੍ਰੇਰੀਆਂ ਨੂੰ ਲਿੰਕਰ ਤੱਕ ਭੇਜਣ ਲਈ ਵਰਤੇ ਜਾਣ ਵਾਲੇ ਲਿੰਕਰ ਫਲੈਗ।

ਉਦਾਹਰਨ: -lrt।

LDSHARED

ਸਾਂਝੀ ਲਾਇਬ੍ਰੇਰੀ ਬਣਾਉਣ ਲਈ ਕਮਾਂਡ।

ਮੂਲ: @LDSHARED@ $(PY_LDFLAGS)।

BLDSHARED

libpython ਸਾਂਝੀ ਲਾਇਬ੍ਰੇਰੀ ਬਣਾਉਣ ਲਈ ਕਮਾਂਡ।

ਮੂਲ: @BLDSHARED@ $(PY_CORE_LDFLAGS)।

PY_LDFLAGS

ਮੂਲ: $(CONFIGURE_LDFLAGS) $(LDFLAGS)।

PY_LDFLAGS_NODIST

ਮੂਲ: $(CONFIGURE_LDFLAGS_NODIST) $(LDFLAGS_NODIST)।

New in version 3.8.

PY_CORE_LDFLAGS

ਇੰਟਰਪ੍ਰੀਟਰ ਆਬਜੈਕਟ ਫਾਈਲਾਂ ਨੂੰ ਬਿਲਡ ਕਰਨ ਲਈ ਵਰਤੇ ਜਾਣ ਵਾਲੇ ਲਿੰਕਰ ਫਲੈਗ।

New in version 3.8.