diff options
author | Frederik Rietdijk <freddyrietdijk@fridh.nl> | 2018-10-17 09:13:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-17 09:13:03 +0200 |
commit | c2c39a29f6e7ea4d7ea2e37c5e3c2595d46ceeea (patch) | |
tree | ee5ffa49ff4dfdb5ecc992c7174c57cffe1b0764 /pkgs | |
parent | 3055a0c9755c89616257c5d8318a32dc42b01341 (diff) | |
parent | 7f613c8d4992b980a97c8d06aa550e09ebc7dbd1 (diff) | |
download | nixlib-c2c39a29f6e7ea4d7ea2e37c5e3c2595d46ceeea.tar nixlib-c2c39a29f6e7ea4d7ea2e37c5e3c2595d46ceeea.tar.gz nixlib-c2c39a29f6e7ea4d7ea2e37c5e3c2595d46ceeea.tar.bz2 nixlib-c2c39a29f6e7ea4d7ea2e37c5e3c2595d46ceeea.tar.lz nixlib-c2c39a29f6e7ea4d7ea2e37c5e3c2595d46ceeea.tar.xz nixlib-c2c39a29f6e7ea4d7ea2e37c5e3c2595d46ceeea.tar.zst nixlib-c2c39a29f6e7ea4d7ea2e37c5e3c2595d46ceeea.zip |
Merge pull request #48171 from costrouc/costrouc/python-fs
pythonPackages.fs: 0.5.4 -> 2.1.1 refactor move to python-modules
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/python-modules/backports_os/default.nix | 35 | ||||
-rw-r--r-- | pkgs/development/python-modules/fs/default.nix | 53 | ||||
-rw-r--r-- | pkgs/development/python-modules/pyftpdlib/default.nix | 33 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 36 |
4 files changed, 126 insertions, 31 deletions
diff --git a/pkgs/development/python-modules/backports_os/default.nix b/pkgs/development/python-modules/backports_os/default.nix new file mode 100644 index 000000000000..9d0ddc2cad9a --- /dev/null +++ b/pkgs/development/python-modules/backports_os/default.nix @@ -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 ]; + }; +} diff --git a/pkgs/development/python-modules/fs/default.nix b/pkgs/development/python-modules/fs/default.nix new file mode 100644 index 000000000000..9d5de0c73ea2 --- /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/development/python-modules/pyftpdlib/default.nix b/pkgs/development/python-modules/pyftpdlib/default.nix new file mode 100644 index 000000000000..b8f483d3a1dc --- /dev/null +++ b/pkgs/development/python-modules/pyftpdlib/default.nix @@ -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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f5b747b165c1..67b209a60472 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -827,6 +827,8 @@ in { 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_ssl_match_hostname = if !(pythonOlder "3.5") then null else @@ -3555,6 +3557,8 @@ in { pydotplus = callPackage ../development/python-modules/pydotplus { }; + pyftpdlib = callPackage ../development/python-modules/pyftpdlib { }; + pyfxa = callPackage ../development/python-modules/pyfxa { }; pyhomematic = callPackage ../development/python-modules/pyhomematic { }; @@ -5277,37 +5281,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"; |