From 44c9042eee371f87e8f5682756b1b87cb52d8077 Mon Sep 17 00:00:00 2001 From: Mike Geppert Date: Fri, 8 Aug 2025 22:47:06 -0500 Subject: [PATCH] Docs: FAQ - setup.py not needed to publish on GitHub; clarify hosting vs packaging and mention modern pyproject.toml with link to packaging guide. --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) 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/