about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2023-11-21 10:00:41 +0100
committerFabian Affolter <mail@fabian-affolter.ch>2023-11-21 10:00:41 +0100
commitb85425359ebbee345827753c6a385a91492af904 (patch)
treef95c1738f286c73fd569bf42a6bfa75756f7b0c6
parent80ed3a195e9b2d429f49432b59fea4e75f949faf (diff)
downloadnixlib-b85425359ebbee345827753c6a385a91492af904.tar
nixlib-b85425359ebbee345827753c6a385a91492af904.tar.gz
nixlib-b85425359ebbee345827753c6a385a91492af904.tar.bz2
nixlib-b85425359ebbee345827753c6a385a91492af904.tar.lz
nixlib-b85425359ebbee345827753c6a385a91492af904.tar.xz
nixlib-b85425359ebbee345827753c6a385a91492af904.tar.zst
nixlib-b85425359ebbee345827753c6a385a91492af904.zip
python311Packages.gitdb: refactor
-rw-r--r--pkgs/development/python-modules/gitdb/default.nix46
1 files changed, 35 insertions, 11 deletions
diff --git a/pkgs/development/python-modules/gitdb/default.nix b/pkgs/development/python-modules/gitdb/default.nix
index a4586e153192..dc6be575153c 100644
--- a/pkgs/development/python-modules/gitdb/default.nix
+++ b/pkgs/development/python-modules/gitdb/default.nix
@@ -1,33 +1,57 @@
 { lib
 , buildPythonPackage
 , fetchPypi
+, pytestCheckHook
+, pythonOlder
+, setuptools
 , smmap
-, isPy3k
 }:
 
 buildPythonPackage rec {
   pname = "gitdb";
   version = "4.0.11";
-  disabled = !isPy3k;
+  pyproject = true;
+
+  disabled = pythonOlder "3.8";
 
   src = fetchPypi {
     inherit pname version;
     hash = "sha256-v1QhEmE21tCvVbwefBrxw5ejT1t71553bNPol4XCsEs=";
   };
 
-  propagatedBuildInputs = [ smmap ];
+  nativeBuildInputs = [
+    setuptools
+  ];
+
+  propagatedBuildInputs = [
+    smmap
+  ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+  ];
 
-  postPatch = ''
-    substituteInPlace setup.py --replace ",<4" ""
-  '';
+  pythonImportsCheck = [
+    "gitdb"
+  ];
 
-  # Bunch of tests fail because they need an actual git repo
-  doCheck = false;
+  disabledTests = [
+    # Tests need part which are not shipped with PyPI releases
+    "test_base"
+    "test_reading"
+    "test_writing"
+    "test_correctness"
+    "test_loose_correctness"
+    "test_pack_random_access"
+    "test_pack_writing"
+    "test_stream_reading"
+  ];
 
-  meta = {
+  meta = with lib; {
     description = "Git Object Database";
-    maintainers = [ ];
     homepage = "https://github.com/gitpython-developers/gitdb";
-    license = lib.licenses.bsd3;
+    changelog = "https://github.com/gitpython-developers/gitdb/releases/tag/${version}";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ ];
   };
 }