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 59 versionCheckHook 60 60 ]; 61 61 62 + disabledTests = [ 63 + # AssertionError: assert 42.1 == 'From development env' 64 + "test_envless_load_file" 65 + ]; 66 + 62 67 disabledTestPaths = [ 63 68 # import file mismatch 64 69 # imported module 'app_test' has this __file__ attribute:
+12 -7
pkgs/development/python-modules/ncclient/default.nix
··· 6 6 paramiko, 7 7 setuptools, 8 8 pytestCheckHook, 9 - pythonOlder, 10 9 }: 11 10 12 11 buildPythonPackage rec { ··· 14 13 version = "0.7.0"; 15 14 pyproject = true; 16 15 17 - disabled = pythonOlder "3.7"; 18 - 19 16 src = fetchFromGitHub { 20 17 owner = "ncclient"; 21 18 repo = "ncclient"; 22 19 tag = "v${version}"; 23 - hash = "sha256-GSa7UkBwbwggFqwNFTg2KNqGV5412EE41ma/dzPIEuU="; 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="; 24 29 }; 25 30 26 31 build-system = [ ··· 36 41 37 42 pythonImportsCheck = [ "ncclient" ]; 38 43 39 - meta = with lib; { 44 + meta = { 40 45 description = "Python library for NETCONF clients"; 41 46 homepage = "https://github.com/ncclient/ncclient"; 42 47 changelog = "https://github.com/ncclient/ncclient/releases/tag/${src.tag}"; 43 - license = licenses.asl20; 44 - maintainers = with maintainers; [ xnaveira ]; 48 + license = lib.licenses.asl20; 49 + maintainers = with lib.maintainers; [ xnaveira ]; 45 50 }; 46 51 }