sdkagent

setuptools API reference

190 public APIs from setuptools (pypa/setuptools) — 50 classes, 60 functions, 80 methods. Signatures extracted by static analysis of the actual source.

Repository: pypa/setuptools

KindCount
Classes50
Functions60
Methods80

API list

classsetuptools.Command
Setuptools internal actions are organized using a *command design pattern*.
methodsetuptools.Command.run() -> None
Execute the actions intended by the command.
funcsetuptools._distutils.archive_util.make_zipfile(base_name:str, base_dir:str | os.PathLike[str], verbose:bool=False) -> str
Create a zip file from all the files under 'base_dir'.
methodsetuptools._distutils.cmd.Command.ensure_filename(option:str) -> None
Ensure that 'option' is the name of an existing file.
methodsetuptools._distutils.cmd.Command.ensure_string_list(option:str) -> None
Ensure that 'option' is a list of strings.
methodsetuptools._distutils.cmd.Command.spawn(cmd:MutableSequence[str], search_path:bool=True, level:int=1) -> None
Spawn an external command respecting dry-run flag.
methodsetuptools._distutils.command.build_py.build_py.build_package_data() -> None
Copy data files into build directory
classsetuptools._distutils.command.check.check
This command checks the meta-data of the package.
methodsetuptools._distutils.command.check.check.run()
Runs the command.
methodsetuptools._distutils.command.install.install.convert_paths(*names) -> None
Call `convert_path` over `names`.
methodsetuptools._distutils.command.install.install.create_home_path() -> None
Create directories under ~.
methodsetuptools._distutils.command.install.install.create_path_file()
Creates the .pth file
methodsetuptools._distutils.command.install.install.dump_dirs(msg) -> None
Dumps the list of user options.
methodsetuptools._distutils.command.install.install.expand_dirs() -> None
Calls `os.path.expanduser` on install dirs.
methodsetuptools._distutils.command.install.install.finalize_options() -> None
Finalizes options.
methodsetuptools._distutils.command.install.install.finalize_other() -> None
Finalizes options for non-posix platforms
methodsetuptools._distutils.command.install.install.finalize_unix() -> None
Finalizes options for posix platforms.
methodsetuptools._distutils.command.install.install.initialize_options() -> None
Initializes options.
methodsetuptools._distutils.command.install.install.run()
Runs the command.
classsetuptools._distutils.command.install_egg_info.install_egg_info
Install an .egg-info file for the package
methodsetuptools._distutils.command.sdist.sdist.checking_metadata() -> bool
Callable used for the check sub-command.
methodsetuptools._distutils.command.sdist.sdist.make_distribution() -> None
Create the source distribution(s).
methodsetuptools._distutils.compilers.C.base.Compiler.detect_language(sources:str | list[str]) -> str | None
Detect the language of a given file, or list of files.
methodsetuptools._distutils.compilers.C.base.Compiler.initialize(plat_name:str | None=None) -> None
Prepare the compiler for use, targeting the given platform.
classsetuptools._distutils.compilers.C.errors.CompileError
Failure to compile one or more C/C++ source files.
classsetuptools._distutils.compilers.C.errors.PreprocessError
Failure to preprocess one or more C/C++ files.
funcsetuptools._distutils.compilers._modified.newer(source:_Path, target:_Path) -> bool
Is source modified more recently than target.
classsetuptools._distutils.compilers.errors.Error
A compiler operation failed.
classsetuptools._distutils.compilers.errors.UnknownFileType
Attempt to process an unknown file type.
funcsetuptools._distutils.compilers.platform.detect.get_host_platform() -> str
A string identifying the platform the build is running on.
funcsetuptools._distutils.compilers.platform.detect.get_platform() -> str
The platform being built for.
funcsetuptools._distutils.compilers.platform.detect.is_mingw() -> bool
Whether the current platform is mingw.
classsetuptools._distutils.dir_util.SkipRepeatAbsolutePaths
Cache for mkpath.
funcsetuptools._distutils.dir_util.mkpath(name:pathlib.Path, mode=511, verbose=True) -> None
Create a directory and any missing ancestor directories.
classsetuptools._distutils.dist.Distribution
The core of the Distutils.
classsetuptools._distutils.errors.DistutilsArgError
Raised by fancy_getopt in response to getopt.error -- ie.
classsetuptools._distutils.errors.DistutilsByteCompileError
Byte compile error.
classsetuptools._distutils.errors.DistutilsError
The root of all Distutils evil.
classsetuptools._distutils.errors.DistutilsFileError
Any problems in the filesystem: expected file not found, etc.
classsetuptools._distutils.errors.DistutilsGetoptError
The option table provided to 'fancy_getopt()' is bogus.
classsetuptools._distutils.errors.DistutilsTemplateError
Syntax error in a file list template.
funcsetuptools._distutils.file_util.move_file(src, dst, verbose=True)
Move a file 'src' to 'dst'.
funcsetuptools._distutils.sysconfig.customize_compiler(compiler:CCompiler) -> None
Do any platform-specific customization of a CCompiler instance.
funcsetuptools._distutils.sysconfig.get_config_h_filename() -> str
Return full pathname of installed pyconfig.h file.
funcsetuptools._distutils.sysconfig.parse_config_h(fp, g=None)
Parse a config.h-style file.
funcsetuptools._distutils.sysconfig.parse_makefile(fn, g=None)
Parse a Makefile-style file.
funcsetuptools._distutils.util.change_root(new_root:str | os.PathLike[str], pathname:str | os.PathLike[str]) -> str
Return 'pathname' with 'new_root' prepended.
funcsetuptools._distutils.util.convert_path(pathname:str | os.PathLike[str]) -> str
Allow for pathlib.Path inputs, coax to a native path string.
funcsetuptools._distutils.util.split_version(s:str) -> list[int]
Convert a dot-separated string into a list of numbers for comparisons
funcsetuptools._distutils.util.strtobool(val:str) -> bool
Convert a string representation of truth to true (1) or false (0).
funcsetuptools._distutils.util.subst_vars(s, local_vars:Mapping[str, object]) -> str
Perform variable substitution on 'string'.
classsetuptools._distutils.version.LooseVersion
Version numbering for anarchists and software realists.
classsetuptools._distutils.version.StrictVersion
Version numbering for anal retentives and software idealists.
classsetuptools._distutils.version.Version
Abstract base class for version numbering classes.
classsetuptools._distutils.versionpredicate.VersionPredicate
Parse and test package version predicates.
funcsetuptools._distutils.versionpredicate.splitUp(pred)
Parse a single version comparison.
funcsetuptools._normalization.best_effort_version(version:str) -> str
Convert an arbitrary string into a version-like string.
funcsetuptools._normalization.filename_component(value:str) -> str
Normalize each component of a filename (e.g.
funcsetuptools._normalization.filename_component_broken(value:str) -> str
Produce the incorrect filename component for compatibility.
funcsetuptools._normalization.safe_identifier(name:str) -> str
Make a string safe to be used as Python identifier.
funcsetuptools._normalization.safe_name(component:str) -> str
Escape a component used as a project name according to Core Metadata.
funcsetuptools._normalization.safe_version(version:str) -> str
Convert an arbitrary string into a valid version string.
funcsetuptools._normalization.safer_name(value:str) -> str
Like ``safe_name`` but can be used as filename component for wheel
funcsetuptools._path.normpath(filename:StrPath) -> str
Normalize a file/dir name for comparison purposes.
funcsetuptools._reqs.parse_strings(strs:_StrOrIter) -> Iterator[str]
Yield requirement strings for each specification in `strs`.
classsetuptools._scripts.CommandSpec
A command spec for a #!
classsetuptools._static.SpecifierSet
Not exactly a built-in type but useful for ``requires-python``
funcsetuptools._static.noop(value:T) -> T
>>> noop(42) 42
classsetuptools.archive_util.UnrecognizedFormat
Couldn't recognize the archive type
classsetuptools.command.alias.alias
Define a shortcut that invokes one or more commands
funcsetuptools.command.bdist_wheel.bdist_wheel.adios(p:str) -> None
Appropriately delete directory, file or link.
funcsetuptools.command.bdist_wheel.get_platform(archive_root:str | None) -> str
Return our platform name 'win32', 'linux_x86_64'
funcsetuptools.command.bdist_wheel.safe_version(version:str) -> str
Convert an arbitrary string to a standard version string
methodsetuptools.command.build_py.build_py.build_package_data() -> None
Copy data files into build directory
methodsetuptools.command.build_py.build_py.get_output_mapping() -> dict[str, str]
See :class:`setuptools.commands.build.SubCommand`
methodsetuptools.command.build_py.build_py.get_outputs(include_bytecode:bool=True) -> list[str]
See :class:`setuptools.commands.build.SubCommand`
classsetuptools.command.develop.develop
Set up package for development
classsetuptools.command.easy_install.easy_install
Stubbed command for temporary pbr compatibility.
classsetuptools.command.editable_wheel.editable_wheel
Build 'editable' wheel for development.
classsetuptools.command.install.install
Use easy_install to install the package, w/dependencies
classsetuptools.command.install_egg_info.install_egg_info
Install an .egg-info directory for the package
classsetuptools.command.install_lib.install_lib
Don't add compiled flags to filenames of non-Python files
classsetuptools.command.rotate.rotate
Delete older distributions
classsetuptools.command.saveopts.saveopts
Save command-line options to a file
classsetuptools.command.sdist.sdist
Smart sdist that finds anything supported by revision control
methodsetuptools.command.sdist.sdist.make_distribution() -> None
Workaround for #516
funcsetuptools.command.sdist.walk_revctrl(dirname='') -> Iterator
Find all files under revision control
classsetuptools.command.setopt.option_base
Abstract base class for commands that mess with config files
classsetuptools.command.setopt.setopt
Save command-line options to a file
funcsetuptools.config._apply_pyprojecttoml.json_compatible_key(key:str) -> str
As defined in :pep:`566#json-compatible-metadata`
classsetuptools.config._validate_pyproject.error_reporting.ValidationError
Report violations of a given JSON schema.
classsetuptools.config._validate_pyproject.fastjsonschema_exceptions.JsonSchemaException
Base exception of ``fastjsonschema`` library.
classsetuptools.config._validate_pyproject.fastjsonschema_exceptions.JsonSchemaValueException
Exception raised by validation function.
funcsetuptools.config._validate_pyproject.formats.import_name(value:str) -> bool
This is a valid import name.
funcsetuptools.config._validate_pyproject.formats.int(value:builtins.int) -> bool
Signed 64-bit integer (:math:`-2^{63} \leq x < 2^{63}`)
funcsetuptools.config._validate_pyproject.formats.int16(value:builtins.int) -> bool
Signed 16-bit integer (:math:`-2^{15} \leq x < 2^{15}`)
funcsetuptools.config._validate_pyproject.formats.int32(value:builtins.int) -> bool
Signed 32-bit integer (:math:`-2^{31} \leq x < 2^{31}`)
funcsetuptools.config._validate_pyproject.formats.int64(value:builtins.int) -> bool
Signed 64-bit integer (:math:`-2^{63} \leq x < 2^{63}`)
funcsetuptools.config._validate_pyproject.formats.int8(value:builtins.int) -> bool
Signed 8-bit integer (:math:`-2^{7} \leq x < 2^{7}`)
funcsetuptools.config._validate_pyproject.formats.pep561_stub_name(value:str) -> bool
Name of a directory containing type stubs.
funcsetuptools.config._validate_pyproject.formats.python_identifier(value:str) -> bool
Can be used as identifier in Python.
funcsetuptools.config._validate_pyproject.formats.python_qualified_identifier(value:str) -> bool
Python "dotted identifier", i.e.
funcsetuptools.config._validate_pyproject.formats.trove_classifier(value:str) -> bool
See https://pypi.org/classifiers/
funcsetuptools.config._validate_pyproject.formats.uint(value:builtins.int) -> bool
Signed 64-bit integer (:math:`0 \leq x < 2^{64}`)
funcsetuptools.config._validate_pyproject.formats.uint16(value:builtins.int) -> bool
Unsigned 16-bit integer (:math:`0 \leq x < 2^{16}`)
funcsetuptools.config._validate_pyproject.formats.uint32(value:builtins.int) -> bool
Unsigned 32-bit integer (:math:`0 \leq x < 2^{32}`)
funcsetuptools.config._validate_pyproject.formats.uint64(value:builtins.int) -> bool
Unsigned 64-bit integer (:math:`0 \leq x < 2^{64}`)
funcsetuptools.config._validate_pyproject.formats.uint8(value:builtins.int) -> bool
Unsigned 8-bit integer (:math:`0 \leq x < 2^8`)
funcsetuptools.config._validate_pyproject.formats.url(value:str) -> bool
Valid URL (validation uses :obj:`urllib.parse`).
classsetuptools.config.expand.StaticModule
Proxy to a module object that avoids executing arbitrary code.
funcsetuptools.config.expand.read_attr(attr_desc:str, package_dir:Mapping[str, str] | None=None, root_dir:StrPath | None=None) -> Any
Reads the value of an attribute from a module.
classsetuptools.config.setupcfg.ConfigHandler
Handles metadata supplied in configuration files.
methodsetuptools.config.setupcfg.ConfigHandler.parse_section(section_options) -> None
Parses configuration file section.
methodsetuptools.config.setupcfg.ConfigHandler.parsers() -> dict[str, Callable]
Metadata item name to parser function mapping.
classsetuptools.depends.Require
A prerequisite to building or installing a distribution
methodsetuptools.depends.Require.version_ok(version)
Is 'version' sufficiently up-to-date?
classsetuptools.discovery.ModuleFinder
Find isolated Python modules.
funcsetuptools.discovery.find_parent_package(packages:list[str], package_dir:Mapping[str, str], root_dir:StrPath) -> str | None
Find the parent package that is not a namespace.
funcsetuptools.discovery.remove_nested_packages(packages:list[str]) -> list[str]
Remove nested packages from a list of packages.
funcsetuptools.discovery.remove_stubs(packages:list[str]) -> list[str]
Remove type stubs (:pep:`561`) from a list of packages.
classsetuptools.dist.DistDeprecationWarning
Class for warning about deprecations in dist in setuptools.
methodsetuptools.dist.Distribution.exclude_package(package:str) -> None
Remove packages, modules, and extensions in named package
methodsetuptools.dist.Distribution.fetch_build_egg(req)
Fetch an egg needed for building
methodsetuptools.dist.Distribution.fetch_build_eggs(requires:_StrOrIter) -> list[metadata.Distribution]
Resolve pre-setup requirements
methodsetuptools.dist.Distribution.get_command_class(command:str) -> type[distutils.cmd.Command]
Pluggable version of get_command_class()
methodsetuptools.dist.Distribution.has_contents_for(package:str) -> bool
Return true if 'exclude_package(package)' would do something
funcsetuptools.dist.assert_string_list(dist, attr:str, value:_Sequence) -> None
Verify that value is a string list
funcsetuptools.dist.check_nsp(dist, attr, value)
Verify that namespace packages are valid
funcsetuptools.dist.check_requirements(dist, attr:str, value:_OrderedStrSequence) -> None
Verify that install_requires is a valid requirements list
classsetuptools.errors.InvalidConfigError
Error used for invalid configurations.
classsetuptools.extension.Extension
Describes a single extension module.
classsetuptools.extension.Library
Just like a regular Extension, but built as a library instead
funcsetuptools.glob.escape(pathname)
Escape all special characters.
funcsetuptools.glob.glob(pathname:_StrOrBytesT, recursive:bool=False) -> list[_StrOrBytesT]
Return a list of paths matching a pathname pattern.
funcsetuptools.installer.fetch_build_egg(dist, req) -> metadata.Distribution | metadata.PathDistribution
Fetch an egg needed for building.
methodsetuptools.msvc.EnvironmentInfo.FSharp()
Microsoft Visual F#.
methodsetuptools.msvc.EnvironmentInfo.FxTools()
Microsoft .NET Framework Tools.
methodsetuptools.msvc.EnvironmentInfo.HTMLHelpWorkshop()
Microsoft HTML Help Workshop.
methodsetuptools.msvc.EnvironmentInfo.MSBuild()
Microsoft Build Engine.
methodsetuptools.msvc.EnvironmentInfo.OSIncludes()
Microsoft Windows SDK Include.
methodsetuptools.msvc.EnvironmentInfo.OSLibpath()
Microsoft Windows SDK Libraries Paths.
methodsetuptools.msvc.EnvironmentInfo.OSLibraries()
Microsoft Windows SDK Libraries.
methodsetuptools.msvc.EnvironmentInfo.SdkSetup()
Microsoft Windows SDK Setup.
methodsetuptools.msvc.EnvironmentInfo.SdkTools()
Microsoft Windows SDK Tools.
methodsetuptools.msvc.EnvironmentInfo.UCRTIncludes() -> list[str]
Microsoft Universal C Runtime SDK Include.
methodsetuptools.msvc.EnvironmentInfo.UCRTLibraries() -> list[str]
Microsoft Universal C Runtime SDK Libraries.
methodsetuptools.msvc.EnvironmentInfo.VCRuntimeRedist() -> str | None
Microsoft Visual C++ runtime redistributable dll.
methodsetuptools.msvc.EnvironmentInfo.VCTools()
Microsoft Visual C++ Tools.
methodsetuptools.msvc.EnvironmentInfo.VSTools()
Microsoft Visual Studio Tools.
methodsetuptools.msvc.EnvironmentInfo.return_env(exists:bool=True) -> _EnvironmentDict
Return environment dict.
methodsetuptools.msvc.EnvironmentInfo.vc_ver()
Microsoft Visual C++ version.
methodsetuptools.msvc.EnvironmentInfo.vs_ver()
Microsoft Visual Studio.
classsetuptools.msvc.PlatformInfo
Current and Target Architectures information.
methodsetuptools.msvc.PlatformInfo.cross_dir(forcex86=False) -> str
Cross platform specific subfolder.
methodsetuptools.msvc.PlatformInfo.current_dir(hidex86=False, x64=False) -> str
Current platform specific subfolder.
methodsetuptools.msvc.PlatformInfo.current_is_x86() -> bool
Return True if current CPU is x86 32 bits..
methodsetuptools.msvc.PlatformInfo.target_cpu() -> str
Return Target CPU architecture.
methodsetuptools.msvc.PlatformInfo.target_dir(hidex86=False, x64=False) -> str
Target platform specific subfolder.
methodsetuptools.msvc.PlatformInfo.target_is_x86() -> bool
Return True if target CPU is x86 32 bits..
classsetuptools.msvc.RegistryInfo
Microsoft Visual Studio related registry information.
methodsetuptools.msvc.RegistryInfo.lookup(key:str, name:str) -> str | None
Look for values in registry in Microsoft software registry.
methodsetuptools.msvc.RegistryInfo.microsoft_sdk() -> LiteralString
Microsoft SDK registry key.
methodsetuptools.msvc.RegistryInfo.netfx_sdk() -> LiteralString
Microsoft .NET Framework SDK registry key.
methodsetuptools.msvc.RegistryInfo.sxs() -> LiteralString
Microsoft Visual Studio SxS registry key.
methodsetuptools.msvc.RegistryInfo.vc() -> LiteralString
Microsoft Visual C++ VC7 registry key.
methodsetuptools.msvc.RegistryInfo.vc_for_python() -> LiteralString
Microsoft Visual C++ for Python registry key.
methodsetuptools.msvc.RegistryInfo.visualstudio() -> LiteralString
Microsoft Visual Studio root registry key.
methodsetuptools.msvc.RegistryInfo.vs() -> LiteralString
Microsoft Visual Studio VS7 registry key.
methodsetuptools.msvc.RegistryInfo.windows_kits_roots() -> LiteralString
Microsoft Windows Kits Roots registry key.
methodsetuptools.msvc.RegistryInfo.windows_sdk() -> LiteralString
Microsoft Windows/Platform SDK registry key.
classsetuptools.msvc.SystemInfo
Microsoft Windows and Visual Studio related system information.
methodsetuptools.msvc.SystemInfo.FSharpInstallDir() -> str
Microsoft Visual F# directory.
methodsetuptools.msvc.SystemInfo.FrameworkDir32() -> str
Microsoft .NET Framework 32bit directory.
methodsetuptools.msvc.SystemInfo.FrameworkDir64() -> str
Microsoft .NET Framework 64bit directory.
methodsetuptools.msvc.SystemInfo.FrameworkVersion32() -> tuple[str, ...]
Microsoft .NET Framework 32bit versions.
methodsetuptools.msvc.SystemInfo.FrameworkVersion64() -> tuple[str, ...]
Microsoft .NET Framework 64bit versions.
methodsetuptools.msvc.SystemInfo.NetFxSdkDir() -> str | None
Microsoft .NET Framework SDK directory.
methodsetuptools.msvc.SystemInfo.NetFxSdkVersion() -> tuple[LiteralString, ...]
Microsoft .NET Framework SDK versions.
methodsetuptools.msvc.SystemInfo.UniversalCRTSdkDir() -> str | None
Microsoft Universal CRT SDK directory.
methodsetuptools.msvc.SystemInfo.UniversalCRTSdkLastVersion() -> str
Microsoft Universal C Runtime SDK last version.
methodsetuptools.msvc.SystemInfo.VCInstallDir() -> str
Microsoft Visual C++ directory.
methodsetuptools.msvc.SystemInfo.VSInstallDir() -> str
Microsoft Visual Studio directory.
methodsetuptools.msvc.SystemInfo.WindowsSDKExecutablePath() -> str | None
Microsoft Windows SDK executable directory.
methodsetuptools.msvc.SystemInfo.WindowsSdkDir() -> str
Microsoft Windows SDK directory.
methodsetuptools.msvc.SystemInfo.WindowsSdkLastVersion() -> str
Microsoft Windows SDK last version.
classsetuptools.sic
Treat this string as-is (https://en.wikipedia.org/wiki/Sic)
classsetuptools.warnings.SetuptoolsWarning
Base class in ``setuptools`` warning hierarchy.
methodsetuptools.wheel.Wheel.install_as_egg(destination_eggdir) -> None
Install wheel as an egg directory.
funcsetuptools.wheel.disable_info_traces() -> Iterator[None]
Temporarily disable info traces.
funcsetuptools.windows_support.hide_file(path:str) -> None
Set the hidden attribute on a file or directory.

About this data

These signatures were extracted from the public source of pypa/setuptools using Python's ast module. Argument names, default values, type annotations and return types are taken verbatim from the code. Implementation bodies are never stored. See how it works for details.

Back to all 805 libraries