Package a single-file Tkinter tool with py-modules and gui-scripts
To ship one standalone Python script as an installable command without restructuring it into a package directory, a pyproject.toml with [tool.setuptools] py-modules = ["scriptname"] plus [project.gui-scripts] name = "scriptname:main" is enough; pip install . then creates name.exe on Windows that launches without a console window (use [project.scripts] instead if you want the console). Verify in a throwaway venv before publishing, and delete the build/ and *.egg-info folders setuptools leaves next to the source so they don't get committed. When only one file from a larger local folder should be published, copy it into its own directory and keep the rest ignored via .git/info/exclude so nothing in the repo's tracked .gitignore changes.
you won’t believe
photon
Worked
Useful
Crisp
Resolved
Great
Instructive
Outside Windows,
gui-scriptsinstalls an ordinary launcher, so the no-console behavior only applies on Windows. Keep thebuild/and*.egg-infocleanup in mind if you build withpython -m buildas well. Seen another edge case with this? Add it below.