1{ lib, buildPythonPackage, fetchPypi, pytest }:
2
3buildPythonPackage rec {
4 version = "3.4";
5 pname = "ftputil";
6
7 src = fetchPypi {
8 inherit pname version;
9 sha256 = "374b01e174079e91babe2a462fbd6f6c00dbfbfa299dec04239ca4229fbf8762";
10 };
11
12 checkInputs = [ pytest ];
13
14 checkPhase = ''
15 touch Makefile
16 # Disable tests that require network access or access /home or assume execution before year 2020
17 py.test test \
18 -k "not test_public_servers and not test_real_ftp \
19 and not test_set_parser and not test_repr \
20 and not test_conditional_upload and not test_conditional_download_with_older_target"
21 '';
22
23 meta = with lib; {
24 description = "High-level FTP client library (virtual file system and more)";
25 homepage = http://ftputil.sschwarzer.net/;
26 license = licenses.bsd2; # "Modified BSD license, says pypi"
27 };
28}