depot/third_party/nixpkgs/pkgs/development/python-modules/zimports/default.nix
Default email 81047829ea Project import generated by Copybara.
GitOrigin-RevId: 48d63e924a2666baf37f4f14a18f19347fbd54a2
2022-02-10 15:34:41 -05:00

46 lines
843 B
Nix

{ lib
, isPy3k
, fetchFromGitHub
, buildPythonPackage
, flake8-import-order
, pyflakes
, mock
, setuptools
}:
buildPythonPackage rec {
pname = "zimports";
version = "0.4.1";
src = fetchFromGitHub {
owner = "sqlalchemyorg";
repo = "zimports";
rev = "v${version}";
sha256 = "11mg7j7xiypv9hki4qbnp9jsgwgfdrgdzfqyrzk5x0s4hycgi4q0";
};
disabled = !isPy3k;
propagatedBuildInputs = [
pyflakes
flake8-import-order
setuptools
];
checkInputs = [
mock
];
checkPhase = ''
runHook preInstallCheck
PYTHONPATH= $out/bin/zimports --help >/dev/null
runHook postInstallCheck
'';
meta = with lib; {
description = "Python import rewriter";
homepage = "https://github.com/sqlalchemyorg/zimports";
license = licenses.mit;
maintainers = with maintainers; [ timokau ];
};
}