Merge pull request #134745 from bcdarwin/update-omegaconf

This commit is contained in:
Sandro 2021-08-25 13:08:19 +02:00 committed by GitHub
commit f5fd3649c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 19 deletions

View File

@ -1,24 +1,30 @@
{ lib, buildPythonPackage, fetchFromGitHub, isPy27, pytest, omegaconf, pathlib2 }:
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder, pytestCheckHook
, importlib-resources, omegaconf, jre_headless, antlr4-python3-runtime }:
buildPythonPackage rec {
pname = "hydra";
version = "0.11.3";
version = "1.1.1";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "facebookresearch";
repo = pname;
rev = version;
sha256 = "0plbls65qfrvvigza3qvy0pwjzgkz8ylpgb1im14k3b125ny41ad";
rev = "v${version}";
sha256 = "sha256:1svzysrjg47gb6lxx66fzd8wbhpbbsppprpbqssf5aqvhxgay3qk";
};
checkInputs = [ pytest ];
propagatedBuildInputs = [ omegaconf ] ++ lib.optional isPy27 pathlib2;
nativeBuildInputs = [ jre_headless ];
checkInputs = [ pytestCheckHook ];
propagatedBuildInputs = [ omegaconf antlr4-python3-runtime ]
++ lib.optionals (pythonOlder "3.9") [ importlib-resources ];
checkPhase = ''
runHook preCheck
pytest tests/
runHook postCheck
'';
# test environment setup broken under Nix for a few tests:
disabledTests = [
"test_bash_completion_with_dot_in_path"
"test_install_uninstall"
];
disabledTestPaths = [ "tests/test_hydra.py" ];
meta = with lib; {
description = "A framework for configuring complex applications";

View File

@ -1,20 +1,28 @@
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
, pytest, pytest-runner, pyyaml, six, pathlib2, isPy27 }:
{ lib, buildPythonPackage, fetchFromGitHub, pytest-mock, pytestCheckHook
, pyyaml, pythonOlder, jre_minimal, antlr4-python3-runtime }:
buildPythonPackage rec {
pname = "omegaconf";
version = "1.4.1";
version = "2.1.0";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "omry";
repo = pname;
rev = version;
sha256 = "1vpcdjlq54pm8xmkv2hqm2n1ysvz2a9iqgf55x0w6slrb4595cwb";
rev = "v${version}";
sha256 = "sha256-0aDlqPXELxQ/lnw4Hd9es8ldYhUP/TacH9AIyaffwnI=";
};
checkInputs = [ pytest ];
buildInputs = [ pytest-runner ];
propagatedBuildInputs = [ pyyaml six ] ++ lib.optional isPy27 pathlib2;
postPatch = ''
substituteInPlace setup.py --replace 'setup_requires=["pytest-runner"]' 'setup_requires=[]'
'';
checkInputs = [ pytestCheckHook pytest-mock ];
nativeBuildInputs = [ jre_minimal ];
propagatedBuildInputs = [ antlr4-python3-runtime pyyaml ];
disabledTestPaths = [ "tests/test_pydev_resolver_plugin.py" ]; # needs pydevd - not in Nixpkgs
meta = with lib; {
description = "A framework for configuring complex applications";