about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/argcomplete/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/argcomplete/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/argcomplete/default.nix32
1 files changed, 16 insertions, 16 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/argcomplete/default.nix b/nixpkgs/pkgs/development/python-modules/argcomplete/default.nix
index 9725d8b92bd8..cc0ae612ce55 100644
--- a/nixpkgs/pkgs/development/python-modules/argcomplete/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/argcomplete/default.nix
@@ -1,33 +1,33 @@
 { lib
 , buildPythonPackage
-, fetchPypi
-, pexpect
+, fetchFromGitHub
 , pythonOlder
+, setuptools
+, setuptools-scm
 }:
 
 buildPythonPackage rec {
   pname = "argcomplete";
-  version = "2.1.1";
-  format = "setuptools";
+  version = "3.1.1";
+  format = "pyproject";
 
-  disabled = pythonOlder "3.7";
+  disabled = pythonOlder "3.8";
 
-  src = fetchPypi {
-    inherit pname version;
-    hash = "sha256-cuCDQIUtMlREWcDBmq0bSKosOpbejG5XQkVrT1OMpS8=";
+  src = fetchFromGitHub {
+    owner = "kislyuk";
+    repo = pname;
+    rev = "refs/tags/v${version}";
+    hash = "sha256-N1Us/dpF/y638qIuwTzBiuv4vXfBMtWxmQnMBxNTUuc=";
   };
 
-  postPatch = ''
-    substituteInPlace setup.py \
-      --replace '"coverage",' "" \
-      --replace " + lint_require" ""
-  '';
+  SETUPTOOLS_SCM_PRETEND_VERSION = version;
 
-  propagatedBuildInputs = [
-    pexpect
+  nativeBuildInputs = [
+    setuptools
+    setuptools-scm
   ];
 
-  # tries to build and install test packages which fails
+  # Tries to build and install test packages which fails
   doCheck = false;
 
   pythonImportsCheck = [