17db96d56Sopenharmony_ci:mod:`distutils` --- Building and installing Python modules
27db96d56Sopenharmony_ci===========================================================
37db96d56Sopenharmony_ci
47db96d56Sopenharmony_ci.. module:: distutils
57db96d56Sopenharmony_ci   :synopsis: Support for building and installing Python modules into an
67db96d56Sopenharmony_ci              existing Python installation.
77db96d56Sopenharmony_ci
87db96d56Sopenharmony_ci.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
97db96d56Sopenharmony_ci
107db96d56Sopenharmony_ci--------------
117db96d56Sopenharmony_ci
127db96d56Sopenharmony_ci:mod:`distutils` is deprecated with removal planned for Python 3.12.
137db96d56Sopenharmony_ciSee the :ref:`What's New <distutils-deprecated>` entry for more information.
147db96d56Sopenharmony_ci
157db96d56Sopenharmony_ci--------------
167db96d56Sopenharmony_ci
177db96d56Sopenharmony_ciThe :mod:`distutils` package provides support for building and installing
187db96d56Sopenharmony_ciadditional modules into a Python installation.  The new modules may be either
197db96d56Sopenharmony_ci100%-pure Python, or may be extension modules written in C, or may be
207db96d56Sopenharmony_cicollections of Python packages which include modules coded in both Python and C.
217db96d56Sopenharmony_ci
227db96d56Sopenharmony_ciMost Python users will *not* want to use this module directly, but instead
237db96d56Sopenharmony_ciuse the cross-version tools maintained by the Python Packaging Authority. In
247db96d56Sopenharmony_ciparticular,
257db96d56Sopenharmony_ci`setuptools <https://setuptools.readthedocs.io/en/latest/>`__ is an
267db96d56Sopenharmony_cienhanced alternative to :mod:`distutils` that provides:
277db96d56Sopenharmony_ci
287db96d56Sopenharmony_ci* support for declaring project dependencies
297db96d56Sopenharmony_ci* additional mechanisms for configuring which files to include in source
307db96d56Sopenharmony_ci  releases (including plugins for integration with version control systems)
317db96d56Sopenharmony_ci* the ability to declare project "entry points", which can be used as the
327db96d56Sopenharmony_ci  basis for application plugin systems
337db96d56Sopenharmony_ci* the ability to automatically generate Windows command line executables at
347db96d56Sopenharmony_ci  installation time rather than needing to prebuild them
357db96d56Sopenharmony_ci* consistent behaviour across all supported Python versions
367db96d56Sopenharmony_ci
377db96d56Sopenharmony_ciThe recommended `pip <https://pip.pypa.io/>`__ installer runs all
387db96d56Sopenharmony_ci``setup.py`` scripts with ``setuptools``, even if the script itself only
397db96d56Sopenharmony_ciimports ``distutils``. Refer to the
407db96d56Sopenharmony_ci`Python Packaging User Guide <https://packaging.python.org>`_ for more
417db96d56Sopenharmony_ciinformation.
427db96d56Sopenharmony_ci
437db96d56Sopenharmony_ciFor the benefits of packaging tool authors and users seeking a deeper
447db96d56Sopenharmony_ciunderstanding of the details of the current packaging and distribution
457db96d56Sopenharmony_cisystem, the legacy :mod:`distutils` based user documentation and API
467db96d56Sopenharmony_cireference remain available:
477db96d56Sopenharmony_ci
487db96d56Sopenharmony_ci* :ref:`install-index`
497db96d56Sopenharmony_ci* :ref:`distutils-index`
50