summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2023-11-25 09:19:55 +0100
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2023-11-26 04:52:43 +0000
commitb44ebb5f50ff851a80a6c6d5208e77150aaf2d3d (patch)
tree8bf63a9735e25602c452cb80f1b33e967b55416a /pkgs/development
parentd572fb05455ec85f5cf2fa069784be09f97de941 (diff)
python311Packages.uri-template: 1.2.0 -> 1.3.0
Diff: https://github.com/plinss/uri_template/compare/refs/tags/v1.2.0...v1.3.0
(cherry picked from commit 6011769ece3bd2b43bf9763a3bd2a54e2d930383)
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/uri-template/default.nix33
1 files changed, 24 insertions, 9 deletions
diff --git a/pkgs/development/python-modules/uri-template/default.nix b/pkgs/development/python-modules/uri-template/default.nix
index db7dc602aea05..7bebffce194a3 100644
--- a/pkgs/development/python-modules/uri-template/default.nix
+++ b/pkgs/development/python-modules/uri-template/default.nix
@@ -1,30 +1,45 @@
-{ lib, buildPythonPackage, fetchFromGitHub, python }:
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, python
+, pythonOlder
+, setuptools
+, setuptools-scm
+}:
 
 buildPythonPackage rec {
   pname = "uri-template";
-  version = "1.2.0";
+  version = "1.3.0";
+  pyproject = true;
+
+  disabled = pythonOlder "3.7";
 
   src = fetchFromGitHub {
     owner = "plinss";
     repo = "uri_template";
-    rev = "v${version}";
-    hash = "sha256-IAq6GpEwimq45FU0QugLZLSOhwAmC1KbpZKD0zyxsUs=";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-38HFFqM6yfpsPrhIpE639ePy/NbLqKw7gbnE3y8sL3w=";
   };
 
-  postPatch = ''
-    sed -i -e 's/0.0.0/${version}/' setup.py
-  '';
+  env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
+
+  nativeBuildInputs = [
+    setuptools
+    setuptools-scm
+  ];
 
   checkPhase = ''
     ${python.interpreter} test.py
   '';
 
-  pythonImportsCheck = [ "uri_template" ];
+  pythonImportsCheck = [
+    "uri_template"
+  ];
 
   meta = with lib; {
     description = "An implementation of RFC 6570 URI Templates";
     homepage = "https://github.com/plinss/uri_template/";
     license = licenses.mit;
-    maintainers = [];
+    maintainers = with maintainers; [ ];
   };
 }