[project]
name = "kaithem"
version = "0.92.0"
requires-python = ">=3.10,<4.0"
dependencies = [
    # First party"
    "scullery>=0.3.1",
    "iot-devices>=0.25.0",
    "icemedia>=0.1.23",
    "NVRChannel>=0.1.7",

    # New numpy needs new opencv
    "numpy>=2.0.0",


    "cheroot",
    "mako",
    "jinja2",
    "pam",
    "msgpack",
    "pyyaml",
    "types-PyYaml",
    "pytest",
    "nmcli",
    "apprise",


    "ffmpeg-python",
    "yappi",
    "zeroconf>=0.119.0",
    "colorzero",
    # Still included in repo because it doesn't install correctly due to
    # suds-passworddigest
    #onvif,
    "tinytag",
    "jsonschema",
    "pint",
    "pyflakes",
    "python_mpv_jsonipc",
    "textdistance",
    "toml",
    "vignette",
    "simpleeval",
    "websockets",
    "zeep",
    "passlib",
    "Pillow",
    "evdev",
    "markupsafe",
    "types-requests",
    "python-dateutil",
    "recurrent",
    "pygments",
    "pytz",
    "ntplib",
    "holidays",

    "pyserial",
    "pygrep",
    "python-rtmidi==1.5.8",
    "paho-mqtt>=1.6.0",
    "setproctitle",
    "psutil",
    "netifaces",
    "JACK-Client",
    "sf2utils",

    # Older is not compatible with new numpy,
    "scipy>=1.11.0",

    # TODO is this line really needed? We don't use it directly
    # Maybe just removing addr was enough?
    "attrs>=23.2.0",
    "beartype>=0.18.2",
    "types-jsonschema~=4.25.0.20240331",
    "stamina~=24.2.0",
    "stream-zip~=0.0.71",
    "argon2-cffi~=23.1.0",
    "msgpack-types~=0.2.0",
    "niquests~=3.15.1",

    "quart>=0.20.0",
    "hypercorn[uvloop]~=0.17.3",
    "structlog~=24.4.0",
    "rich~=14.1.0",
    "colorama~=0.4.6",
    "starlette>=0.37.2",

    "ephem~=4.2.0",

    "opencv-python~=4.10.0.84",
    "pipewire-python~=0.2.3",

    "sherpa-onnx~=1.12.10",
    "soundfile~=0.13.1",
]


[tool.poetry]

# You need the freeze plugin to build this for release! 
# https://github.com/cloud-custodian/poetry-plugin-freeze
# Use poetry self add poetry-plugin-freeze

name = "kaithem"
version = "0.90.1"
description = "Home/commercial automation server"
license = "GPL-3.0-or-later"
packages = [
    { include = "kaithem" },
    { include = "kaithem_cli" },
    { include = "kaithem_scripts" },
]
authors = ["Daniel Dunn"]
readme = "README.md"

# These are dev documents that don't need to be in the final package
exclude = ["*.dev.excalidraw.svg"]


# Duplicate here so we can use uv to test in specific environments
[project.optional-dependencies]
dev = [
    "pygount >=1.7.0",
    "handsdown >=2.1.0",
    "pytest-cov >=5.0.0",
    "pytest-asyncio >=0.23.7",
    "time-machine >=2.0.0",
    "coverage >=7.2.7",
]


[tool.ruff]
line-length = 80
target-version = "py311"

[tool.poetry.scripts]
"kaithem" = "kaithem:__main__"
"kaithem-cli" = "kaithem_cli.cli:main"
"kaithem-scripts" = "kaithem_scripts.makefile_runner:main"
"kaithem-pi-boot-cfg" = "kaithem_scripts.pi_boot_cfg:main"

"kaithem._jackmanager_server" = "icemedia.jack_client_subprocess:main"
"kaithem._iceflow_server" = "icemedia.iceflow_server:main"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.coverage.run]
# omit the deprecated old file and system gstreamer
omit = ["*/thirdparty/*", "*/selftest/*", "/usr/lib/**"]
sigterm = true

[tool.coverage.report]

exclude_also = ["if TYPE_CHECKING"]


[tool.liccheck]
authorized_licenses = [
    "BSD",
    "new BSD",
    "BSD license",
    "simplified BSD",
    "Apache",
    "Apache 2.0",
    "Apache software license",
    "Apache Software",
    "gnu LGPL",
    "LGPL with exceptions or zpl",
    "# https://opensource.stackexchange.com/questions/10996/is-the-edl-v1-0-gpl-compatible",
    "Eclipse Public License v2.0 / Eclipse Distribution License v1.0",
    "Historical Permission Notice and Disclaimer (HPND)",
    "GNU Lesser General Public License v3 (LGPLv3)",
    "GNU Lesser General Public License v2 or later (LGPLv2+)",
    "GNU Lesser General Public License v3 or later (LGPLv3+)",
    "ISC license (ISCL)",
    "MIT",
    "MIT license",
    "python software foundation license",
    "GNU General Public License v2 or later (GPLv2+)",
    "Public Domain",
    "Zope Public",
    "GNU General Public License v3 (GPLv3)",
    "GNU Lesser General Public License v2 (LGPLv2)",
    "GNU Library or Lesser General Public License (LGPL)",
    "3-Clause BSD",
    "Mozilla Public License 2.0 (MPL 2.0)",
    "Python Software Foundation",
]

[tool.liccheck.authorized_packages]
# LGPL-2.1 license
pyFluidSynth = ">0.0.1"

# Appears to be trivial and sub-kb
pam = ">0.0.1"

# Apache 2.0
chacha20poly1305-reuseable = ">0.0.1"

# PSF-2.0
aiohappyeyeballs = ">0.0.1"

# Apache Software License 2.0
async-interrupt = ">0.0.1"


[tool.pytest.ini_options]
asyncio_mode = "auto"
