writers: add writeGuile[Bin] (#364531)
[NixPkgs.git] / pkgs / development / python-modules / zimports / default.nix
blobf5d50241a881078bc465d1c70be560300c93653d
2   lib,
3   fetchFromGitHub,
4   buildPythonPackage,
5   flake8-import-order,
6   pyflakes,
7   tomli,
8   setuptools,
9   pytestCheckHook,
10   pythonAtLeast,
11   pythonOlder,
14 buildPythonPackage rec {
15   pname = "zimports";
16   version = "0.6.1";
17   format = "setuptools";
19   # upstream technically support 3.7 through 3.9, but 3.10 happens to work while 3.11 breaks with an import error
20   disabled = pythonOlder "3.7" || pythonAtLeast "3.11";
22   src = fetchFromGitHub {
23     owner = "sqlalchemyorg";
24     repo = "zimports";
25     rev = "refs/tags/v${version}";
26     hash = "sha256-+sDvl8z0O0cZyS1oZgt924hlOkYeHiStpXL9y9+JZ5I=";
27   };
29   propagatedBuildInputs = [
30     flake8-import-order
31     pyflakes
32     setuptools
33     tomli
34   ];
36   nativeCheckInputs = [ pytestCheckHook ];
38   pythonImportsCheck = [ "zimports" ];
40   meta = with lib; {
41     description = "Python import rewriter";
42     homepage = "https://github.com/sqlalchemyorg/zimports";
43     license = licenses.mit;
44     maintainers = with maintainers; [ timokau ];
45   };