Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 3 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

setuptools

Turn Python code into installable packages.

Build tools and bundlersPYPI

GitHub

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/LICENSE

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

70 / 100
Gid Score, #401 overall
264M
downloads a week, pypi
2,872
GitHub stars
45
agent projects use it
setuptools: downloads per weekPyPI, setuptools 262,288,318
setuptools: GitHub starspypa/setuptools 2,872

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

25 projects, 0.8%
25 projects, 0.8%
13 projects, 0.5%

Often used with

In 60.0% of its projects
In 53.3% of its projects
In 53.3% of its projects
In 48.9% of its projects
In 46.7% of its projects
In 46.7% of its projects
In 46.7% of its projects
In 46.7% of its projects

More about setuptools

Funding
  • Tidelift: https://tidelift.com/funding/github/pypi/setuptools

See all

More in Build tools and bundlers

Alternatives

setuptools This page

MITGid 70264M/wk

Poetry Core

Pick poetry-core when the project is managed with Poetry; it is Poetry's own build backend.

maturin

Pick maturin when the fast part of your package is written in Rust rather than C or C++.

uv

Pick uv to manage the project, its virtual environment and dependencies; it can still build with setuptools underneath.

build

Simple and correct Python package builder for wheel and sdist creation.

MITGid 5924.4M/wk

Compare setuptools with another tool

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.”

  1. Put a build-system section in pyproject.toml at the root of your project.

    [build-system]
    requires = ["setuptools"]
    build-backend = "setuptools.build_meta"
    

    From setuptools.pypa.io/en/latest/userguide/quickstart.html

  2. Add the project name, version and dependencies in a [project] table in the same file.

    [project]
    name = "mypackage"
    version = "0.0.1"
    dependencies = [
        "requests",
    ]
    

    From setuptools.pypa.io/en/latest/userguide/quickstart.html

  3. Build the package files with the build tool.

    pip install --upgrade build
    python -m build
    

    From setuptools.pypa.io/en/latest/userguide/quickstart.html

Mistakes to avoid

import pkg_resources (versions, entry points or data files)
from importlib.metadata import version, entry_points / from importlib.resources import files

pkg_resources was removed in setuptools 82.0.0; in our run with 84.2.1 the import raised ModuleNotFoundError.

python setup.py sdist bdist_wheel or python setup.py install
python -m build to make files; pip install . to install

Calling setup.py as a script is strongly discouraged and its commands are being removed.

requires = ["setuptools", "wheel"]
requires = ["setuptools"]

Old guides listed wheel; the backend no longer needs it.

license = {text = "MIT"} plus License :: classifiers
license = "MIT" (an SPDX string) and license-files = ["LICENSE"]

Since 77.0.0 the table form is deprecated and license classifiers raise a warning or an error.

requires = ["setuptools[core]"]
requires = ["setuptools"]

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.