diff --git a/README.md b/README.md index bae18d9..b899fe3 100644 --- a/README.md +++ b/README.md @@ -304,3 +304,14 @@ Optional but useful: - Enable GitHub Actions for basic CI (tests/linters). Example starter workflow: https://github.com/actions/starter-workflows/blob/main/ci/python-package.yml That’s all that has to happen to publish a Python script on GitHub: have a local git repository, connect it to a new GitHub repository (remote), and push your commits. After that, you can collaborate, open issues/PRs, and manage releases directly on GitHub. + + +## FAQ: Do I need a setup.py to publish on GitHub? + +- No. You do not need a setup.py (or any packaging file) to publish code on GitHub. GitHub is a git hosting platform—pushing your commits is sufficient. +- setup.py (legacy) or pyproject.toml (modern, PEP 621) is only needed if you want to package your project so it can be installed with pip (for example, from PyPI or via a git+https URL). +- If your goal is simply to share the script and have users clone and run it, you don’t need setup.py or pyproject.toml. +- If you want users to pip install your project: + - Prefer a modern pyproject.toml with a build backend (e.g., setuptools, hatchling, poetry). + - Legacy projects can use setup.py/setup.cfg. +- Reference: Packaging Python Projects (Python Packaging User Guide) https://packaging.python.org/en/latest/tutorials/packaging-projects/