{
 "kind": "tool",
 "slug": "setuptools",
 "path": "tools/setuptools/",
 "name": "setuptools",
 "maker": null,
 "density": "full",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Build tools and bundlers",
   "tools/build-tools/"
  ]
 ],
 "lead": "Turn Python code into installable packages.",
 "chips": [
  {
   "label": "Build tools and bundlers",
   "path": "tools/build-tools/"
  },
  {
   "label": "PYPI"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "pip install setuptools"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/pypa/setuptools"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "MIT",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": "Permission is hereby granted, free of charge, to any person obtaining a copy",
   "note": "MIT allows use in paid and closed-source work.",
   "src": "https://github.com/pypa/setuptools/blob/main/LICENSE"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Oct 29, 2026",
   "note": "Latest GitHub release Oct 20, 2026. ",
   "src": "https://github.com/pypa/setuptools"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "45 projects",
   "status": "info",
   "sub": "#21 of 185 in its category",
   "note": "Dependency in 45 public GitHub projects set up for AI coding agents that we scanned (0.7%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Install only",
   "status": "info",
   "sub": null,
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": null
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily; card checked Nov 11, 2026.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What setuptools does",
   "parts": [
    {
     "t": "prose",
     "text": "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."
    },
    {
     "t": "h3",
     "text": "What people build with it"
    },
    {
     "t": "uses",
     "items": [
      {
       "title": "Share your code as a package",
       "text": "Your helper code is used in several projects; you pack it once and install it everywhere instead of copying files around.",
       "idea": false
      },
      {
       "title": "Give your tool a command name",
       "text": "After install, people type tipcalc 48.30 in the terminal instead of python -m tipcalc.cli.",
       "idea": false
      },
      {
       "title": "Speed up a hot spot with C",
       "text": "One slow function is rewritten in C, and setuptools compiles it into the package during the build.",
       "idea": false
      },
      {
       "title": "Ship data files with the code",
       "text": "A file of rates or a template travels inside the package, and the code reads it wherever the package is installed.",
       "idea": false
      },
      {
       "title": "Edit code without reinstalling",
       "text": "While you work on the package, changes show up right away in the environment where it is installed.",
       "idea": false
      },
      {
       "title": "One private package for many services",
       "text": "Several small backend services share models and helpers; a versioned internal package keeps them in step.",
       "idea": true
      }
     ]
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "setuptools popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "70",
       "of": "/ 100",
       "l": "Gid Score, #401 overall"
      },
      {
       "n": "264M",
       "l": "downloads a week, pypi"
      },
      {
       "n": "2,872",
       "l": "GitHub stars"
      },
      {
       "n": "45",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How setuptools is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "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%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "25 projects, 0.8%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "25 projects, 0.8%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "13 projects, 0.5%",
       "v": "Cursor",
       "path": "agents/cursor/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 60.0% of its projects",
       "v": "Requests",
       "path": "tools/requests-py/"
      },
      {
       "l": "In 53.3% of its projects",
       "v": "NumPy",
       "path": "tools/numpy/"
      },
      {
       "l": "In 53.3% of its projects",
       "v": "Uvicorn",
       "path": "tools/uvicorn/"
      },
      {
       "l": "In 48.9% of its projects",
       "v": "python-dotenv",
       "path": "tools/python-dotenv/"
      },
      {
       "l": "In 46.7% of its projects",
       "v": "FastAPI",
       "path": "tools/fastapi/"
      },
      {
       "l": "In 46.7% of its projects",
       "v": "Pydantic",
       "path": "tools/pydantic/"
      },
      {
       "l": "In 46.7% of its projects",
       "v": "pytest",
       "path": "tools/pytest/"
      },
      {
       "l": "In 46.7% of its projects",
       "v": "python-multipart",
       "path": "tools/python-multipart/"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "usage",
   "h2": "More about setuptools",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Funding",
       "path": "tools/funding/",
       "items": [
        "Tidelift: https://tidelift.com/funding/github/pypi/setuptools"
       ]
      },
      {
       "title": "More in Build tools and bundlers",
       "path": "tools/build-tools/",
       "items": [
        {
         "text": "Vite",
         "path": "tools/vite/"
        },
        {
         "text": "Turborepo",
         "path": "tools/turbo/"
        },
        {
         "text": "esbuild",
         "path": "tools/esbuild/"
        },
        {
         "text": "Babel (JavaScript)",
         "path": "tools/babel-npm/"
        },
        {
         "text": "Laravel Vite Plugin",
         "path": "tools/laravel-vite-plugin/"
        },
        {
         "text": "React Compiler Babel Plugin",
         "path": "tools/babel-plugin-react-compiler/"
        },
        {
         "text": "Nx",
         "path": "tools/nx/"
        },
        {
         "text": "vite-tsconfig-paths",
         "path": "tools/vite-tsconfig-paths/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "setuptools",
       "me": true,
       "facts": [
        "MIT",
        "Gid 70",
        "264M/wk"
       ]
      },
      {
       "name": "Poetry Core",
       "why": "Pick poetry-core when the project is managed with Poetry; it is Poetry's own build backend.",
       "path": "tools/poetry-core/",
       "facts": []
      },
      {
       "name": "maturin",
       "why": "Pick maturin when the fast part of your package is written in Rust rather than C or C++.",
       "path": "tools/maturin/",
       "facts": []
      },
      {
       "name": "uv",
       "why": "Pick uv to manage the project, its virtual environment and dependencies; it can still build with setuptools underneath.",
       "path": "tools/uv/",
       "facts": []
      },
      {
       "name": "build",
       "why": "Simple and correct Python package builder for wheel and sdist creation.",
       "path": "tools/build/",
       "facts": [
        "MIT",
        "Gid 59",
        "24.4M/wk"
       ]
      }
     ],
     "more": "Compare setuptools with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "prompt",
     "text": "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."
    },
    {
     "t": "steps",
     "items": [
      {
       "text": "Put a build-system section in pyproject.toml at the root of your project.",
       "code": "[build-system]\nrequires = [\"setuptools\"]\nbuild-backend = \"setuptools.build_meta\"\n",
       "src": "https://setuptools.pypa.io/en/latest/userguide/quickstart.html"
      },
      {
       "text": "Add the project name, version and dependencies in a [project] table in the same file.",
       "code": "[project]\nname = \"mypackage\"\nversion = \"0.0.1\"\ndependencies = [\n    \"requests\",\n]\n",
       "src": "https://setuptools.pypa.io/en/latest/userguide/quickstart.html"
      },
      {
       "text": "Build the package files with the build tool.",
       "code": "pip install --upgrade build\npython -m build\n",
       "src": "https://setuptools.pypa.io/en/latest/userguide/quickstart.html"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Mistakes to avoid"
    },
    {
     "t": "mistakes",
     "items": [
      {
       "dont": "import pkg_resources  (versions, entry points or data files)",
       "fix": "from importlib.metadata import version, entry_points  /  from importlib.resources import files",
       "why": "pkg_resources was removed in setuptools 82.0.0; in our run with 84.2.1 the import raised ModuleNotFoundError."
      },
      {
       "dont": "python setup.py sdist bdist_wheel  or  python setup.py install",
       "fix": "python -m build  to make files;  pip install .  to install",
       "why": "Calling setup.py as a script is strongly discouraged and its commands are being removed."
      },
      {
       "dont": "requires = [\"setuptools\", \"wheel\"]",
       "fix": "requires = [\"setuptools\"]",
       "why": "Old guides listed wheel; the backend no longer needs it."
      },
      {
       "dont": "license = {text = \"MIT\"}  plus License :: classifiers",
       "fix": "license = \"MIT\"  (an SPDX string) and license-files = [\"LICENSE\"]",
       "why": "Since 77.0.0 the table form is deprecated and license classifiers raise a warning or an error."
      },
      {
       "dont": "requires = [\"setuptools[core]\"]",
       "fix": "requires = [\"setuptools\"]",
       "why": "The core extra is internal and may go away; the docs ask package authors not to use it."
      }
     ]
    }
   ]
  },
  {
   "id": "faq",
   "nav": "Questions",
   "h2": "Questions",
   "parts": [
    {
     "t": "faq",
     "items": [
      {
       "q": "Do I still need a setup.py file?",
       "a": "Usually not. All settings can live in pyproject.toml; a small setup.py is only needed for dynamic parts such as C extensions.",
       "evidence": {
        "url": "https://setuptools.pypa.io/en/latest/userguide/quickstart.html",
        "quote": "New projects are advised to avoid setup.py configurations (beyond the minimal stub) when custom scripting during the build is not necessary."
       }
      },
      {
       "q": "Should I list wheel in build-system requires?",
       "a": "No. The backend no longer needs it, and listing it adds a needless requirement for source builds.",
       "evidence": {
        "url": "https://setuptools.pypa.io/en/latest/userguide/quickstart.html",
        "quote": "This is not recommended, as the backend no longer requires the wheel package, and listing it explicitly causes it to be unnecessarily required for source distribution builds."
       }
      },
      {
       "q": "Where did pkg_resources go?",
       "a": "It was removed in setuptools 82.0.0; use importlib.metadata and importlib.resources from the standard library.",
       "evidence": {
        "url": "https://setuptools.pypa.io/en/latest/history.html",
        "quote": "Most common uses of pkg_resources have been superseded by the importlib.resources and importlib.metadata projects."
       }
      },
      {
       "q": "How do I upload the package to PyPI?",
       "a": "setuptools only builds the files; the docs point to twine for the upload.",
       "evidence": {
        "url": "https://setuptools.pypa.io/en/latest/userguide/quickstart.html",
        "quote": "This functionality is provided by twine and is documented in the Python packaging tutorial ."
       }
      }
     ]
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "pypi setuptools"
  ],
  [
   "Category",
   "Build tools and bundlers"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "Gid Score",
   "69.7"
  ],
  [
   "Rank in category",
   "#21 of 185"
  ],
  [
   "GitHub",
   "pypa/setuptools"
  ],
  [
   "Last change",
   "Oct 29, 2026"
  ]
 ],
 "good": [
  "You rarely install it by hand; the build tool downloads it when it builds your package.",
  "Version 84 needs Python 3.10 or newer.",
  "Running python setup.py yourself is discouraged; most of those commands are or will be removed."
 ],
 "checked_line": "Read by AgentGid from 9 official pages, card checked Nov 11, 2026; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/pypa.png"
}