gp2040ce-binary-tools/pyproject.toml
Brian S. Stephan b3f6f86950
ship precompiled protobuf files for convenience
current libraries seem to have problems on Windows with thinking files
are duplicated when they are not, making it impossible to compile .proto
files at runtime in this tool on that platform. this adds a fallback of
using shipped, precompiled files in the package. I was already intending
on providing this as an option anyway, so might as well start doing it
now.

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-01-09 09:40:07 -06:00

78 lines
2.6 KiB
TOML

[build-system]
requires = ["setuptools>=61.0", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"
[project]
name = "gp2040ce-binary-tools"
description = "Tools for working with GP2040-CE firmware and storage binaries."
readme = "README.md"
license = {text = "MIT"}
authors = [
{name = "Brian S. Stephan", email = "bss@incorporeal.org"},
]
requires-python = ">=3.9"
dependencies = ["grpcio-tools", "pyusb", "textual"]
dynamic = ["version"]
classifiers = [
"Environment :: Console",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Utilities",
]
[project.urls]
"Homepage" = "https://github.com/OpenStickCommunity/gp2040ce-binary-tools"
"Changelog" = "https://github.com/OpenStickCommunity/gp2040ce-binary-tools/blob/main/CHANGELOG.md"
"Bug Tracker" = "https://github.com/OpenStickCommunity/gp2040ce-binary-tools/issues"
[project.optional-dependencies]
dev = ["bandit", "decorator", "flake8", "flake8-blind-except", "flake8-builtins", "flake8-docstrings",
"flake8-executable", "flake8-fixme", "flake8-isort", "flake8-logging-format", "flake8-mutable",
"flake8-pyproject", "mypy", "pip-tools", "pytest", "pytest-asyncio", "pytest-cov", "setuptools-scm",
"textual-dev", "tox"]
[project.scripts]
concatenate = "gp2040ce_bintools.builder:concatenate"
dump-config = "gp2040ce_bintools.storage:dump_config"
dump-gp2040ce = "gp2040ce_bintools.builder:dump_gp2040ce"
edit-config = "gp2040ce_bintools.gui:edit_config"
visualize-storage = "gp2040ce_bintools.storage:visualize"
[tool.flake8]
enable-extensions = "G,M"
exclude = [".tox/", "venv/", "_version.py", "tests/test-files/", "config_pb2.py", "enums_pb2.py", "nanopb_pb2.py"]
extend-ignore = "T101"
max-complexity = 10
max-line-length = 120
[tool.isort]
line_length = 120
[tool.mypy]
exclude = [
"config_pb2.py",
"enums_pb2.py",
"nanopb_pb2.py",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "google.protobuf.*"
ignore_missing_imports = true
# there's a lot of class inheritance and so on going on in textual that I haven't figured out
# e.g. assigning Select or Input to the same variable is valid but not type-safe, bindings
# can just exit but mypy thinks they should return coroutines... better just to disable it for
# now until I can figure things out and learn more about doing proper type checking
[[tool.mypy.overrides]]
module = "gp2040ce_bintools.gui"
ignore_errors = true
[tool.pytest]
python_files = ["*_tests.py", "tests.py", "test_*.py"]
[tool.setuptools_scm]
write_to = "gp2040ce_bintools/_version.py"