1. License
“Permission is hereby granted, free of charge, to any person obtaining a copy”
MIT allows use in paid and closed-source work.
github.com/pypa/setuptools/blob/main/LICENSE3. Used by agents' projects
Dependency in 45 public GitHub projects set up for AI coding agents that we scanned (0.7%).
4. Agent access
Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.
From the package registry and GitHub, checked daily; card checked Nov 11, 2026. Tap a verdict to see its source.How we checkedReport an error
What setuptools does
setuptools is the free, long-standing tool that packs Python code into files others can install with pip or upload to PyPI. You describe the package in one pyproject.toml file, and a build command makes the installable files. It can also compile C or C++ parts for speed.
What people build with it
Share your code as a package
Your helper code is used in several projects; you pack it once and install it everywhere instead of copying files around.
Give your tool a command name
After install, people type tipcalc 48.30 in the terminal instead of python -m tipcalc.cli.
Speed up a hot spot with C
One slow function is rewritten in C, and setuptools compiles it into the package during the build.
Ship data files with the code
A file of rates or a template travels inside the package, and the code reads it wherever the package is installed.
Edit code without reinstalling
While you work on the package, changes show up right away in the environment where it is installed.
One private package for many services Idea
Several small backend services share models and helpers; a versioned internal package keeps them in step.
setuptools popularity
Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated
How setuptools is used
- setuptools is a dependency in 45 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (2.8% of the 1,623 Python ones), #21 of 185 in build tools and bundlers.
- Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 587; those are left out of every share on this page.
- The most used alternative in our scan is build (10 projects).
- Projects that use it most often also use Requests (60.0%), NumPy (53.3%), Uvicorn (53.3%).
By coding agent
Often used with
More about setuptools
Funding
- Tidelift: https://tidelift.com/funding/github/pypi/setuptools
More in Build tools and bundlers
Alternatives
setuptools This page
Pick poetry-core when the project is managed with Poetry; it is Poetry's own build backend.
Pick maturin when the fast part of your package is written in Rust rather than C or C++.
Pick uv to manage the project, its virtual environment and dependencies; it can still build with setuptools underneath.
Simple and correct Python package builder for wheel and sdist creation.
Get started
Tell your AI assistant
“Package this project with setuptools 84.2.1 (Python 3.10+): put all metadata in pyproject.toml with build-backend setuptools.build_meta, an SPDX license string and [project.scripts] for the command, then build with python -m build; do not call setup.py directly and do not use pkg_resources.”
Put a build-system section in pyproject.toml at the root of your project.
[build-system] requires = ["setuptools"] build-backend = "setuptools.build_meta"Add the project name, version and dependencies in a [project] table in the same file.
[project] name = "mypackage" version = "0.0.1" dependencies = [ "requests", ]Build the package files with the build tool.
pip install --upgrade build python -m build
Mistakes to avoid
pkg_resources was removed in setuptools 82.0.0; in our run with 84.2.1 the import raised ModuleNotFoundError.
Calling setup.py as a script is strongly discouraged and its commands are being removed.
Old guides listed wheel; the backend no longer needs it.
Since 77.0.0 the table form is deprecated and license classifiers raise a warning or an error.
The core extra is internal and may go away; the docs ask package authors not to use it.
Questions
Do I still need a setup.py file?
Usually not. All settings can live in pyproject.toml; a small setup.py is only needed for dynamic parts such as C extensions.
Should I list wheel in build-system requires?
No. The backend no longer needs it, and listing it adds a needless requirement for source builds.
Where did pkg_resources go?
It was removed in setuptools 82.0.0; use importlib.metadata and importlib.resources from the standard library.
How do I upload the package to PyPI?
setuptools only builds the files; the docs point to twine for the upload.