pyproject.toml:

* update supported python versions upto 3.13
* add waitress and bjoern as platform dependent deps
* add entry-point
* add project urls
* set explicit flat layout structure
* add package data
* add optional dep `docs`

`__main__.py`:
* add main function
* call main function from entrypoint and with direct execution
This commit is contained in:
michilyy
2025-06-03 10:24:28 +02:00
parent 7f558ced70
commit 8a5bed9c10
2 changed files with 35 additions and 3 deletions
+31 -2
View File
@@ -3,7 +3,8 @@ name = "swingmusic"
version = "2.0.6"
description = "Swing Music"
readme = "README.md"
requires-python = ">=3.11, <3.12"
requires-python = ">=3.11, =<3.13"
dependencies = [
"pillow>=11.1.0",
@@ -33,9 +34,37 @@ dependencies = [
"rapidfuzz==3.11.0",
"pendulum>=3.0.0",
"pystray>=0.19.5",
"waitress>=3.0.2; sys_platform == 'win32'",
"bjoern >=3.2.2; sys_platform != 'win32'"
]
[dependency-groups]
[project.scripts]
swingmusic = "swingmusic.__main__:main"
[project.urls]
Homepage = "https://swingmx.com/"
Repository = "https://github.com/swingmx/swingmusic"
Documentation = "https://swingmx.com/guide/introduction.html"
Issues = "https://github.com/swingmx/swingmusic/issues"
[project.optional-dependencies]
dev = [
"pyinstaller==6.12.0",
]
docs = [
"sphinx",
"furo",
"sphinx_design",
"myst_parser",
"sphinx",
"sphinx-autodoc2",
]
[tool.setuptools]
package-dir = {"" = "swingmusic"}
[tool.setuptools.package-data]
swingmusic = ["client/*"]
+4 -1
View File
@@ -108,7 +108,10 @@ def run(*args, **kwargs):
start_swingmusic(kwargs["host"], kwargs["port"])
if __name__ == "__main__":
def main():
multiprocessing.freeze_support()
multiprocessing.set_start_method("spawn")
run()
if __name__ == "__main__":
main()