depot/third_party/nixpkgs/pkgs/development/python-modules/GitPython/default.nix
Default email 841d9c7fc1 Project import generated by Copybara.
GitOrigin-RevId: 3a8d7958a610cd3fec3a6f424480f91a1b259185
2021-06-29 00:13:55 +01:00

47 lines
886 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, isPy27
, substituteAll
, git
, gitdb
, ddt
, pythonOlder
, typing-extensions
}:
buildPythonPackage rec {
pname = "GitPython";
version = "3.1.18";
disabled = isPy27; # no longer supported
src = fetchPypi {
inherit pname version;
sha256 = "b838a895977b45ab6f0cc926a9045c8d1c44e2b653c1fcc39fe91f42c6e8f05b";
};
patches = [
(substituteAll {
src = ./hardcode-git-path.patch;
inherit git;
})
];
propagatedBuildInputs = [
gitdb
ddt
] ++ lib.optionals (pythonOlder "3.8") [
typing-extensions
];
# Tests require a git repo
doCheck = false;
pythonImportsCheck = [ "git" ];
meta = with lib; {
description = "Python Git Library";
homepage = "https://github.com/gitpython-developers/GitPython";
license = licenses.bsd3;
maintainers = with maintainers; [ fab ];
};
}