about summary refs log tree commit diff
path: root/pkgs/development/python-modules/cherrypy/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/cherrypy/default.nix')
-rw-r--r--pkgs/development/python-modules/cherrypy/default.nix145
1 files changed, 66 insertions, 79 deletions
diff --git a/pkgs/development/python-modules/cherrypy/default.nix b/pkgs/development/python-modules/cherrypy/default.nix
index 6d1fffbdedc9..7f3bd134f29f 100644
--- a/pkgs/development/python-modules/cherrypy/default.nix
+++ b/pkgs/development/python-modules/cherrypy/default.nix
@@ -1,53 +1,41 @@
-{ lib
-, stdenv
-, buildPythonPackage
-, cheroot
-, fetchpatch
-, fetchPypi
-, jaraco-collections
-, more-itertools
-, objgraph
-, path
-, portend
-, pyopenssl
-, pytest-forked
-, pytest-services
-, pytestCheckHook
-, python-memcached
-, pythonAtLeast
-, pythonOlder
-, requests-toolbelt
-, routes
-, setuptools-scm
-, simplejson
-, zc-lockfile
+{
+  lib,
+  stdenv,
+  buildPythonPackage,
+  cheroot,
+  fetchPypi,
+  jaraco-collections,
+  more-itertools,
+  objgraph,
+  path,
+  portend,
+  pyopenssl,
+  pytest-forked,
+  pytest-services,
+  pytestCheckHook,
+  python-memcached,
+  pythonAtLeast,
+  pythonOlder,
+  requests-toolbelt,
+  routes,
+  setuptools-scm,
+  simplejson,
+  zc-lockfile,
 }:
 
 buildPythonPackage rec {
   pname = "cherrypy";
-  version = "18.9.0";
+  version = "18.10.0";
   pyproject = true;
 
   disabled = pythonOlder "3.7";
 
   src = fetchPypi {
-    pname = "CherryPy";
-    inherit version;
-    hash = "sha256-awbBkc5xqGRh8wVyoatX/8CfQxQ7qOQsEDx7M0ciDrE=";
+    inherit pname version;
+    hash = "sha256-bHDnjuETAOiyHAdnxUKuaxAqScrFz9Tj4xPXu5B8WJE=";
   };
 
-  patches = [
-    # Replace distutils.spawn.find_executable with shutil.which, https://github.com/cherrypy/cherrypy/pull/2023
-    (fetchpatch {
-      name = "remove-distutils.patch";
-      url = "https://github.com/cherrypy/cherrypy/commit/8a19dd5f1e712a326a3613b17e6fc900012ed09a.patch";
-      hash = "sha256-fXECX0CdU74usiq9GEkIG9CF+dueszblT4qOeF6B700=";
-    })
-  ];
-
   postPatch = ''
-    substituteInPlace pyproject.toml \
-      --replace-fail '"setuptools_scm_git_archive >= 1.1",' ""
     # Disable doctest plugin because times out
     substituteInPlace pytest.ini \
       --replace-fail "--doctest-modules" "-vvv" \
@@ -56,11 +44,9 @@ buildPythonPackage rec {
     sed -i "/--cov/d" pytest.ini
   '';
 
-  nativeBuildInputs = [
-    setuptools-scm
-  ];
+  build-system = [ setuptools-scm ];
 
-  propagatedBuildInputs = [
+  dependencies = [
     cheroot
     jaraco-collections
     more-itertools
@@ -86,53 +72,54 @@ buildPythonPackage rec {
     "ignore::DeprecationWarning"
   ];
 
-  disabledTests = [
-    # Keyboard interrupt ends test suite run
-    "KeyboardInterrupt"
-    # daemonize and autoreload tests have issue with sockets within sandbox
-    "daemonize"
-    "Autoreload"
-
-    "test_antistampede"
-    "test_file_stream"
-    "test_basic_request"
-    "test_3_Redirect"
-    "test_4_File_deletion"
-  ] ++ lib.optionals (pythonAtLeast "3.11") [
-    "testErrorHandling"
-    "testHookErrors"
-    "test_HTTP10_KeepAlive"
-    "test_No_Message_Body"
-    "test_HTTP11_Timeout"
-    "testGzip"
-    "test_malformed_header"
-    "test_no_content_length"
-    "test_post_filename_with_special_characters"
-    "test_post_multipart"
-    "test_iterator"
-    "test_1_Ram_Concurrency"
-    "test_2_File_Concurrency"
-  ] ++ lib.optionals stdenv.isDarwin [
-    "test_block"
-  ];
-
-  disabledTestPaths = lib.optionals stdenv.isDarwin [
+  disabledTests =
+    [
+      # Keyboard interrupt ends test suite run
+      "KeyboardInterrupt"
+      # daemonize and autoreload tests have issue with sockets within sandbox
+      "daemonize"
+      "Autoreload"
+
+      "test_antistampede"
+      "test_file_stream"
+      "test_basic_request"
+      "test_3_Redirect"
+      "test_4_File_deletion"
+    ]
+    ++ lib.optionals (pythonAtLeast "3.11") [
+      "testErrorHandling"
+      "testHookErrors"
+      "test_HTTP10_KeepAlive"
+      "test_No_Message_Body"
+      "test_HTTP11_Timeout"
+      "testGzip"
+      "test_malformed_header"
+      "test_no_content_length"
+      "test_post_filename_with_special_characters"
+      "test_post_multipart"
+      "test_iterator"
+      "test_1_Ram_Concurrency"
+      "test_2_File_Concurrency"
+    ]
+    ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_block" ];
+
+  disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
     "cherrypy/test/test_config_server.py"
   ];
 
   __darwinAllowLocalNetworking = true;
 
-  pythonImportsCheck = [
-    "cherrypy"
-  ];
+  pythonImportsCheck = [ "cherrypy" ];
 
-  passthru.optional-dependencies = {
+  optional-dependencies = {
     json = [ simplejson ];
     memcached_session = [ python-memcached ];
     routes_dispatcher = [ routes ];
     ssl = [ pyopenssl ];
     # not packaged yet
-    xcgi = [ /* flup */ ];
+    xcgi = [
+      # flup
+    ];
   };
 
   meta = with lib; {
@@ -141,6 +128,6 @@ buildPythonPackage rec {
     homepage = "https://cherrypy.dev/";
     changelog = "https://github.com/cherrypy/cherrypy/blob/v${version}/CHANGES.rst";
     license = licenses.bsd3;
-    maintainers = with maintainers; [ ];
+    maintainers = [ ];
   };
 }