diff options
author | Wolfgang Müller | 2024-11-10 13:46:44 +0100 |
---|---|---|
committer | Wolfgang Müller | 2024-11-11 16:03:02 +0100 |
commit | 65894a5f7da0d58eebcdb5664ec116b31056a2ab (patch) | |
tree | 8723ee1c66ce81307f6daddce5181ce0fbd3449b /pyproject.toml | |
parent | fbdc88ad574429ff236211376d07f89c818d0930 (diff) | |
download | later-65894a5f7da0d58eebcdb5664ec116b31056a2ab.tar.gz |
Migrate to proper Python package layout
Up until now we've kept the entirety of later(1)'s functionality in one
file. Whilst this is perfectly fine for smaller scripts, the
functionality of later(1) has grown to a size where this become less
feasible. Since we expect it to grow even further, switch to a "proper"
source layout sooner rather than later. This will allow easier
extension, testing and packaging later on.
Since we want to keep installation simple for end-users still, package
later(1) as a zipapp [1] in the Makefile. When installed, this file can
be executed just like the single Python script before it. Using this way
of installation is not mandatory however, the package layout also
supports regular installation with pip and development with poetry.
[1] https://docs.python.org/3.12/library/zipapp.html
Diffstat (limited to '')
-rw-r--r-- | pyproject.toml | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..7f5435f --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,45 @@ +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" + +[tool.poetry] +name = "later" +version = "0.1.0" +description = "Manage watch_later entries as saved by mpv(1)" +authors = [ + "Juhani Krekelä <juhani@krekelä.fi>", + "Wolfgang Müller <wolf@oriole.systems>" +] +license = "MIT" +homepage = "https://git.oriole.systems/later" +repository = "https://git.oriole.systems/later" +documentation = "https://git.oriole.systems/later/about" + +[tool.poetry.scripts] +later = 'later.main:main' + +[tool.poetry.dependencies] +python = "^3.8" + +[tool.poetry.group.dev.dependencies] +pytest = "^8.0.0" + +[tool.pytest.ini_options] +pythonpath = ["src"] + +[tool.ruff.lint] +# https://docs.astral.sh/ruff/rules/ +select = [ + "F", # pyflakes + "E", # pycodestyle + "W", # pycodestyle + "I", # isort + "UP", # pyupgrade + "A", # flake8-builtins + "B", # flake8-bugbear + "SIM", # flake8-simplify + "FURB" # refurb +] + +[tool.ruff.lint.flake8-builtins] +builtins-ignorelist = ["exit"] |