Skip to content

Commit

Permalink
home-assistant: 0.107.7 -> 0.108.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Apr 10, 2020
1 parent 2589801 commit 02becde
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 36 deletions.
46 changes: 46 additions & 0 deletions pkgs/servers/home-assistant/0001-setup.py-relax-dependencies.patch
@@ -0,0 +1,46 @@
From 80f39643bb4d25f8ffcbd92804844961b303f4d0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
Date: Thu, 9 Apr 2020 07:20:46 +0100
Subject: [PATCH] setup.py: relax dependencies
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
---
setup.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/setup.py b/setup.py
index f53af0ee1..ff4227487 100755
--- a/setup.py
+++ b/setup.py
@@ -32,10 +32,10 @@ PROJECT_URLS = {
PACKAGES = find_packages(exclude=["tests", "tests.*"])

REQUIRES = [
- "aiohttp==3.6.1",
+ "aiohttp>=3.6.1",
"astral==1.10.1",
"async_timeout==3.0.1",
- "attrs==19.3.0",
+ "attrs>=19.3.0",
"bcrypt==3.1.7",
"certifi>=2019.11.28",
"ciso8601==2.1.3",
@@ -47,9 +47,9 @@ REQUIRES = [
"pip>=8.0.3",
"python-slugify==4.0.0",
"pytz>=2019.03",
- "pyyaml==5.3.1",
- "requests==2.23.0",
- "ruamel.yaml==0.15.100",
+ "pyyaml>=5.2",
+ "requests>=2.22",
+ "ruamel.yaml>=0.15.100",
"voluptuous==0.11.7",
"voluptuous-serialize==2.3.0",
]
--
2.25.1

19 changes: 12 additions & 7 deletions pkgs/servers/home-assistant/component-packages.nix
Expand Up @@ -2,7 +2,7 @@
# Do not edit!

{
version = "0.107.7";
version = "0.108.2";
components = {
"abode" = ps: with ps; [ ]; # missing inputs: abodepy
"acer_projector" = ps: with ps; [ pyserial];
Expand All @@ -16,7 +16,6 @@
"aladdin_connect" = ps: with ps; [ ]; # missing inputs: aladdin_connect
"alarm_control_panel" = ps: with ps; [ ];
"alarmdecoder" = ps: with ps; [ alarmdecoder];
"alarmdotcom" = ps: with ps; [ ]; # missing inputs: pyalarmdotcom
"alert" = ps: with ps; [ ];
"alexa" = ps: with ps; [ aiohttp-cors];
"almond" = ps: with ps; [ aiohttp-cors]; # missing inputs: pyalmond
Expand Down Expand Up @@ -84,6 +83,7 @@
"bluetooth_tracker" = ps: with ps; [ bt_proximity]; # missing inputs: pybluez
"bme280" = ps: with ps; [ ]; # missing inputs: i2csense smbus-cffi
"bme680" = ps: with ps; [ ]; # missing inputs: bme680 smbus-cffi
"bmp280" = ps: with ps; [ ]; # missing inputs: RPi.GPIO adafruit-circuitpython-bmp280
"bmw_connected_drive" = ps: with ps; [ ]; # missing inputs: bimmer_connected
"bom" = ps: with ps; [ ]; # missing inputs: bomradarloop
"braviatv" = ps: with ps; [ bravia-tv getmac];
Expand Down Expand Up @@ -156,7 +156,7 @@
"dialogflow" = ps: with ps; [ aiohttp-cors];
"digital_ocean" = ps: with ps; [ digital-ocean];
"digitalloggers" = ps: with ps; [ ]; # missing inputs: dlipower
"directv" = ps: with ps; [ ]; # missing inputs: directpy
"directv" = ps: with ps; [ ]; # missing inputs: directv
"discogs" = ps: with ps; [ discogs_client];
"discord" = ps: with ps; [ discordpy];
"discovery" = ps: with ps; [ netdisco];
Expand Down Expand Up @@ -372,6 +372,7 @@
"iota" = ps: with ps; [ ]; # missing inputs: pyota
"iperf3" = ps: with ps; [ ]; # missing inputs: iperf3
"ipma" = ps: with ps; [ ]; # missing inputs: pyipma
"ipp" = ps: with ps; [ ]; # missing inputs: pyipp
"iqvia" = ps: with ps; [ numpy]; # missing inputs: pyiqvia
"irish_rail_transport" = ps: with ps; [ ]; # missing inputs: pyirishrail
"islamic_prayer_times" = ps: with ps; [ ]; # missing inputs: prayer_times_calculator
Expand Down Expand Up @@ -431,7 +432,7 @@
"london_underground" = ps: with ps; [ ]; # missing inputs: london-tube-status
"loopenergy" = ps: with ps; [ ]; # missing inputs: pyloopenergy
"lovelace" = ps: with ps; [ ];
"luci" = ps: with ps; [ ]; # missing inputs: openwrt-luci-rpc
"luci" = ps: with ps; [ openwrt-luci-rpc];
"luftdaten" = ps: with ps; [ luftdaten];
"lupusec" = ps: with ps; [ ]; # missing inputs: lupupy
"lutron" = ps: with ps; [ ]; # missing inputs: pylutron
Expand Down Expand Up @@ -470,7 +471,7 @@
"mikrotik" = ps: with ps; [ ]; # missing inputs: librouteros
"mill" = ps: with ps; [ ]; # missing inputs: millheater
"min_max" = ps: with ps; [ ];
"minecraft_server" = ps: with ps; [ getmac]; # missing inputs: mcstatus
"minecraft_server" = ps: with ps; [ aiodns getmac]; # missing inputs: mcstatus
"minio" = ps: with ps; [ minio];
"mitemp_bt" = ps: with ps; [ ]; # missing inputs: mitemp_bt
"mjpeg" = ps: with ps; [ ];
Expand All @@ -481,7 +482,6 @@
"mold_indicator" = ps: with ps; [ ];
"monoprice" = ps: with ps; [ ]; # missing inputs: pymonoprice
"moon" = ps: with ps; [ ];
"mopar" = ps: with ps; [ ]; # missing inputs: motorparts
"mpchc" = ps: with ps; [ ];
"mpd" = ps: with ps; [ mpd2];
"mqtt" = ps: with ps; [ aiohttp-cors hbmqtt paho-mqtt];
Expand Down Expand Up @@ -512,7 +512,9 @@
"netgear_lte" = ps: with ps; [ ]; # missing inputs: eternalegypt
"netio" = ps: with ps; [ aiohttp-cors]; # missing inputs: pynetio
"neurio_energy" = ps: with ps; [ ]; # missing inputs: neurio
"nexia" = ps: with ps; [ ]; # missing inputs: nexia
"nextbus" = ps: with ps; [ ]; # missing inputs: py_nextbusnext
"nextcloud" = ps: with ps; [ ]; # missing inputs: nextcloudmonitor
"nfandroidtv" = ps: with ps; [ ];
"niko_home_control" = ps: with ps; [ ]; # missing inputs: niko-home-control
"nilu" = ps: with ps; [ ]; # missing inputs: niluclient
Expand Down Expand Up @@ -588,6 +590,7 @@
"plum_lightpad" = ps: with ps; [ ]; # missing inputs: plumlightpad
"pocketcasts" = ps: with ps; [ ]; # missing inputs: pocketcasts
"point" = ps: with ps; [ aiohttp-cors]; # missing inputs: pypoint
"powerwall" = ps: with ps; [ ]; # missing inputs: tesla-powerwall
"prezzibenzina" = ps: with ps; [ ]; # missing inputs: prezzibenzina-py
"proliphix" = ps: with ps; [ ]; # missing inputs: proliphix
"prometheus" = ps: with ps; [ aiohttp-cors prometheus_client];
Expand All @@ -604,6 +607,7 @@
"pushover" = ps: with ps; [ pushover-complete];
"pushsafer" = ps: with ps; [ ];
"pvoutput" = ps: with ps; [ ];
"pvpc_hourly_pricing" = ps: with ps; [ ]; # missing inputs: aiopvpc
"pyload" = ps: with ps; [ ];
"python_script" = ps: with ps; [ restrictedpython];
"qbittorrent" = ps: with ps; [ ]; # missing inputs: python-qbittorrent
Expand Down Expand Up @@ -660,6 +664,7 @@
"samsungtv" = ps: with ps; [ ]; # missing inputs: samsungctl[websocket] samsungtvws[websocket]
"satel_integra" = ps: with ps; [ ]; # missing inputs: satel_integra
"scene" = ps: with ps; [ ];
"schluter" = ps: with ps; [ ]; # missing inputs: py-schluter
"scrape" = ps: with ps; [ beautifulsoup4];
"script" = ps: with ps; [ ];
"scsgate" = ps: with ps; [ ]; # missing inputs: scsgate
Expand Down Expand Up @@ -692,7 +697,7 @@
"sky_hub" = ps: with ps; [ ];
"skybeacon" = ps: with ps; [ ]; # missing inputs: pygatt[GATTTOOL]
"skybell" = ps: with ps; [ ]; # missing inputs: skybellpy
"slack" = ps: with ps; [ ]; # missing inputs: slacker
"slack" = ps: with ps; [ ]; # missing inputs: slackclient
"sleepiq" = ps: with ps; [ ]; # missing inputs: sleepyq
"slide" = ps: with ps; [ ]; # missing inputs: goslide-api
"sma" = ps: with ps; [ ]; # missing inputs: pysma
Expand Down
19 changes: 6 additions & 13 deletions pkgs/servers/home-assistant/default.nix
Expand Up @@ -67,7 +67,7 @@ let
extraBuildInputs = extraPackages py.pkgs;

# Don't forget to run parse-requirements.py after updating
hassVersion = "0.107.7";
hassVersion = "0.108.2";

in with py.pkgs; buildPythonApplication rec {
pname = "homeassistant";
Expand All @@ -76,7 +76,7 @@ in with py.pkgs; buildPythonApplication rec {
disabled = pythonOlder "3.5";

patches = [
./relax-deps.patch
./0001-setup.py-relax-dependencies.patch
];

inherit availableComponents;
Expand All @@ -86,7 +86,7 @@ in with py.pkgs; buildPythonApplication rec {
owner = "home-assistant";
repo = "home-assistant";
rev = version;
sha256 = "1sr7vzsd4hpaix37bb10vbnnqs1v8ll2wb8m713qrvcp3crs6snk";
sha256 = "0v4i1ak7pkpycas0mzdmxgc42xgfymwx2b0a2a4h13c4z46pbs2l";
};

propagatedBuildInputs = [
Expand All @@ -99,23 +99,16 @@ in with py.pkgs; buildPythonApplication rec {
] ++ componentBuildInputs ++ extraBuildInputs;

checkInputs = [
asynctest pytest pytest-aiohttp requests-mock pydispatcher aiohue netdisco
hass-nabucasa defusedxml zeroconf
asynctest pytest pytest-aiohttp requests-mock hass-nabucasa netdisco pydispatcher
];

postPatch = ''
substituteInPlace setup.py \
--replace "aiohttp==3.6.1" "aiohttp" \
--replace "attrs==19.2.0" "attrs" \
--replace "ruamel.yaml==0.15.100" "ruamel.yaml"
'';

checkPhase = ''
# - components' dependencies are not included, so they cannot be tested
# - test_merge_id_schema requires pyqwikswitch
# - test_loader.py tries to load not-packaged dependencies
# - unclear why test_merge fails: assert merge_log_err.call_count != 0
# - test_setup_safe_mode_if_no_frontend: requires dependencies for components we have not packaged
py.test --ignore tests/components -k "not test_setup_safe_mode_if_no_frontend and not test_merge_id_schema and not test_merge"
py.test --ignore tests/components --ignore tests/test_loader.py -k "not test_setup_safe_mode_if_no_frontend and not test_merge_id_schema and not test_merge"
# Some basic components should be tested however
py.test \
Expand Down
4 changes: 2 additions & 2 deletions pkgs/servers/home-assistant/frontend.nix
Expand Up @@ -4,11 +4,11 @@ buildPythonPackage rec {
# the frontend version corresponding to a specific home-assistant version can be found here
# https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/frontend/manifest.json
pname = "home-assistant-frontend";
version = "20200318.0";
version = "20200407.2";

src = fetchPypi {
inherit pname version;
sha256 = "15by4wd3lpq1pd0hpx04v827i3xywsvxziqb1qrbsraxh1rvsbhz";
sha256 = "0krwn67bkybjb69daik6dki5hm36xs4nbfwqkh0q7ami1xr1f56d";
};

# no Python tests implemented
Expand Down
5 changes: 4 additions & 1 deletion pkgs/servers/home-assistant/parse-requirements.py
Expand Up @@ -36,7 +36,9 @@
# Use python3Packages.youtube-dl-light instead of python3Packages.youtube-dl
"youtube-dl": "youtube-dl-light",
"tensorflow-bin": "tensorflow",
"tensorflow-bin_2": "tensorflow",
"tensorflowWithoutCuda": "tensorflow",
"tensorflow-build_2": "tensorflow",
}


Expand Down Expand Up @@ -79,7 +81,8 @@ def parse_components(version: str = "master"):
# Recursively get the requirements of a component and its dependencies
def get_reqs(components, component):
requirements = set(components[component]["requirements"])
for dependency in components[component]["dependencies"]:
deps = components[component].get("dependencies", [])
for dependency in deps:
requirements.update(get_reqs(components, dependency))
return requirements

Expand Down
13 changes: 0 additions & 13 deletions pkgs/servers/home-assistant/relax-deps.patch

This file was deleted.

0 comments on commit 02becde

Please sign in to comment.