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