Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / zimports / default.nix
blob22cd50c9189e7c29bfc4214b84b7151a1c616aae
1 { lib
2 , fetchFromGitHub
3 , buildPythonPackage
4 , flake8-import-order
5 , pyflakes
6 , tomli
7 , setuptools
8 , pytestCheckHook
9 , pythonAtLeast
10 , pythonOlder
13 buildPythonPackage rec {
14   pname = "zimports";
15   version = "0.6.1";
16   format = "setuptools";
18   # upstream technically support 3.7 through 3.9, but 3.10 happens to work while 3.11 breaks with an import error
19   disabled = pythonOlder "3.7" || pythonAtLeast "3.11";
21   src = fetchFromGitHub {
22     owner = "sqlalchemyorg";
23     repo = "zimports";
24     rev = "refs/tags/v${version}";
25     hash = "sha256-+sDvl8z0O0cZyS1oZgt924hlOkYeHiStpXL9y9+JZ5I=";
26   };
28   propagatedBuildInputs = [
29     flake8-import-order
30     pyflakes
31     setuptools
32     tomli
33   ];
35   nativeCheckInputs = [
36     pytestCheckHook
37   ];
39   pythonImportsCheck = [
40     "zimports"
41   ];
43   meta = with lib; {
44     description = "Python import rewriter";
45     homepage = "https://github.com/sqlalchemyorg/zimports";
46     license = licenses.mit;
47     maintainers = with maintainers; [ timokau ];
48   };