Merge pull request #48171 from costrouc/costrouc/python-fs

pythonPackages.fs: 0.5.4 -> 2.1.1 refactor move to python-modules
This commit is contained in:
Frederik Rietdijk
2018-10-17 09:13:03 +02:00
committed by GitHub
4 changed files with 126 additions and 31 deletions

View File

@@ -0,0 +1,35 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, setuptools_scm
, future
, isPy3k
, python
, hypothesis
}:
buildPythonPackage rec {
version = "0.1.1";
pname = "backports.os";
disabled = isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "b472c4933094306ca08ec90b2a8cbb50c34f1fb2767775169a1c1650b7b74630";
};
buildInputs = [ setuptools_scm ];
checkInputs = [ hypothesis ];
propagatedBuildInputs = [ future ];
checkPhase = ''
${python.interpreter} -m unittest discover tests
'';
meta = with stdenv.lib; {
homepage = https://github.com/pjdelport/backports.os;
description = "Backport of new features in Python's os module";
license = licenses.mit;
maintainers = [ maintainers.costrouc ];
};
}

View File

@@ -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;
};
}

View File

@@ -0,0 +1,33 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, mock
, psutil
, pyopenssl
, pysendfile
, python
}:
buildPythonPackage rec {
version = "1.5.4";
pname = "pyftpdlib";
src = fetchPypi {
inherit pname version;
sha256 = "e5fca613978743d41c3bfc68e25a811d646a3b8a9eee9eb07021daca89646a0f";
};
checkInputs = [ mock psutil ];
propagatedBuildInputs = [ pyopenssl pysendfile ];
checkPhase = ''
${python.interpreter} pyftpdlib/test/runner.py
'';
meta = with stdenv.lib; {
homepage = https://github.com/giampaolo/pyftpdlib/;
description = "Very fast asynchronous FTP server library";
license = licenses.mit;
maintainers = [ maintainers.costrouc ];
};
}