Merge pull request #99986 from mweinelt/hass
home-assistant: 0.115.6 -> 0.116.2; python3Packages.voluptuous: 0.11.7 -> 0.12.0
This commit is contained in:
commit
81b664a0c6
@ -2,14 +2,17 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "voluptuous";
|
||||
version = "0.11.7";
|
||||
version = "0.12.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a";
|
||||
sha256 = "1p5j3fgbpqj31fajkaisdrz10ah9667sijz4kp3m0sbgw6ag4kis";
|
||||
};
|
||||
|
||||
checkInputs = [ nose ];
|
||||
checkPhase = ''
|
||||
nosetests
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Voluptuous is a Python data validation library";
|
||||
|
@ -1,17 +1,38 @@
|
||||
{ stdenv, fetchPypi, buildPythonPackage, future, enum-compat }:
|
||||
{ lib
|
||||
, fetchgit
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, enum-compat
|
||||
, future
|
||||
, ifaddr
|
||||
, mock
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "yeelight";
|
||||
version = "0.5.3";
|
||||
version = "0.5.4";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "8d49846f0cede1e312cbcd1d0e44c42073910bbcadb31b87ce2a7d24dea3af38";
|
||||
src = fetchgit {
|
||||
url = "https://gitlab.com/stavros/python-yeelight.git";
|
||||
rev = "119faeff0d4f9de8c7f6d0580bdecc1c79bcdaea"; # v0.5.4 wasn't tagged
|
||||
sha256 = "0j2c5pzd3kny7ghr9q7xn9vs8dffvyzz5igaavvvd04w7aph29sy";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ future enum-compat ];
|
||||
propagatedBuildInputs = [
|
||||
future
|
||||
ifaddr
|
||||
] ++ lib.optional (pythonOlder "3.4") enum-compat;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
] ++ lib.optional (pythonOlder "3.3") mock;
|
||||
|
||||
pytestFlagsArray = [ "yeelight/tests.py" ];
|
||||
|
||||
pythonImportsCheck = [ "yeelight" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Python library for controlling YeeLight RGB bulbs";
|
||||
homepage = "https://gitlab.com/stavros/python-yeelight/";
|
||||
license = licenses.asl20;
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Do not edit!
|
||||
|
||||
{
|
||||
version = "0.115.6";
|
||||
version = "0.116.2";
|
||||
components = {
|
||||
"abode" = ps: with ps; [ abodepy ];
|
||||
"accuweather" = ps: with ps; [ ]; # missing inputs: accuweather
|
||||
@ -303,6 +303,7 @@
|
||||
"glances" = ps: with ps; [ ]; # missing inputs: glances_api
|
||||
"gntp" = ps: with ps; [ ]; # missing inputs: gntp
|
||||
"goalfeed" = ps: with ps; [ ]; # missing inputs: pysher
|
||||
"goalzero" = ps: with ps; [ ]; # missing inputs: goalzero
|
||||
"gogogate2" = ps: with ps; [ ]; # missing inputs: gogogate2-api
|
||||
"google" = ps: with ps; [ google_api_python_client httplib2 oauth2client ];
|
||||
"google_assistant" = ps: with ps; [ aiohttp-cors ];
|
||||
@ -364,7 +365,7 @@
|
||||
"hunterdouglas_powerview" = ps: with ps; [ ]; # missing inputs: aiopvapi
|
||||
"hvv_departures" = ps: with ps; [ ]; # missing inputs: pygti
|
||||
"hydrawise" = ps: with ps; [ ]; # missing inputs: hydrawiser
|
||||
"hyperion" = ps: with ps; [ ];
|
||||
"hyperion" = ps: with ps; [ ]; # missing inputs: hyperion-py
|
||||
"ialarm" = ps: with ps; [ ]; # missing inputs: pyialarm
|
||||
"iammeter" = ps: with ps; [ ]; # missing inputs: iammeter
|
||||
"iaqualink" = ps: with ps; [ ]; # missing inputs: iaqualink
|
||||
@ -565,7 +566,8 @@
|
||||
"oem" = ps: with ps; [ ]; # missing inputs: oemthermostat
|
||||
"ohmconnect" = ps: with ps; [ defusedxml ];
|
||||
"ombi" = ps: with ps; [ ]; # missing inputs: pyombi
|
||||
"onboarding" = ps: with ps; [ aiohttp-cors pillow ];
|
||||
"omnilogic" = ps: with ps; [ ]; # missing inputs: omnilogic
|
||||
"onboarding" = ps: with ps; [ aiohttp-cors pillow ]; # missing inputs: home-assistant-frontend
|
||||
"onewire" = ps: with ps; [ ]; # missing inputs: pyownet
|
||||
"onkyo" = ps: with ps; [ onkyo-eiscp ];
|
||||
"onvif" = ps: with ps; [ ha-ffmpeg ]; # missing inputs: WSDiscovery onvif-zeep-async
|
||||
@ -682,6 +684,7 @@
|
||||
"rpi_gpio" = ps: with ps; [ ]; # missing inputs: RPi.GPIO
|
||||
"rpi_gpio_pwm" = ps: with ps; [ ]; # missing inputs: pwmled
|
||||
"rpi_pfio" = ps: with ps; [ ]; # missing inputs: pifacecommon pifacedigitalio
|
||||
"rpi_power" = ps: with ps; [ ]; # missing inputs: rpi-bad-power
|
||||
"rpi_rf" = ps: with ps; [ ]; # missing inputs: rpi-rf
|
||||
"rss_feed_template" = ps: with ps; [ aiohttp-cors ];
|
||||
"rtorrent" = ps: with ps; [ ];
|
||||
@ -762,7 +765,7 @@
|
||||
"spc" = ps: with ps; [ ]; # missing inputs: pyspcwebgw
|
||||
"speedtestdotnet" = ps: with ps; [ speedtest-cli ];
|
||||
"spider" = ps: with ps; [ ]; # missing inputs: spiderpy
|
||||
"splunk" = ps: with ps; [ ];
|
||||
"splunk" = ps: with ps; [ ]; # missing inputs: hass_splunk
|
||||
"spotcrime" = ps: with ps; [ ]; # missing inputs: spotcrime
|
||||
"spotify" = ps: with ps; [ aiohttp-cors spotipy ];
|
||||
"sql" = ps: with ps; [ sqlalchemy ];
|
||||
@ -809,7 +812,6 @@
|
||||
"tautulli" = ps: with ps; [ ]; # missing inputs: pytautulli
|
||||
"tcp" = ps: with ps; [ ];
|
||||
"ted5000" = ps: with ps; [ xmltodict ];
|
||||
"teksavvy" = ps: with ps; [ ];
|
||||
"telegram" = ps: with ps; [ pysocks aiohttp-cors python-telegram-bot ];
|
||||
"telegram_bot" = ps: with ps; [ pysocks aiohttp-cors python-telegram-bot ];
|
||||
"tellduslive" = ps: with ps; [ ]; # missing inputs: tellduslive
|
||||
@ -957,6 +959,7 @@
|
||||
"zha" = ps: with ps; [ bellows pyserial zha-quirks zigpy-cc zigpy-deconz zigpy-xbee zigpy-zigate zigpy ]; # missing inputs: zigpy-znp
|
||||
"zhong_hong" = ps: with ps; [ ]; # missing inputs: zhong_hong_hvac
|
||||
"ziggo_mediabox_xl" = ps: with ps; [ ]; # missing inputs: ziggo-mediabox-xl
|
||||
"zodiac" = ps: with ps; [ ];
|
||||
"zone" = ps: with ps; [ ];
|
||||
"zoneminder" = ps: with ps; [ zm-py ];
|
||||
"zwave" = ps: with ps; [ homeassistant-pyozw pydispatcher ];
|
||||
|
@ -10,30 +10,29 @@
|
||||
# self: super: { pkg = super.pkg.overridePythonAttrs (oldAttrs: { ... }); }
|
||||
# Applied after defaultOverrides
|
||||
, packageOverrides ? self: super: {
|
||||
# TODO: Remove this override after updating to cryptography 2.8:
|
||||
|
||||
}
|
||||
|
||||
# Skip pip install of required packages on startup
|
||||
, skipPip ? true }:
|
||||
|
||||
let
|
||||
|
||||
defaultOverrides = [
|
||||
# Override the version of some packages pinned in Home Assistant's setup.py
|
||||
|
||||
# required by the sun/moon plugins
|
||||
# Pinned due to API changes in astral>=2.0, required by the sun/moon plugins
|
||||
# https://github.com/home-assistant/core/issues/36636
|
||||
(mkOverride "astral" "1.10.1"
|
||||
"d2a67243c4503131c856cafb1b1276de52a86e5b8a1d507b7e08bee51cb67bf1")
|
||||
|
||||
# We have 3.x in nixpkgs which is incompatible with home-assistant atm:
|
||||
# https://github.com/home-assistant/core/blob/dev/requirements_all.txt
|
||||
# Pinned due to an API change in pyowm>=3.0
|
||||
# Remove after https://github.com/home-assistant/core/pull/39839 gets merged
|
||||
(mkOverride "pyowm" "2.10.0"
|
||||
"1xvcv3sbcn9na8cwz21nnjlixysfk5lymnf65d1nqkbgacc1mm4g")
|
||||
|
||||
(mkOverride "bcrypt" "3.1.7"
|
||||
"0hhywhxx301cxivgxrpslrangbfpccc8y83qbwn1f57cab3nj00b")
|
||||
# Pinned, because v1.5.0 broke the google_translate integration
|
||||
# https://github.com/home-assistant/core/pull/38428
|
||||
(mkOverride "yarl" "1.4.2"
|
||||
"0jzpgrdl6415zzl8js7095q8ks14555lhgxah76mimffkr39rkaq")
|
||||
|
||||
# hass-frontend does not exist in python3.pkgs
|
||||
(self: super: {
|
||||
@ -68,18 +67,14 @@ let
|
||||
extraBuildInputs = extraPackages py.pkgs;
|
||||
|
||||
# Don't forget to run parse-requirements.py after updating
|
||||
hassVersion = "0.115.6";
|
||||
hassVersion = "0.116.2";
|
||||
|
||||
in with py.pkgs; buildPythonApplication rec {
|
||||
pname = "homeassistant";
|
||||
version = assert (componentPackages.version == hassVersion); hassVersion;
|
||||
|
||||
disabled = pythonOlder "3.5";
|
||||
|
||||
patches = [
|
||||
./relax-dependencies.patch
|
||||
./fix-media-path-test.patch
|
||||
];
|
||||
# check REQUIRED_PYTHON_VER in homeassistant/const.py
|
||||
disabled = pythonOlder "3.7.1";
|
||||
|
||||
inherit availableComponents;
|
||||
|
||||
@ -88,50 +83,108 @@ in with py.pkgs; buildPythonApplication rec {
|
||||
owner = "home-assistant";
|
||||
repo = "core";
|
||||
rev = version;
|
||||
sha256 = "07j54glcpa5ngkr0pwdg44f8gas3jz3nh653mr5sb5wg7xspgcr8";
|
||||
sha256 = "0q4yqcikkph05mkvg160664lyf0f1qkpm7yc6kh9hgigambxi0yp";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
# Fix group tests when run in parallel, remove >= 0.117.0
|
||||
url = "https://github.com/home-assistant/core/pull/41446/commits/c79dc478b7136b6df43707bf0ad6b53419c8a909.patch";
|
||||
sha256 = "1cl81swq960vd2f733dcqq60c0jjzrkm0l2sibcblhmyw597b4vj";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "yarl==1.4.2" "yarl~=1.4"
|
||||
--replace "bcrypt==3.1.7" "bcrypt>=3.1.7" \
|
||||
--replace "cryptography==2.9.2" "cryptography" \
|
||||
--replace "ruamel.yaml==0.15.100" "ruamel.yaml>=0.15.100"
|
||||
substituteInPlace tests/test_config.py --replace '"/usr"' '"/build/media"'
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
# From setup.py
|
||||
aiohttp astral async-timeout attrs bcrypt certifi importlib-metadata jinja2
|
||||
aiohttp astral async-timeout attrs bcrypt certifi ciso8601 jinja2
|
||||
pyjwt cryptography pip python-slugify pytz pyyaml requests ruamel_yaml
|
||||
setuptools voluptuous voluptuous-serialize
|
||||
# From frontend, image, http and recorder components and auth.mfa_modules.totp
|
||||
sqlalchemy aiohttp-cors hass-frontend pillow pyotp pyqrcode ciso8601
|
||||
setuptools voluptuous voluptuous-serialize yarl
|
||||
# From default_config. frontend, http, image, mobile_app and recorder components as well as
|
||||
# the auth.mfa_modules.totp module
|
||||
aiohttp-cors defusedxml distro emoji hass-frontend pynacl pillow pyotp
|
||||
pyqrcode sqlalchemy
|
||||
] ++ componentBuildInputs ++ extraBuildInputs;
|
||||
|
||||
# upstream only tests on Linux, so do we.
|
||||
doCheck = stdenv.isLinux;
|
||||
|
||||
checkInputs = [
|
||||
asynctest pytest pytest-aiohttp requests-mock hass-nabucasa netdisco pydispatcher
|
||||
asynctest pytestCheckHook pytest-aiohttp pytest_xdist requests-mock hass-nabucasa netdisco pydispatcher
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
# We cannot test all components, since they'd introduce lots of dependencies, some of which are unpackaged,
|
||||
# but we should test very common stuff, like what's in `default_config`.
|
||||
componentTests = [
|
||||
"api"
|
||||
"automation"
|
||||
"config"
|
||||
"configurator"
|
||||
"default_config"
|
||||
"demo"
|
||||
"discovery"
|
||||
"frontend"
|
||||
"group"
|
||||
"history"
|
||||
"homeassistant"
|
||||
"http"
|
||||
"input_boolean"
|
||||
"input_datetime"
|
||||
"input_text"
|
||||
"input_number"
|
||||
"input_select"
|
||||
"logbook"
|
||||
"logger"
|
||||
"media_source"
|
||||
"mobile_app"
|
||||
"person"
|
||||
"scene"
|
||||
"script"
|
||||
"shell_command"
|
||||
"ssdp"
|
||||
"sun"
|
||||
"system_health"
|
||||
"system_log"
|
||||
"tag"
|
||||
"websocket_api"
|
||||
"zeroconf"
|
||||
"zone"
|
||||
];
|
||||
|
||||
pytestFlagsArray = [
|
||||
"-n auto"
|
||||
# don't bulk test all components
|
||||
"--ignore tests/components"
|
||||
# prone to race conditions due to parallel file access
|
||||
"--ignore tests/test_config.py"
|
||||
# tries to import unpackaged dependencies
|
||||
"--ignore tests/test_loader.py"
|
||||
# pyotp since v2.4.0 complains about the short mock keys, hass pins v2.3.0
|
||||
"--ignore tests/auth/mfa_modules/test_notify.py"
|
||||
"tests"
|
||||
] ++ map (component: "tests/components/" + component) componentTests;
|
||||
|
||||
disabledTests = [
|
||||
# AssertionError: merge_log_err.call_count != 0
|
||||
"test_merge"
|
||||
# ModuleNotFoundError: No module named 'pyqwikswitch'
|
||||
"test_merge_id_schema"
|
||||
# AssertionError: assert 'unknown' == 'not_home'
|
||||
"test_device_tracker_not_home"
|
||||
# Racy https://github.com/home-assistant/core/issues/41425
|
||||
"test_cached_event_message"
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
# the tests require the existance of a media dir
|
||||
mkdir /build/media
|
||||
|
||||
# - 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
|
||||
# - test_notify pyotp doesn't like the short mock keys
|
||||
# - 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 \
|
||||
--ignore tests/test_loader.py \
|
||||
--ignore tests/auth/mfa_modules/test_notify.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 \
|
||||
tests/components/{api,config,configurator,demo,discovery,frontend,group,history} \
|
||||
tests/components/{homeassistant,http,logger,script,shell_command,system_log,websocket_api}
|
||||
'';
|
||||
|
||||
makeWrapperArgs = lib.optional skipPip "--add-flags --skip-pip";
|
||||
|
@ -1,24 +0,0 @@
|
||||
diff --git a/tests/test_config.py b/tests/test_config.py
|
||||
index fb22ee1118..1b87e32fe7 100644
|
||||
--- a/tests/test_config.py
|
||||
+++ b/tests/test_config.py
|
||||
@@ -440,7 +440,7 @@ async def test_loading_configuration(hass):
|
||||
"allowlist_external_dirs": "/etc",
|
||||
"external_url": "https://www.example.com",
|
||||
"internal_url": "http://example.local",
|
||||
- "media_dirs": {"mymedia": "/usr"},
|
||||
+ "media_dirs": {"mymedia": "/build/media"},
|
||||
},
|
||||
)
|
||||
|
||||
@@ -454,8 +454,8 @@ async def test_loading_configuration(hass):
|
||||
assert hass.config.internal_url == "http://example.local"
|
||||
assert len(hass.config.allowlist_external_dirs) == 3
|
||||
assert "/etc" in hass.config.allowlist_external_dirs
|
||||
- assert "/usr" in hass.config.allowlist_external_dirs
|
||||
- assert hass.config.media_dirs == {"mymedia": "/usr"}
|
||||
+ assert "/build/media" in hass.config.allowlist_external_dirs
|
||||
+ assert hass.config.media_dirs == {"mymedia": "/build/media"}
|
||||
assert hass.config.config_source == config_util.SOURCE_YAML
|
||||
|
||||
|
@ -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 = "20200918.2";
|
||||
version = "20201001.2";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1gmk5rbfyqanj30dinfphxrsji4l1yiya2p0ahybyjb9fbzz9cl4";
|
||||
sha256 = "1wyac980d8j8bk4bzh9y3a5c4xqfn3062wj5m45kwsx1f5rfx26j";
|
||||
};
|
||||
|
||||
# no Python tests implemented
|
||||
|
@ -1,21 +0,0 @@
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 81f8727ed6..12200e0b9f 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -43,13 +43,13 @@ REQUIRES = [
|
||||
"jinja2>=2.11.1",
|
||||
"PyJWT==1.7.1",
|
||||
# PyJWT has loose dependency. We want the latest one.
|
||||
- "cryptography==2.9.2",
|
||||
+ "cryptography>=2.9.2",
|
||||
"pip>=8.0.3",
|
||||
"python-slugify==4.0.1",
|
||||
"pytz>=2020.1",
|
||||
"pyyaml==5.3.1",
|
||||
- "requests==2.24.0",
|
||||
- "ruamel.yaml==0.15.100",
|
||||
+ "requests>=2.23.0",
|
||||
+ "ruamel.yaml>=0.15.100",
|
||||
"voluptuous==0.11.7",
|
||||
"voluptuous-serialize==2.4.0",
|
||||
"yarl==1.4.2",
|
Loading…
Reference in New Issue
Block a user