-
-
Notifications
You must be signed in to change notification settings - Fork 71
/
pyproject.toml
168 lines (148 loc) · 8.09 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
[project]
name = "tauon-music-box"
version = "7.9.0"
description = "Tauon Music Box is a music player"
readme = "README.md"
license = { text = "GPL-3.0-or-later" }
# Change the version for the tools below too when bumping up
requires-python = ">=3.10"
classifiers = [
"Programming Language :: Python :: 3"
]
dynamic = ["dependencies"]
[project.gui-scripts]
tauonmb = "tauon.__main__:main"
[project.entry-points."distutils.commands"]
compile_translations = "compile_translations:main"
[project.urls]
homepage = "https://tauonmusicbox.rocks/"
[build-system]
requires = ["setuptools>=75.3", "setuptools_scm"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
# https://setuptools.pypa.io/en/latest/userguide/ext_modules.html
# This is terribly formatted as in TOML 1.0 it all has to be inline, can only be changed when TOML 1.1 ships
# Windows - MSVC - does not work as PyGobject, GTK, Cairo and et al won't build under MVSC
# One option would be to test https://github.com/wingtk/gvsbuild + https://stackoverflow.com/a/72737752
# ./vcpkg.exe install libsndfile:x64-windows # TODO download the necessities instead of this bundle, libflac at minimum
# ./vcpkg.exe install mpg123:x64-windows # Hack 1.29.3 in first see https://sourceforge.net/p/mpg123/bugs/374/
# ./vcpkg.exe install libsamplerate:x64-windows
# ./vcpkg.exe install libopenmpt:x64-windows
# ./vcpkg.exe install wavpack:x64-windows
# ./vcpkg.exe install libgme:x64-windows
# ./vcpkg.exe install pthreads:x64-windows
# wavpack.lib is trying to be found but it is wavpackdll.lib
# opusfile includes opus libraries without opus/ wtf copy them over
# ext-modules = [
# {name = "phazor", sources = ["src/phazor/kissfft/kiss_fftr.c", "src/phazor/kissfft/kiss_fft.c", "src/phazor/phazor.c"], include-dirs = ["src/phazor/miniaudio", "C:/Users/Yeet/Tauon/src/phazor/miniaudio", "C:/Users/Yeet/Tauon/vcpkg/installed/x64-windows/include", "C:/Users/Yeet/Tauon/src/phazor/kissfft", "C:/Users/Yeet/Tauon/src/phazor/miniaudio"], libraries=["samplerate", "wavpackdll", "opusfile", "ogg", "opus", "vorbisfile", "mpg123", "FLAC", "openmpt", "pthreadVC3", "gme"], library-dirs = ["vcpkg/installed/x64-windows/lib"] },]
# Linux
ext-modules = [
{name = "phazor", sources = ["src/phazor/kissfft/kiss_fftr.c", "src/phazor/kissfft/kiss_fft.c", "src/phazor/phazor.c"], include-dirs = ["/usr/include/opus"], libraries=["samplerate", "wavpack", "opusfile", "vorbisfile", "mpg123", "FLAC", "openmpt", "gme"] },
{name = "phazor-pw", sources = ["src/phazor/kissfft/kiss_fftr.c", "src/phazor/kissfft/kiss_fft.c", "src/phazor/phazor.c"], include-dirs = ["/usr/include/opus"], libraries=["samplerate", "wavpack", "opusfile", "vorbisfile", "mpg123", "FLAC", "openmpt", "gme", "pipewire-0.3"] },]
package-dir = {"" = "src"}
# Should we care about these options or is it fine to omit them here?
# -shared -o libphazor.so -fPIC -Wall -O3 -g #-Wextra
# -shared -o libphazor-pipe.so -fPIC -Wall -O3 -g -DPIPE #-Wextra
packages = [
"tauon",
"tauon.t_modules"
]
[tool.setuptools.dynamic]
# Windows
# dependencies = {file = "requirements_windows.txt"}
# Linux
dependencies = {file = "requirements.txt"}
[tool.setuptools.package-data]
"tauon" = ["assets/*", "templates/*", "theme/*"]
# https://github.com/microsoft/pyright/blob/main/docs/configuration.md#pyright-configuration
[tool.pyright]
#defineConstant = { DEBUG = true }
pythonVersion = "3.10"
# Pyright does not support this, needs to be defined via `__builtins__.pyi`, see https://github.com/microsoft/pyright/issues/9471
# Translations
#builtins = ["_"]
# Defaults: https://github.com/microsoft/pyright/blob/main/docs/configuration.md#diagnostic-settings-defaults
#enableExperimentalFeatures = false
strictListInference = true
strictDictionaryInference = true
strictSetInference = true
deprecateTypingAliases = true
reportMissingTypeStubs = "error"
reportConstantRedefinition = "error"
reportDeprecated = "error"
reportDuplicateImport = "error"
reportIncompleteStub = "error"
reportInconsistentConstructor = "error"
reportInvalidStubStatement = "error"
reportMatchNotExhaustive = "error"
reportMissingParameterType = "error"
reportMissingTypeArgument = "warning"
reportPrivateUsage = "error"
reportTypeCommentUsage = "error"
reportUnknownArgumentType = "warning"
reportUnknownLambdaType = "error"
reportUnknownMemberType = "warning"
reportUnknownParameterType = "warning"
reportUnknownVariableType = "warning"
reportUnnecessaryCast = "error"
reportUnnecessaryComparison = "error"
reportUnnecessaryContains = "error"
reportUnnecessaryIsInstance = "error"
reportUnusedClass = "error"
reportUnusedImport = "error"
reportUnusedFunction = "error"
reportUnusedVariable = "warning"
reportUntypedBaseClass = "error"
reportUntypedClassDecorator = "error"
reportUntypedFunctionDecorator = "error"
reportUntypedNamedTuple = "error"
reportCallInDefaultInitializer = "warning"
reportImplicitOverride = "warning"
reportImplicitStringConcatenation = "warning"
reportImportCycles = "warning"
reportMissingSuperCall = "warning"
reportPropertyTypeMismatch = "warning"
reportShadowedImports = "warning"
reportUninitializedInstanceVariable = "warning"
reportUnnecessaryTypeIgnoreComment = "warning"
reportUnusedCallResult = "warning"
# https://docs.astral.sh/ruff/configuration/
[tool.ruff]
# Target non-EOL releases at minimum - https://devguide.python.org/versions/
target-version = "py310"
# Soft 80 and hard break at 120
line-length = 120
# Translations
builtins = ["_"]
[tool.ruff.lint.flake8-quotes]
inline-quotes = "double"
docstring-quotes = "double"
[tool.ruff.format]
quote-style = "double"
indent-style = "tab"
# https://docs.astral.sh/ruff/rules/
[tool.ruff.lint]
select = ['ALL']
ignore = [
'W191', # tab-indentation - We use tabs for indents, disabling this PEP 8 recommendation
'D206', # indent-with-spaces - ^
'D100', # undocumented-public-module - TODO(Martin): We currently don't even have typing fully implemented, let's maybe care about undocumented functions/classes later
'D101', # undocumented-public-class - ^
'D102', # public-method - ^
'D103', # undocumented-public-function - ^
'D104', # undocumented-public-package - ^
#'D105', # undocumented-magic-method - ^ < This one is a bit more severe though
'D106', # undocumented-public-nested-class - ^
'D107', # undocumented-public-init - ^
'D400', # ends-in-period - We do not care if docstrings end with a period
'D415', # ends-in-punctuation - ^
'D401', # non-imperative-mood - Wants docstrings in imperative language but it's really not foolproof, disable
'EM101', # raw-string-in-exception - We do not care about .format in exceptions, readability is not *our* problem, traceback should be colorized to avoid this instead
'EM102', # f-string-in-exception - ^
'EM103', # dot-format-in-exception - ^
'ERA001', # commented-out-code - Tests for commented out code, but it has way too many false positives, so disable
'FBT001', # boolean-type-hint-positional-argument - Allow positional booleans in functions, it's not really that much of an issue
'FBT002', # boolean-default-value-positional-argument - ^
'FBT003', # boolean-positional-value-in-call - ^
'TD003', # missing-todo-link - We're fine not linking existing issues in TODOs, it's fine to have them noted in code only
]