2020-10-21 18:28:46 +02:00
|
|
|
{ stdenv, lib, buildPythonPackage, fetchPypi, pythonOlder, pytest, freezegun }:
|
2018-03-02 03:27:11 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2020-08-16 19:30:59 +02:00
|
|
|
version = "4.0.0";
|
2018-03-02 03:27:11 +01:00
|
|
|
pname = "ftputil";
|
2020-09-03 18:33:15 +02:00
|
|
|
disabled = pythonOlder "3.6";
|
2018-03-02 03:27:11 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-08-16 19:30:59 +02:00
|
|
|
sha256 = "d494c47f24fd3f8fbe92d40d90e0902c0e04288f200688af2b16d6b46fe441e1";
|
2018-03-02 03:27:11 +01:00
|
|
|
};
|
|
|
|
|
2020-09-03 18:33:15 +02:00
|
|
|
checkInputs = [ pytest freezegun ];
|
2018-03-02 03:41:20 +01:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
touch Makefile
|
2020-03-29 13:21:25 +02:00
|
|
|
# Disable tests that require network access or access /home or assume execution before year 2020
|
2018-03-02 03:41:20 +01:00
|
|
|
py.test test \
|
|
|
|
-k "not test_public_servers and not test_real_ftp \
|
2020-03-29 13:21:25 +02:00
|
|
|
and not test_set_parser and not test_repr \
|
2020-10-21 18:28:46 +02: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-01-24 10:19:10 +01:00
|
|
|
+ lib.optionalString stdenv.isDarwin "and not test_error_message_reuse"
|
2020-10-21 18:28:46 +02:00
|
|
|
+ ''"'';
|
2018-03-02 03:27:11 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "High-level FTP client library (virtual file system and more)";
|
2020-10-21 18:28:46 +02:00
|
|
|
homepage = "http://ftputil.sschwarzer.net/";
|
|
|
|
license = licenses.bsd2; # "Modified BSD license, says pypi"
|
2018-03-02 03:27:11 +01:00
|
|
|
};
|
|
|
|
}
|