From fd08b98da90fe1ff064f37f4a54284031a2b7469 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Fri, 16 Nov 2018 21:25:30 +0100 Subject: [PATCH 1/2] pythonPackages.fs-s3fs: init at 1.0.0 `fs` is a python-based file system abstraction layer. The new package `fs-s3fs` is an implementation of it which stores files inside an S3 bucket. --- .../python-modules/fs-s3fs/default.nix | 23 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 pkgs/development/python-modules/fs-s3fs/default.nix diff --git a/pkgs/development/python-modules/fs-s3fs/default.nix b/pkgs/development/python-modules/fs-s3fs/default.nix new file mode 100644 index 00000000000..156b0fdd76e --- /dev/null +++ b/pkgs/development/python-modules/fs-s3fs/default.nix @@ -0,0 +1,23 @@ +{ buildPythonPackage, fetchPypi, lib, fs, six, boto3 }: + +buildPythonPackage rec { + pname = "fs-s3fs"; + version = "1.0.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "1czv67zs4sl5l3rv9l3hzn22zzzqm372lq1wlhihigir4cfyslak"; + }; + + propagatedBuildInputs = [ fs six boto3 ]; + + # tests try to integrate an s3 bucket which can't be tested properly in an isolated environment. + doCheck = false; + + meta = with lib; { + homepage = https://pypi.org/project/fs-s3fs/; + license = licenses.mit; + description = "Amazon S3 filesystem for PyFilesystem2"; + maintainers = with maintainers; [ ma27 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c413ae1b47e..e494765a9c7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2658,6 +2658,8 @@ in { fs = callPackage ../development/python-modules/fs { }; + fs-s3fs = callPackage ../development/python-modules/fs-s3fs { }; + libcloud = callPackage ../development/python-modules/libcloud { }; libgpuarray = callPackage ../development/python-modules/libgpuarray { From 9d2160e73bcd96a12235e0d06731964032f136d4 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 26 Nov 2018 02:25:26 +0100 Subject: [PATCH 2/2] pythonPackages.pyftpdlib: skip tests Although the tests are passing locally, it seems as the excessive filesystem usage causes several build failures and timeouts in the Hydra and OfBorg infrastructure: * https://hydra.nixos.org/build/84374861 (python3 on linux.x86_64) * https://hydra.nixos.org/build/84368459 (python2 on linux.x86_64) Some of these tests are failing after several seconds though, but I couldn't identify a pattern and I'm not overly surprised that a FTP library has impure tests. However the API seems to be usable in a Python {2,3} environment, so it should be safe to use even with disabled tests. --- pkgs/development/python-modules/pyftpdlib/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pyftpdlib/default.nix b/pkgs/development/python-modules/pyftpdlib/default.nix index b8f483d3a1d..254edfb8693 100644 --- a/pkgs/development/python-modules/pyftpdlib/default.nix +++ b/pkgs/development/python-modules/pyftpdlib/default.nix @@ -20,9 +20,9 @@ buildPythonPackage rec { checkInputs = [ mock psutil ]; propagatedBuildInputs = [ pyopenssl pysendfile ]; - checkPhase = '' - ${python.interpreter} pyftpdlib/test/runner.py - ''; + # impure filesystem-related tests cause timeouts + # on Hydra: https://hydra.nixos.org/build/84374861 + doCheck = false; meta = with stdenv.lib; { homepage = https://github.com/giampaolo/pyftpdlib/;