at master 1.1 kB view raw
1{ 2 astor, 3 buildPythonPackage, 4 fetchFromGitHub, 5 hatchling, 6 lib, 7 pytestCheckHook, 8 pythonOlder, 9 tomli, 10}: 11 12buildPythonPackage rec { 13 pname = "flynt"; 14 version = "1.0.1"; 15 pyproject = true; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "ikamensh"; 21 repo = "flynt"; 22 tag = version; 23 hash = "sha256-UHY4UDBHcP3ARikktIehSUD3Dx8A0xpOnfKWWrLCsOY="; 24 }; 25 26 build-system = [ hatchling ]; 27 28 propagatedBuildInputs = [ astor ] ++ lib.optionals (pythonOlder "3.11") [ tomli ]; 29 30 nativeCheckInputs = [ pytestCheckHook ]; 31 32 pythonImportsCheck = [ "flynt" ]; 33 34 disabledTests = [ 35 # AssertionError 36 "test_fstringify" 37 "test_mixed_quote_types_unsafe" 38 ]; 39 40 meta = with lib; { 41 description = "Tool to automatically convert old string literal formatting to f-strings"; 42 homepage = "https://github.com/ikamensh/flynt"; 43 changelog = "https://github.com/ikamensh/flynt/blob/${version}/CHANGELOG.md"; 44 license = licenses.mit; 45 maintainers = with maintainers; [ cpcloud ]; 46 mainProgram = "flynt"; 47 }; 48}