Skill Details
Runtime
(claude-5-5-opus)
Example user message
[userMessage]: Please migrate this project from setup.py to pyproject.toml. (project "tidyfeed": setup.py with version read by regex from tidyfeed/__init__.py, find_packages(exclude=["tests", "tests.*"]), extras cli/dev, a console script, license="MIT" plus the MIT classifier; setup.cfg with [flake8], [tool:pytest], [bdist_wheel])
Example agent response
I moved tidyfeed from setup.py to a PEP 621 pyproject.toml on the setuptools backend. I haven't checked it with a build yet: I couldn't run any commands in this session. The commands for that are below.
pyproject.toml (new, excerpt)
[build-system]
requires = ["setuptools>=77"]
build-backend = "setuptools.build_meta"
[project]
name = "tidyfeed"
dynamic = ["version"]
readme = "README.md"
license = "MIT"
license-files = ["LICENSE*"]
requires-python = ">=3.9"
dependencies = [
"feedparser>=6.0",
"httpx>=0.24,<1.0",
'tomli>=2.0; python_version < "3.11"',
]
(… authors, classifiers without the License :: line, keywords, optional-dependencies cli/dev, urls, scripts …)
[tool.setuptools]
# Classic setup.py did not set include_package_data, so it was false.
# The pyproject default is true; keep the old behavior explicitly.
include-package-data = false
[tool.setuptools.packages.find]
# Mirrors find_packages(exclude=["tests", "tests.*"]).
where = ["."]
exclude = ["tests", "tests.*"]
namespaces = false
[tool.setuptools.dynamic]
version = {attr = "tidyfeed.__version__"}
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-ra --strict-markers"
setup.cfg (cut down): only [flake8] stays, because flake8 does not read pyproject.toml.
Main points
- Nothing in the package should change: dependencies, extras, the tidyfeed command and >=3.9 are the same. Version strings and markers are unchanged.
- Version still comes from one place, tidyfeed/__init__.py line 3. Setuptools now reads it with attr instead of the regex.
- No setup.py shim needed: nothing in it was computed at build time.
Behavior changes (check these)
- License: License: MIT becomes License-Expression: MIT, and I removed the License :: OSI Approved :: MIT License classifier (deprecated; setuptools 77+ refuses it next to a license expression).
- Homepage: the Home-page: line becomes Project-URL: Homepage.
- setuptools 77 or newer is now required to build. Builds with --no-build-isolation and an older setuptools will fail.
Needs your decision: None. dev stays an extra (not moved to [dependency-groups]).
Delete after verifying: setup.py. I have not deleted anything myself.
Verification (not run)
python -m pip install --upgrade build twine
python -m build --outdir dist-before # on the old state
python -m build --outdir dist-after # on the migrated state
python -m twine check dist-after/*
Compare the wheel file lists, METADATA and entry_points.txt. You should only see the license and Homepage differences above, plus a new Metadata-Version.
Full field mapping in MIGRATION_REPORT.md.
Get this skill + 9 more with Select$14 your first month, then $19/mo$14 first month, then $19/mo
View SelectBy purchasing this skill, you agree to our terms of service
CLAUDE-5-5-OPUS
Moves a setuptools project from setup.py, setup.cfg and requirements files to a PEP 621 pyproject.toml without changing what gets built. Maps every field, catches the traps (include-package-data default flip, package discovery, license classifiers vs SPDX, flake8 config, C extensions needing a shim, -r lines, dependency_links) and writes a migration report with behavior changes, open decisions and build-comparison commands. Deletes nothing. Tested with Claude Opus.
...more
Added 50 minutes ago
