about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/jsonconversion/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/jsonconversion/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/jsonconversion/default.nix49
1 files changed, 37 insertions, 12 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/jsonconversion/default.nix b/nixpkgs/pkgs/development/python-modules/jsonconversion/default.nix
index d9f6d5556fb5..49e3974e7350 100644
--- a/nixpkgs/pkgs/development/python-modules/jsonconversion/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/jsonconversion/default.nix
@@ -1,26 +1,51 @@
-{ lib, buildPythonPackage, fetchPypi, pytestCheckHook, numpy }:
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pythonRelaxDepsHook
+, pytestCheckHook
+, pdm-backend
+, numpy
+, setuptools
+}:
 
 buildPythonPackage rec {
   pname = "jsonconversion";
-  version = "0.2.13";
-  format = "setuptools";
+  version = "1.0.1";
+  pyproject = true;
 
-  src = fetchPypi {
-    inherit pname version;
-    hash = "sha256-4hMY0N/Px+g5zn3YzNfDWPyi8Pglvd/c2N9SeC4JoZ0=";
+  src = fetchFromGitHub {
+    owner = "DLR-RM";
+    repo = "python-jsonconversion";
+    rev = "refs/tags/${version}";
+    hash = "sha256-XmAQXu9YkkMUvpf/QVk4u1p8UyNfRb0NeoLxC1evCT4=";
   };
 
-  postPatch = ''
-    substituteInPlace setup.py --replace "'pytest-runner'" ""
-  '';
+  build-system = [
+    pdm-backend
+    pythonRelaxDepsHook
+  ];
 
-  nativeCheckInputs = [ pytestCheckHook numpy ];
+  pythonRemoveDeps = [
+    "pytest-runner"
+    "pytest"
+  ];
 
-  pythonImportsCheck = [ "jsonconversion" ];
+  dependencies = [
+    numpy
+    setuptools
+  ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "jsonconversion"
+  ];
 
   meta = with lib; {
     description = "This python module helps converting arbitrary Python objects into JSON strings and back";
-    homepage = "https://pypi.org/project/jsonconversion/";
+    homepage = "https://github.com/DLR-RM/python-jsonconversion";
     license = licenses.bsd2;
     maintainers = [ maintainers.terlar ];
   };