summary refs log tree commit diff
path: root/pkgs/development/python-modules/aspy-refactor-imports/default.nix
blob: cfe935e16e8082c5bbde78d153623d8ac71b38d9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, stdenv
}:

buildPythonPackage rec {
  pname = "aspy-refactor-imports";
  version = "3.0.1";
  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "asottile";
    repo = "aspy.refactor_imports";
    rev = "v${version}";
    sha256 = "MlCM3zNTQZJ1RWrTQG0AN28RUepWINKCeLENykbu2nw=";
  };

  pythonImportsCheck = [
    "aspy.refactor_imports"
  ];

  checkInputs = [
    pytestCheckHook
  ];

  # fails on darwin due to case-insensitive file system
  disabledTests = lib.optional stdenv.isDarwin ["test_application_directory_case"];

  meta = with lib; {
    description = "Utilities for refactoring imports in python-like syntax.";
    homepage = "https://github.com/asottile/aspy.refactor_imports";
    license = licenses.mit;
    maintainers = with maintainers; [ gador ];
  };
}