Commit 83a28438 authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python311Packages.w3lib: refactor

parent 8df2cb92
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -3,14 +3,14 @@
  buildPythonPackage,
  fetchPypi,
  pytestCheckHook,
  pythonAtLeast,
  pythonOlder,
  setuptools
}:

buildPythonPackage rec {
  pname = "w3lib";
  version = "2.2.1";
  format = "setuptools";
  pyproject = true;

  disabled = pythonOlder "3.7";

@@ -19,16 +19,12 @@ buildPythonPackage rec {
    hash = "sha256-dW/y2Uxk5ByNfAxZ/qEqXQvFXjOlMceYi0oWPeubB90=";
  };

  build-system = [ setuptools ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "w3lib" ];

  disabledTests = lib.optionals (pythonAtLeast "3.11") [
    # regressed on Python 3.11.4
    # https://github.com/scrapy/w3lib/issues/212
    "test_safe_url_string_url"
  ];

  meta = with lib; {
    description = "Library of web-related functions";
    homepage = "https://github.com/scrapy/w3lib";