From 7b3a88ed2694394be889fc1ea40bef5cfaff70c9 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Tue, 22 Nov 2022 11:27:19 +0800 Subject: linkchecker: 10.0.1 -> 10.2.0 --- pkgs/tools/networking/linkchecker/default.nix | 50 ++++++++++++++------------- 1 file changed, 26 insertions(+), 24 deletions(-) (limited to 'pkgs/tools/networking/linkchecker') diff --git a/pkgs/tools/networking/linkchecker/default.nix b/pkgs/tools/networking/linkchecker/default.nix index 3cb5ecb015307..1facde5bc792d 100644 --- a/pkgs/tools/networking/linkchecker/default.nix +++ b/pkgs/tools/networking/linkchecker/default.nix @@ -1,54 +1,56 @@ { stdenv, lib, fetchFromGitHub, python3Packages, gettext }: -with python3Packages; +let + pypkgs = python3Packages; -buildPythonApplication rec { +in +pypkgs.buildPythonApplication rec { pname = "linkchecker"; - version = "10.0.1"; + version = "10.2.0"; + format = "pyproject"; + + disabled = pypkgs.pythonOlder "3.7"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "v" + version; - sha256 = "sha256-OOssHbX9nTCURpMKIy+95ZTvahuUAabLUhPnRp3xpN4="; + hash = "sha256-wMiKS14fX5mkY1OwxQPFKm7i4WMFQKg3tdZZqD0g0Rw="; }; + SETUPTOOLS_SCM_PRETEND_VERSION = version; + nativeBuildInputs = [ gettext ]; - propagatedBuildInputs = [ - configargparse + propagatedBuildInputs = with pypkgs; [ argcomplete beautifulsoup4 - pyopenssl + configargparse dnspython - pyxdg + hatch-vcs + hatchling + pyopenssl requests ]; - checkInputs = [ + checkInputs = with pypkgs; [ parameterized pytest ]; - postPatch = '' - sed -i 's/^requests.*$/requests>=2.2/' requirements.txt - sed -i "s/'request.*'/'requests >= 2.2'/" setup.py - ''; - # test_timeit2 is flakey, and depends sleep being precise to the milisecond - checkPhase = '' - ${lib.optionalString stdenv.isDarwin '' - # network tests fails on darwin - rm tests/test_network.py tests/checker/test_http*.py tests/checker/test_content_allows_robots.py tests/checker/test_noproxy.py - ''} - pytest --ignore=tests/checker/{test_telnet,telnetserver}.py \ - -k 'not TestLoginUrl and not test_timeit2' + checkPhase = lib.optionalString stdenv.isDarwin '' + # network tests fails on darwin + rm tests/test_network.py tests/checker/test_http*.py tests/checker/test_content_allows_robots.py tests/checker/test_noproxy.py + '' + '' + pytest --ignore=tests/checker/{test_telnet,telnetserver}.py \ + -k 'not TestLoginUrl and not test_timeit2' ''; - meta = { + meta = with lib; { description = "Check websites for broken links"; homepage = "https://linkcheck.github.io/linkchecker/"; - license = lib.licenses.gpl2; - maintainers = with lib.maintainers; [ peterhoeg tweber ]; + license = licenses.gpl2; + maintainers = with maintainers; [ peterhoeg tweber ]; }; } -- cgit 1.4.1