2020-10-27 00:29:36 +00:00
|
|
|
{ stdenv, lib, buildPythonPackage, fetchPypi, pythonOlder, pytest, freezegun }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "5.0.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "ftputil";
|
2020-09-25 04:45:31 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "afa2ba402235e8c6583c1d2630269628344134c9246b961ff14f182047f3e633";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
checkInputs = [ pytest freezegun ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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 \
|
2020-10-27 00:29:36 +00:00
|
|
|
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
|
2021-02-05 17:12:51 +00:00
|
|
|
+ lib.optionalString stdenv.isDarwin "and not test_error_message_reuse"
|
2020-10-27 00:29:36 +00:00
|
|
|
+ ''"'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "High-level FTP client library (virtual file system and more)";
|
2020-10-27 00:29:36 +00:00
|
|
|
homepage = "http://ftputil.sschwarzer.net/";
|
|
|
|
license = licenses.bsd2; # "Modified BSD license, says pypi"
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|