linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / python-modules / ftputil / default.nix
blob6d84aa9ae60727c5efda882e1fb5b0b6cb2154df
1 { stdenv, lib, buildPythonPackage, fetchPypi, pythonOlder, pytest, freezegun }:
3 buildPythonPackage rec {
4   version = "5.0.1";
5   pname = "ftputil";
6   disabled = pythonOlder "3.6";
8   src = fetchPypi {
9     inherit pname version;
10     sha256 = "394997ccb3cd4825c6e22b5e349c62cf5016c35db4d60940f3513db66d205561";
11   };
13   checkInputs = [ pytest freezegun ];
15   checkPhase = ''
16     touch Makefile
17     # Disable tests that require network access or access /home or assume execution before year 2020
18     py.test test \
19       -k "not test_public_servers and not test_real_ftp \
20           and not test_set_parser and not test_repr \
21           and not test_conditional_upload and not test_conditional_download_with_older_target \
22   ''
23   # need until https://ftputil.sschwarzer.net/trac/ticket/140#ticket is fixed
24   + lib.optionalString stdenv.isDarwin "and not test_error_message_reuse"
25   + ''"'';
27   meta = with lib; {
28     description = "High-level FTP client library (virtual file system and more)";
29     homepage = "http://ftputil.sschwarzer.net/";
30     license = licenses.bsd2; # "Modified BSD license, says pypi"
31   };