Movatterモバイル変換


[0]ホーム

URL:


ContentsMenuExpandLight modeDark modeAuto light/dark, in light modeAuto light/dark, in dark modeSkip to content
setuptools 80.9.0 documentation
Logo

Links

Project

Back to top

Porting from Distutils

Setuptools and the PyPA have astated goal to make Setuptools the reference API for distutils.

Since the 60.0.0 release, Setuptools includes a local, vendored copy of distutils (from late copies of CPython) that is enabled by default. To disable the use of this copy of distutils when invoking setuptools, set the environment variable:

SETUPTOOLS_USE_DISTUTILS=stdlib

Warning

Please note that this also affects howdistutils.cfg files inside stdlib’sdistutilspackage directory are processed.UnlessSETUPTOOLS_USE_DISTUTILS=stdlib, they will have no effect on the build process.

You can still use a global user config file,~/.pydistutils.cfg (POSIX) or%USERPROFILE%/pydistutils.cfg (Windows),or use the environment variableDIST_EXTRA_CONFIG to point to anothersupplementary configuration file.

Prefer Setuptools

As Distutils is deprecated, any usage of functions or objects from distutils is similarly discouraged, and Setuptools aims to replace or deprecate all such uses. This section describes the recommended replacements.

distutils.core.setupsetuptools.setup

distutils.cmd.Command ordistutils.core.Commandsetuptools.Command

distutils.command.{build_clib,build_ext,build_py,sdist}setuptools.command.*

distutils.dep_utilsetuptools.modified

distutils.loglogging (standard library)

distutils.version.*packaging.version.*

distutils.errors.*setuptools.errors.*[1]

Migration advice is also provided byPEP 632.

If a project relies on uses ofdistutils that do not have a suitable replacement above, please search theSetuptools issue tracker and file a request, describing the use-case so that Setuptools’ maintainers can investigate. Please provide enough detail to help the maintainers understand how distutils is used, what value it provides, and why that behavior should be supported.

[1]

Please notice errors related to the command line usage ofsetup.py, such asDistutilsArgError, are intentionally not exposedby setuptools, since this is considered a deprecated practice.

On this page

[8]ページ先頭

©2009-2025 Movatter.jp