aiohomekit icon indicating copy to clipboard operation
aiohomekit copied to clipboard

Use extras to allow use of some backends and not others?

Open Jc2k opened this issue 3 years ago • 0 comments

The original plan was to put something like this in pyproject.toml:

[tool.poetry.dependencies]
python = "^3.9"
cryptography = ">=2.9.2"
commentjson = "^0.9.0"
zeroconf = { version=">=0.32.0", optional=True }
aiocoap = { version=">=0.4.1", optional=True }
bleak = { version=">=0.4.1", optional=True }

[tool.poetry.extras]
ble = ["bleak"]
coap = ["aiocoap", "zeroconf"]
ip = ["zeroconf]

Then refer to aiohomekit as aiohomekit[ble,coap,ip] in HA manifests.

The SUPPORTS_ const are a bit pointless without this.

If poetry can be configured to pull in all 3 into dev env by default i'd still want to do this I think.

Jc2k avatar Feb 06 '22 06:02 Jc2k