1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pytestCheckHook, 6 pythonOlder, 7 stdenv, 8}: 9 10buildPythonPackage rec { 11 pname = "aspy-refactor-imports"; 12 version = "3.0.1"; 13 format = "setuptools"; 14 disabled = pythonOlder "3.7"; 15 16 src = fetchFromGitHub { 17 owner = "asottile"; 18 repo = "aspy.refactor_imports"; 19 rev = "v${version}"; 20 sha256 = "MlCM3zNTQZJ1RWrTQG0AN28RUepWINKCeLENykbu2nw="; 21 }; 22 23 pythonImportsCheck = [ "aspy.refactor_imports" ]; 24 25 nativeCheckInputs = [ pytestCheckHook ]; 26 27 # fails on darwin due to case-insensitive file system 28 disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ "test_application_directory_case" ]; 29 30 meta = with lib; { 31 description = "Utilities for refactoring imports in python-like syntax"; 32 homepage = "https://github.com/asottile/aspy.refactor_imports"; 33 license = licenses.mit; 34 maintainers = with maintainers; [ gador ]; 35 }; 36}