python3Packages.ncclient: cleanup, fix hash (#443164)

authored by dotlambda and committed by GitHub 14e96035 a9aec6b8

+17 -7
+5
pkgs/development/python-modules/dynaconf/default.nix
··· 59 versionCheckHook 60 ]; 61 62 disabledTestPaths = [ 63 # import file mismatch 64 # imported module 'app_test' has this __file__ attribute:
··· 59 versionCheckHook 60 ]; 61 62 + disabledTests = [ 63 + # AssertionError: assert 42.1 == 'From development env' 64 + "test_envless_load_file" 65 + ]; 66 + 67 disabledTestPaths = [ 68 # import file mismatch 69 # imported module 'app_test' has this __file__ attribute:
+12 -7
pkgs/development/python-modules/ncclient/default.nix
··· 6 paramiko, 7 setuptools, 8 pytestCheckHook, 9 - pythonOlder, 10 }: 11 12 buildPythonPackage rec { ··· 14 version = "0.7.0"; 15 pyproject = true; 16 17 - disabled = pythonOlder "3.7"; 18 - 19 src = fetchFromGitHub { 20 owner = "ncclient"; 21 repo = "ncclient"; 22 tag = "v${version}"; 23 - hash = "sha256-GSa7UkBwbwggFqwNFTg2KNqGV5412EE41ma/dzPIEuU="; 24 }; 25 26 build-system = [ ··· 36 37 pythonImportsCheck = [ "ncclient" ]; 38 39 - meta = with lib; { 40 description = "Python library for NETCONF clients"; 41 homepage = "https://github.com/ncclient/ncclient"; 42 changelog = "https://github.com/ncclient/ncclient/releases/tag/${src.tag}"; 43 - license = licenses.asl20; 44 - maintainers = with maintainers; [ xnaveira ]; 45 }; 46 }
··· 6 paramiko, 7 setuptools, 8 pytestCheckHook, 9 }: 10 11 buildPythonPackage rec { ··· 13 version = "0.7.0"; 14 pyproject = true; 15 16 src = fetchFromGitHub { 17 owner = "ncclient"; 18 repo = "ncclient"; 19 tag = "v${version}"; 20 + # Upstream uses .gitattributes to inject information about the revision 21 + # hash and the refname into `ncclient/_version.py`, see: 22 + # 23 + # - https://git-scm.com/docs/gitattributes#_export_subst and 24 + # - https://github.com/ncclient/ncclient/blob/e056e38af2843de0608da58e2f4662465c96d587/ncclient/_version.py#L25-L28 25 + postFetch = '' 26 + sed -i 's/git_refnames = "[^"]*"/git_refnames = " (tag: ${src.tag})"/' $out/ncclient/_version.py 27 + ''; 28 + hash = "sha256-vSX+9nTl4r6vnP/vmavdmdChzOC8P2G093/DQNMQwS4="; 29 }; 30 31 build-system = [ ··· 41 42 pythonImportsCheck = [ "ncclient" ]; 43 44 + meta = { 45 description = "Python library for NETCONF clients"; 46 homepage = "https://github.com/ncclient/ncclient"; 47 changelog = "https://github.com/ncclient/ncclient/releases/tag/${src.tag}"; 48 + license = lib.licenses.asl20; 49 + maintainers = with lib.maintainers; [ xnaveira ]; 50 }; 51 }