nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 48 lines 892 B view raw
1{ lib 2, isPy27 3, buildPythonPackage 4, fetchPypi 5, setuptools-scm 6, importlib-metadata 7, typing ? null 8, pythonOlder 9, python 10}: 11 12buildPythonPackage rec { 13 pname = "importlib-resources"; 14 version = "5.6.0"; 15 format = "pyproject"; 16 disabled = isPy27; 17 18 src = fetchPypi { 19 pname = "importlib_resources"; 20 inherit version; 21 sha256 = "sha256-G5MjjL8jtM3jQkDdgyHZnpvy60vJHAyZsohig+e6rYU="; 22 }; 23 24 nativeBuildInputs = [ 25 setuptools-scm 26 ]; 27 28 propagatedBuildInputs = [ 29 importlib-metadata 30 ] ++ lib.optional (pythonOlder "3.5") [ 31 typing 32 ]; 33 34 checkPhase = '' 35 ${python.interpreter} -m unittest discover 36 ''; 37 38 pythonImportsCheck = [ 39 "importlib_resources" 40 ]; 41 42 meta = with lib; { 43 description = "Read resources from Python packages"; 44 homepage = "https://importlib-resources.readthedocs.io/"; 45 license = licenses.asl20; 46 maintainers = [ ]; 47 }; 48}