mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
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:
commit
c2c39a29f6
4 changed files with 126 additions and 31 deletions
35
pkgs/development/python-modules/backports_os/default.nix
Normal file
35
pkgs/development/python-modules/backports_os/default.nix
Normal 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 ];
|
||||||
|
};
|
||||||
|
}
|
53
pkgs/development/python-modules/fs/default.nix
Normal file
53
pkgs/development/python-modules/fs/default.nix
Normal 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;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
33
pkgs/development/python-modules/pyftpdlib/default.nix
Normal file
33
pkgs/development/python-modules/pyftpdlib/default.nix
Normal 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 ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -827,6 +827,8 @@ in {
|
||||||
|
|
||||||
backports_functools_lru_cache = callPackage ../development/python-modules/backports_functools_lru_cache { };
|
backports_functools_lru_cache = callPackage ../development/python-modules/backports_functools_lru_cache { };
|
||||||
|
|
||||||
|
backports_os = callPackage ../development/python-modules/backports_os { };
|
||||||
|
|
||||||
backports_shutil_get_terminal_size = callPackage ../development/python-modules/backports_shutil_get_terminal_size { };
|
backports_shutil_get_terminal_size = callPackage ../development/python-modules/backports_shutil_get_terminal_size { };
|
||||||
|
|
||||||
backports_ssl_match_hostname = if !(pythonOlder "3.5") then null else
|
backports_ssl_match_hostname = if !(pythonOlder "3.5") then null else
|
||||||
|
@ -3555,6 +3557,8 @@ in {
|
||||||
|
|
||||||
pydotplus = callPackage ../development/python-modules/pydotplus { };
|
pydotplus = callPackage ../development/python-modules/pydotplus { };
|
||||||
|
|
||||||
|
pyftpdlib = callPackage ../development/python-modules/pyftpdlib { };
|
||||||
|
|
||||||
pyfxa = callPackage ../development/python-modules/pyfxa { };
|
pyfxa = callPackage ../development/python-modules/pyfxa { };
|
||||||
|
|
||||||
pyhomematic = callPackage ../development/python-modules/pyhomematic { };
|
pyhomematic = callPackage ../development/python-modules/pyhomematic { };
|
||||||
|
@ -5277,37 +5281,7 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fs = buildPythonPackage rec {
|
fs = callPackage ../development/python-modules/fs { };
|
||||||
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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fusepy = buildPythonPackage rec {
|
fusepy = buildPythonPackage rec {
|
||||||
name = "fusepy-2.0.4";
|
name = "fusepy-2.0.4";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue