Skip to content

Add pyproject.toml#83

Open
andrew-platt wants to merge 2 commits intoOpenFAST:mainfrom
andrew-platt:f/add_toml
Open

Add pyproject.toml#83
andrew-platt wants to merge 2 commits intoOpenFAST:mainfrom
andrew-platt:f/add_toml

Conversation

@andrew-platt
Copy link
Copy Markdown
Collaborator

The setup.py could be removed at this point

The setup.py could be removed at this point
Question to claude opus:
are `setup.py` files generally being replaced by `pyproject.toml` files in newer python projects?

Claude replies:

Yes. pyproject.toml is the modern standard (PEP 517/518/621) and is recommended for new projects. Key points:

- **setuptools now fully supports pyproject.toml** — no setup.py needed
- **pip** has supported pyproject.toml since v10 (2018), and it's mature now
- **setup.py is still supported** but considered legacy; many projects keep it for backward compatibility or complex build logic
- **setup.cfg** (the intermediate step) is also being phased out in favor of pyproject.toml

Since you now have both files, you can safely **delete setup.py** — your pyproject.toml handles everything including:
- Package discovery (`[tool.setuptools.packages.find]`)
- Version from file (`[tool.setuptools.dynamic]`)
- Entry points (`[project.scripts]`)
- Dependencies

The only reasons to keep setup.py are:
1. Supporting very old pip versions (pre-2018)
2. Complex programmatic build logic that can't be expressed declaratively
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant