From e75cfd2174f24a133ed513e0d5facfbe1c3decb6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 28 Oct 2022 11:21:37 +0200 Subject: [PATCH] python310Packages.GitPython: 3.1.27 -> 3.1.29 --- .../python-modules/GitPython/default.nix | 33 ++++++++++--------- .../GitPython/hardcode-git-path.patch | 13 -------- 2 files changed, 18 insertions(+), 28 deletions(-) delete mode 100644 pkgs/development/python-modules/GitPython/hardcode-git-path.patch diff --git a/pkgs/development/python-modules/GitPython/default.nix b/pkgs/development/python-modules/GitPython/default.nix index 8d89c1af8d0c..e577a1e508a4 100644 --- a/pkgs/development/python-modules/GitPython/default.nix +++ b/pkgs/development/python-modules/GitPython/default.nix @@ -1,44 +1,47 @@ { lib , buildPythonPackage -, fetchFromGitHub -, substituteAll -, git -, gitdb , ddt +, fetchFromGitHub +, gitdb +, pkgs , pythonOlder +, substituteAll , typing-extensions }: buildPythonPackage rec { pname = "gitpython"; - version = "3.1.27"; + version = "3.1.29"; + format = "setuptools"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "gitpython-developers"; repo = "GitPython"; rev = version; - sha256 = "sha256-RA+6JFXHUQoXGErV8+aYuJPsfXzNSZK3kTm6eMbQIss="; + hash = "sha256-RNDBoGWnkirPZjxn5oqH3zwYqVFLedNrSRpZOHU0j+w="; }; - patches = [ - (substituteAll { - src = ./hardcode-git-path.patch; - inherit git; - }) - ]; - propagatedBuildInputs = [ - gitdb ddt + gitdb + pkgs.gitMinimal ] ++ lib.optionals (pythonOlder "3.10") [ typing-extensions ]; + postPatch = '' + substituteInPlace git/cmd.py \ + --replace 'git_exec_name = "git"' 'git_exec_name = "${pkgs.gitMinimal}/bin/git"' + ''; + # Tests require a git repo doCheck = false; - pythonImportsCheck = [ "git" ]; + pythonImportsCheck = [ + "git" + ]; meta = with lib; { description = "Python Git Library"; diff --git a/pkgs/development/python-modules/GitPython/hardcode-git-path.patch b/pkgs/development/python-modules/GitPython/hardcode-git-path.patch deleted file mode 100644 index 937479959926..000000000000 --- a/pkgs/development/python-modules/GitPython/hardcode-git-path.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/git/cmd.py b/git/cmd.py -index a4faefe..51ad442 100644 ---- a/git/cmd.py -+++ b/git/cmd.py -@@ -175,7 +175,7 @@ class Git(LazyMixin): - - # CONFIGURATION - -- git_exec_name = "git" # default that should work on linux and windows -+ git_exec_name = "@git@/bin/git" - - # Enables debugging of GitPython's git commands - GIT_PYTHON_TRACE = os.environ.get("GIT_PYTHON_TRACE", False)