Replace Poetry with uv
Use standard project metadata, dependency groups, and the uv build backend. The new lock preserves the previous dependency versions. Documentation and services use uv, and services leave their shared environment unchanged at startup. Remove the entry point for the empty USB HID prototype. Exclude local prototypes, captures, and the external Type 7 lookup table from version control and distributions.
This commit is contained in:
+41
-33
@@ -1,49 +1,57 @@
|
||||
[tool.poetry]
|
||||
[project]
|
||||
name = "bmspy"
|
||||
version = "2.1"
|
||||
description = "bmspy is a tool to get information from a xiaoxiang-type BMS system"
|
||||
authors = ["Timothy Allen <tim@treehouse.org.za>"]
|
||||
license = "CC BY-NC-SA 4.0"
|
||||
authors = [{name = "Timothy Allen", email = "tim@treehouse.org.za"}]
|
||||
license = "CC-BY-NC-SA-4.0"
|
||||
license-files = ["LICENSE"]
|
||||
readme = "README.md"
|
||||
include = [
|
||||
{path = "docs/ecoflow-river2-fields.md", format = "sdist"},
|
||||
{path = "tools/ecoflow-bt.py", format = "sdist"},
|
||||
requires-python = ">=3.12,<4.0"
|
||||
dependencies = [
|
||||
"pyserial>=3.5",
|
||||
]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.12,<4.0"
|
||||
pyserial = ">=3.5"
|
||||
influxdb3-python = {version = ">=0.19.0", optional = true, extras = ["influxdb"]}
|
||||
typing-extensions = {version = ">=4.13", optional = true, extras = ["influxdb"]}
|
||||
prometheus-client = {version = ">=0.11.0", optional = true, extras = ["prometheus"]}
|
||||
bleak = {version = ">=0.21.0", optional = true, extras = ["ecoflow-bt"]}
|
||||
ecdsa = {version = ">=0.19.0", optional = true, extras = ["ecoflow-bt"]}
|
||||
pycryptodome = {version = ">=3.20.0", optional = true, extras = ["ecoflow-bt"]}
|
||||
[project.optional-dependencies]
|
||||
influxdb = [
|
||||
"influxdb3-python>=0.19.0",
|
||||
"typing-extensions>=4.13",
|
||||
]
|
||||
prometheus = ["prometheus-client>=0.11.0"]
|
||||
ecoflow-bt = [
|
||||
"bleak>=0.21.0",
|
||||
"ecdsa>=0.19.0",
|
||||
"pycryptodome>=3.20.0",
|
||||
]
|
||||
|
||||
[tool.poetry.extras]
|
||||
influxdb = ["influxdb3-python", "typing-extensions"]
|
||||
prometheus = ["prometheus-client"]
|
||||
ecoflow-bt = ["bleak", "ecdsa", "pycryptodome"]
|
||||
[project.scripts]
|
||||
bmspy = "bmspy:main"
|
||||
bmspy-server = "bmspy.server:main"
|
||||
bmspy-influxdb = "bmspy.influxdb:main"
|
||||
bmspy-prometheus = "bmspy.prometheus:main"
|
||||
bmspy-ups = "bmspy.ups:main"
|
||||
bmspy-ecoflow-login = "bmspy.ecoflow_login:main"
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
pytest = ">=8.0"
|
||||
pytest-cov = ">=7.1.0"
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"pytest>=8.0",
|
||||
"pytest-cov>=7.1.0",
|
||||
]
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
requires = ["uv_build>=0.12.5,<0.13"]
|
||||
build-backend = "uv_build"
|
||||
|
||||
[tool.uv.build-backend]
|
||||
module-root = ""
|
||||
source-include = [
|
||||
"tests/**", "docs/ecoflow-river2-fields.md",
|
||||
"tools/ecoflow-bt.py", "*.service", "uv.lock",
|
||||
]
|
||||
# Do not distribute the external Type 7 table or the unfinished local USB stub.
|
||||
source-exclude = ["/bmspy/ecoflow_keydata.py", "/bmspy/usbhid.py"]
|
||||
|
||||
[tool.coverage.report]
|
||||
exclude_lines = [
|
||||
"pragma: no cover",
|
||||
"if __name__ == .__main__.:",
|
||||
]
|
||||
|
||||
[tool.poetry.scripts]
|
||||
bmspy = "bmspy:main"
|
||||
bmspy-server = "bmspy.server:main"
|
||||
bmspy-influxdb = "bmspy.influxdb:main"
|
||||
bmspy-prometheus = "bmspy.prometheus:main"
|
||||
bmspy-ups = "bmspy.ups:main"
|
||||
bmspy-usbd = "bmspy.usbhid:main"
|
||||
bmspy-ecoflow-login = "bmspy.ecoflow_login:main"
|
||||
|
||||
Reference in New Issue
Block a user