From afdec9ed9913b78b107449b05fa6c5db4df9761b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 27 Jan 2022 10:07:44 +0100 Subject: [PATCH] python3Packages.ftputil: 5.0.2 -> 5.0.3 - Switch to pytestCheckHook - Add pythonImportsCheck - Adjust disabled tests --- .../python-modules/ftputil/default.nix | 45 ++++++++++++------- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/ftputil/default.nix b/pkgs/development/python-modules/ftputil/default.nix index 501b95f81f14..e9e445f11c3d 100644 --- a/pkgs/development/python-modules/ftputil/default.nix +++ b/pkgs/development/python-modules/ftputil/default.nix @@ -1,32 +1,45 @@ -{ stdenv, lib, buildPythonPackage, fetchPypi, pythonOlder, pytest, freezegun }: +{ lib +, stdenv +, buildPythonPackage +, fetchPypi +, freezegun +, pytestCheckHook +, pythonOlder +}: buildPythonPackage rec { - version = "5.0.2"; pname = "ftputil"; + version = "5.0.3"; + format = "setuptools"; + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "afa2ba402235e8c6583c1d2630269628344134c9246b961ff14f182047f3e633"; + hash = "sha256-m4buZ8GYDOHYmxN1K8SLlJP+4GNJy0doKFlOduCPhIg="; }; - checkInputs = [ pytest freezegun ]; + checkInputs = [ + freezegun + pytestCheckHook + ]; - checkPhase = '' - touch Makefile - # Disable tests that require network access or access /home or assume execution before year 2020 - py.test test \ - -k "not test_public_servers and not test_real_ftp \ - and not test_set_parser and not test_repr \ - and not test_conditional_upload and not test_conditional_download_with_older_target \ - '' - # need until https://ftputil.sschwarzer.net/trac/ticket/140#ticket is fixed - + lib.optionalString stdenv.isDarwin "and not test_error_message_reuse" - + ''"''; + disabledTests = [ + # Tests require network access + "test_public_servers" + "test_real_ftp" + "test_set_parser" + "test_upload" + ]; + + pythonImportsCheck = [ + "ftputil" + ]; meta = with lib; { description = "High-level FTP client library (virtual file system and more)"; homepage = "http://ftputil.sschwarzer.net/"; - license = licenses.bsd2; # "Modified BSD license, says pypi" + license = licenses.bsd2; + maintainers = with maintainers; [ ]; }; }