Merge pull request #270456 from mweinelt/hass-cleanup

home-assistant: some clean up

authored by Martin Weinelt and committed by GitHub c76b72ca f72ea957

+26 -37
+26 -37
pkgs/servers/home-assistant/default.nix
··· 352 352 }; 353 353 354 354 nativeBuildInputs = with python.pkgs; [ 355 + pythonRelaxDepsHook 355 356 setuptools 356 357 wheel 357 358 ]; 358 359 360 + pythonRelaxDeps = [ 361 + "aiohttp" 362 + "attrs" 363 + "awesomeversion" 364 + "bcrypt" 365 + "ciso8601" 366 + "cryptography" 367 + "home-assistant-bluetooth" 368 + "httpx" 369 + "ifaddr" 370 + "orjson" 371 + "pip" 372 + "PyJWT" 373 + "pyOpenSSL" 374 + "PyYAML" 375 + "requests" 376 + "typing-extensions" 377 + "voluptuous-serialize" 378 + "yarl" 379 + ]; 380 + 359 381 # copy tests early, so patches apply as they would to the git repo 360 382 prePatch = '' 361 383 cp --no-preserve=mode --recursive ${gitSrc}/tests ./ ··· 374 396 }) 375 397 ]; 376 398 377 - postPatch = let 378 - relaxedConstraints = [ 379 - "aiohttp" 380 - "attrs" 381 - "awesomeversion" 382 - "bcrypt" 383 - "ciso8601" 384 - "cryptography" 385 - "home-assistant-bluetooth" 386 - "httpx" 387 - "ifaddr" 388 - "orjson" 389 - "pip" 390 - "PyJWT" 391 - "pyOpenSSL" 392 - "PyYAML" 393 - "requests" 394 - "typing-extensions" 395 - "voluptuous-serialize" 396 - "yarl" 397 - ]; 398 - in '' 399 - sed -r -i \ 400 - ${lib.concatStringsSep "\n" (map (package: 401 - ''-e 's/${package}[<>=]+.*/${package}",/g' \'' 402 - ) relaxedConstraints)} 403 - pyproject.toml 399 + postPatch = '' 404 400 substituteInPlace tests/test_config.py --replace '"/usr"' '"/build/media"' 405 401 406 402 sed -i 's/setuptools[~=]/setuptools>/' pyproject.toml ··· 436 432 voluptuous 437 433 voluptuous-serialize 438 434 yarl 435 + # REQUIREMENTS in homeassistant/auth/mfa_modules/totp.py and homeassistant/auth/mfa_modules/notify.py 436 + pyotp 437 + pyqrcode 439 438 # Implicit dependency via homeassistant/requirements.py 440 439 setuptools 441 440 ]; ··· 462 461 respx 463 462 syrupy 464 463 tomli 465 - # required through tests/auth/mfa_modules/test_otp.py 466 - pyotp 467 464 # Sneakily imported in tests/conftest.py 468 465 paho-mqtt 469 466 ] ++ lib.concatMap (component: getPackages component python.pkgs) [ 470 467 # some components are needed even if tests in tests/components are disabled 471 468 "default_config" 472 469 "hue" 473 - # for tests/test_config.py::test_merge_id_schema 474 - "qwikswitch" 475 470 ]; 476 471 477 472 pytestFlagsArray = [ ··· 484 479 "--showlocals" 485 480 # AssertionError: assert 1 == 0 486 481 "--deselect tests/test_config.py::test_merge" 487 - # AssertionError: assert 2 == 1 488 - "--deselect=tests/helpers/test_translation.py::test_caching" 489 - # AssertionError: assert None == RegistryEntry 490 - "--deselect=tests/helpers/test_entity_registry.py::test_get_or_create_updates_data" 491 - # AssertionError: assert 2 == 1 492 - "--deselect=tests/helpers/test_entity_values.py::test_override_single_value" 493 482 # AssertionError: assert 'WARNING' not in '2023-11-10 ...nt abc[L]>\n'" 494 483 "--deselect=tests/helpers/test_script.py::test_multiple_runs_repeat_choose" 495 484 # tests are located in tests/