diff --git a/pkgs/development/python-modules/fs/default.nix b/pkgs/development/python-modules/fs/default.nix new file mode 100644 index 00000000000..9d5de0c73ea --- /dev/null +++ b/pkgs/development/python-modules/fs/default.nix @@ -0,0 +1,53 @@ +{ pkgs +, buildPythonPackage +, fetchPypi +, six +, nose +, appdirs +, scandir +, backports_os +, typing +, pytz +, enum34 +, pyftpdlib +, psutil +, mock +, pythonAtLeast +, isPy3k +}: + +buildPythonPackage rec { + pname = "fs"; + version = "2.1.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "b20a4aeac9079b194f0160957d4265bb6c99ce68f1b12e980b0fb96f74aafb70"; + }; + + buildInputs = [ pkgs.glibcLocales ]; + checkInputs = [ nose pyftpdlib mock psutil ]; + propagatedBuildInputs = [ six appdirs pytz ] + ++ pkgs.lib.optionals (!isPy3k) [ backports_os ] + ++ pkgs.lib.optionals (!pythonAtLeast "3.6") [ typing ] + ++ pkgs.lib.optionals (!pythonAtLeast "3.5") [ scandir ] + ++ pkgs.lib.optionals (!pythonAtLeast "3.5") [ enum34 ]; + + postPatch = '' + # required for installation + touch LICENSE + # tests modify home directory results in (4 tests failing) / 1600 + rm tests/test_appfs.py tests/test_opener.py + ''; + + LC_ALL="en_US.utf-8"; + + meta = with pkgs.lib; { + description = "Filesystem abstraction"; + homepage = https://github.com/PyFilesystem/pyfilesystem2; + license = licenses.bsd3; + maintainers = with maintainers; [ lovek323 ]; + platforms = platforms.unix; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2bde64c1486..c4bd0b6446b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5581,37 +5581,7 @@ in { }; }; - fs = buildPythonPackage rec { - name = "fs-0.5.4"; - - src = pkgs.fetchurl { - url = "mirror://pypi/f/fs/${name}.tar.gz"; - sha256 = "ba2cca8773435a7c86059d57cb4b8ea30fda40f8610941f7822d1ce3ffd36197"; - }; - - LC_ALL = "en_US.UTF-8"; - buildInputs = [ pkgs.glibcLocales ]; - propagatedBuildInputs = [ self.six ]; - - checkPhase = '' - ${python.interpreter} -m unittest discover - ''; - - # Because 2to3 is used the tests in $out need to be run. - # Both when using unittest and pytest this resulted in many errors, - # some Python byte/str errors, and others specific to resources tested. - # Failing tests due to the latter is to be expected with this type of package. - # Tests are therefore disabled. - doCheck = false; - - meta = { - description = "Filesystem abstraction"; - homepage = https://pypi.python.org/pypi/fs; - license = licenses.bsd3; - maintainers = with maintainers; [ lovek323 ]; - platforms = platforms.unix; - }; - }; + fs = callPackage ../development/python-modules/fs { }; fusepy = buildPythonPackage rec { name = "fusepy-2.0.4";