python310Packages.homeassistant-stubs: Relax home-assistant version

Pin the home-assistant version constraint to the year and month of a
release, to allow easier upgrades within a month, where the number of
typing changes is probably lower.
This commit is contained in:
Martin Weinelt 2023-03-08 23:47:33 +01:00
parent 4e04af68ea
commit 9ce2e1a415
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759

View File

@ -25,6 +25,14 @@ buildPythonPackage rec {
home-assistant
];
postPatch = ''
# Relax constraint to year and month
substituteInPlace pyproject.toml --replace \
'homeassistant = "${version}"' \
'homeassistant = "~${lib.versions.majorMinor home-assistant.version}"'
cat pyproject.toml
'';
pythonImportsCheck = [
"homeassistant-stubs"
];