about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2024-01-21 23:46:45 +0100
committerGitHub <noreply@github.com>2024-01-21 23:46:45 +0100
commit863909560429e42723c82d51f9818e4bce5d5600 (patch)
tree71a6c5da4b9400a820b6b3dd49fd6f8d022d764e /pkgs
parentd675dfc2ed25de19789314b0cb9e2fa44d25bd89 (diff)
parent48433b4d361f5ee28dd8b0ce06769e2c94a17b6a (diff)
Merge pull request #282534 from fabaff/cwltool-fix
cwltool: 3.1.20230213100550 -> 3.1.20240112164112
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/science/misc/cwltool/default.nix26
-rw-r--r--pkgs/development/python-modules/spython/default.nix59
-rw-r--r--pkgs/top-level/python-packages.nix2
3 files changed, 80 insertions, 7 deletions
diff --git a/pkgs/applications/science/misc/cwltool/default.nix b/pkgs/applications/science/misc/cwltool/default.nix
index 7c28f65f3bf7b..fb3b26a12edf1 100644
--- a/pkgs/applications/science/misc/cwltool/default.nix
+++ b/pkgs/applications/science/misc/cwltool/default.nix
@@ -7,32 +7,40 @@
 
 python3.pkgs.buildPythonApplication rec {
   pname = "cwltool";
-  version = "3.1.20230213100550";
-  format = "setuptools";
+  version = "3.1.20240112164112";
+  pyproject = true;
 
   src = fetchFromGitHub {
     owner = "common-workflow-language";
-    repo = pname;
+    repo = "cwltool";
     rev = "refs/tags/${version}";
-    hash = "sha256-BtHkIVadcccnYYX8lRqiCzO+/qFeBaZfdUuu6qrjysk=";
+    hash = "sha256-Y0DORypXlTDv04qh796oXPSTxCXGb7rLQ8Su+/As7Lo=";
   };
 
   postPatch = ''
     substituteInPlace setup.py \
-      --replace "ruamel.yaml >= 0.15, < 0.17.22" "ruamel.yaml" \
+      --replace "ruamel.yaml >= 0.16, < 0.19" "ruamel.yaml" \
       --replace "prov == 1.5.1" "prov" \
-      --replace "setup_requires=PYTEST_RUNNER," ""
+      --replace '"schema-salad >= 8.4.20230426093816, < 9",' "" \
+      --replace "PYTEST_RUNNER + " ""
+    substituteInPlace pyproject.toml \
+      --replace "mypy==1.8.0" "mypy" \
+      --replace "ruamel.yaml>=0.16.0,<0.18" "ruamel.yaml"
   '';
 
   nativeBuildInputs = [
     git
-  ];
+  ] ++ (with python3.pkgs; [
+    setuptools
+    setuptools-scm
+  ]);
 
   propagatedBuildInputs = with python3.pkgs; [
     argcomplete
     bagit
     coloredlogs
     cwl-utils
+    mypy
     mypy-extensions
     prov
     psutil
@@ -42,6 +50,10 @@ python3.pkgs.buildPythonApplication rec {
     ruamel-yaml
     schema-salad
     shellescape
+    spython
+    toml
+    types-psutil
+    types-requests
     typing-extensions
   ];
 
diff --git a/pkgs/development/python-modules/spython/default.nix b/pkgs/development/python-modules/spython/default.nix
new file mode 100644
index 0000000000000..e5a2fdf161c89
--- /dev/null
+++ b/pkgs/development/python-modules/spython/default.nix
@@ -0,0 +1,59 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, setuptools
+, pytestCheckHook
+, pythonOlder
+}:
+
+buildPythonPackage rec {
+  pname = "spython";
+  version = "0.3.12";
+  pyproject = true;
+
+  disabled = pythonOlder "3.9";
+
+  src = fetchFromGitHub {
+    owner = "singularityhub";
+    repo = "singularity-cli";
+    rev = "refs/tags/${version}";
+    hash = "sha256-fRtqOpDgVMYlVDwbPkrnpd7PT4fV+2WS6RmpJoxaKdQ=";
+  };
+
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace '"pytest-runner"' ""
+  '';
+
+  nativeBuildInputs = [
+    setuptools
+  ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "spython"
+  ];
+
+  disabledTests = [
+    # Assertion errors
+    "test_has_no_instances"
+    "test_check_install"
+    "test_check_get_singularity_version"
+  ];
+
+  disabledTestPaths = [
+    # Tests are looking for something that doesn't exist
+    "spython/tests/test_client.py"
+  ];
+
+  meta = with lib; {
+    description = "Streamlined singularity python client (spython) for singularity";
+    homepage = "https://github.com/singularityhub/singularity-cli";
+    changelog = "https://github.com/singularityhub/singularity-cli/blob/${version}/CHANGELOG.md";
+    license = licenses.mpl20;
+    maintainers = with maintainers; [ fab ];
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 6375fac04d610..6b518dc1a70ba 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -13706,6 +13706,8 @@ self: super: with self; {
 
   spyse-python = callPackage ../development/python-modules/spyse-python { };
 
+  spython = callPackage ../development/python-modules/spython { };
+
   sqids = callPackage ../development/python-modules/sqids { };
 
   sqlalchemy = callPackage ../development/python-modules/sqlalchemy { };