nixpkgs/pkgs/development/python-modules/fs/default.nix
2019-01-18 09:37:10 +01:00

52 lines
1.0 KiB
Nix

{ lib
, glibcLocales
, buildPythonPackage
, fetchPypi
, six
, nose
, appdirs
, scandir
, backports_os
, typing
, pytz
, enum34
, pyftpdlib
, psutil
, mock
, pythonAtLeast
, isPy3k
}:
buildPythonPackage rec {
pname = "fs";
version = "2.1.3";
src = fetchPypi {
inherit pname version;
sha256 = "87e8d4e93040779a407c92b7f2f27117038927b4b1da41bdce23ce226557327d";
};
buildInputs = [ glibcLocales ];
checkInputs = [ nose pyftpdlib mock psutil ];
propagatedBuildInputs = [ six appdirs pytz ]
++ lib.optionals (!isPy3k) [ backports_os ]
++ lib.optionals (!pythonAtLeast "3.6") [ typing ]
++ lib.optionals (!pythonAtLeast "3.5") [ scandir ]
++ lib.optionals (!pythonAtLeast "3.5") [ enum34 ];
LC_ALL="en_US.utf-8";
checkPhase = ''
HOME=$(mktemp -d) nosetests tests []
'';
meta = with lib; {
description = "Filesystem abstraction";
homepage = https://github.com/PyFilesystem/pyfilesystem2;
license = licenses.bsd3;
maintainers = with maintainers; [ lovek323 ];
platforms = platforms.unix;
};
}