Migrate from poetry to uv for dependency and package management (#986)

This commit is contained in:
Steven B.
2024-09-06 15:48:43 +01:00
committed by GitHub
parent 1773f98aad
commit a967d5cd3a
12 changed files with 1931 additions and 2504 deletions

View File

@@ -1,70 +1,83 @@
[tool.poetry]
[project]
name = "python-kasa"
version = "0.7.2"
description = "Python API for TP-Link Kasa Smarthome devices"
license = "GPL-3.0-or-later"
authors = ["python-kasa developers"]
repository = "https://github.com/python-kasa/python-kasa"
description = "Python API for TP-Link Kasa and Tapo devices"
license = {text = "GPL-3.0-or-later"}
authors = [ { name = "python-kasa developers" }]
readme = "README.md"
packages = [
{ include = "kasa" }
]
include = [
{ path= "CHANGELOG.md", format = "sdist" }
requires-python = ">=3.9,<4.0"
dependencies = [
"asyncclick>=8.1.7",
"pydantic>=1.10.15",
"cryptography>=1.9",
"async-timeout>=3.0.0",
"aiohttp>=3",
"typing-extensions>=4.12.2,<5.0",
]
[tool.poetry.urls]
classifiers = [
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
[project.optional-dependencies]
speedups = ["orjson>=3.9.1", "kasa-crypt>=0.2.0"]
docs = ["sphinx~=5.0", "sphinx_rtd_theme~=2.0", "sphinxcontrib-programoutput~=0.0", "myst-parser", "docutils>=0.17"]
shell = ["ptpython", "rich"]
[project.urls]
"Homepage" = "https://github.com/python-kasa/python-kasa"
"Bug Tracker" = "https://github.com/python-kasa/python-kasa/issues"
"Documentation" = "https://python-kasa.readthedocs.io"
"Repository" = "https://github.com/python-kasa/python-kasa"
[tool.poetry.scripts]
[project.scripts]
kasa = "kasa.cli.__main__:cli"
[tool.poetry.dependencies]
python = "^3.9"
asyncclick = ">=8.1.7"
pydantic = ">=1.10.15"
cryptography = ">=1.9"
async-timeout = ">=3.0.0"
aiohttp = ">=3"
[tool.uv]
dev-dependencies = [
"pytest",
"pytest-cov",
"pytest-asyncio",
"pytest-sugar",
"pre-commit",
"voluptuous",
"toml",
"pytest-mock",
"codecov",
"xdoctest>=1.2.0",
"coverage[toml]",
"pytest-timeout~=2.0",
"pytest-freezer~=0.4",
"mypy~=1.0"
]
# speed ups
orjson = { "version" = ">=3.9.1", optional = true }
kasa-crypt = { "version" = ">=0.2.0", optional = true }
# required only for docs
sphinx = { version = "^5", optional = true }
sphinx_rtd_theme = { version = "^2", optional = true }
sphinxcontrib-programoutput = { version = "^0", optional = true }
myst-parser = { version = "*", optional = true }
docutils = { version = ">=0.17", optional = true }
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
# enhanced cli support
ptpython = { version = "*", optional = true }
rich = { version = "*", optional = true }
typing-extensions = ">=4.12.2,<5.0"
[tool.hatch.build.targets.sdist]
include = [
"/kasa",
"/devtools",
"/docs",
"/CHANGELOG.md",
]
[tool.poetry.group.dev.dependencies]
pytest = "*"
pytest-cov = "*"
pytest-asyncio = "*"
pytest-sugar = "*"
pre-commit = "*"
voluptuous = "*"
toml = "*"
tox = "*"
pytest-mock = "*"
codecov = "*"
xdoctest = ">=1.2.0"
coverage = {version = "*", extras = ["toml"]}
pytest-timeout = "^2"
pytest-freezer = "^0.4"
mypy = "^1"
[tool.poetry.extras]
docs = ["sphinx", "sphinx_rtd_theme", "sphinxcontrib-programoutput", "myst-parser", "docutils"]
speedups = ["orjson", "kasa-crypt"]
shell = ["ptpython", "rich"]
[tool.hatch.build.targets.wheel]
include = [
"/kasa",
]
exclude = [
"/kasa/tests",
]
[tool.coverage.run]
source = ["kasa"]
@@ -99,9 +112,6 @@ paths = ["docs"]
ignore = ["D001"]
ignore-path-errors = ["docs/source/index.rst;D000"]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
target-version = "py38"