git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #48171 from costrouc/costrouc/python-fs

pythonPackages.fs: 0.5.4 -> 2.1.1 refactor move to python-modules

commitc2c39a29f6e7ea4d7ea2e37c5e3c2595d46ceeea authorFrederik Rietdijk <freddyrietdijk@fridh.nl> dateWed 17 Oct 2018, 09:13 (8 years ago) parent3055a0c7f613c8
4 files changed+126−31
pkgs/development/python-modules/backports_os/default.nix+35 pkgs/development/python-modules/fs/default.nix+53 pkgs/development/python-modules/pyftpdlib/default.nix+33 pkgs/top-level/python-packages.nix+5−31
pkgs/development/python-modules/backports_os/default.nixnew file+35
@@ -0,0 +1,35 @@
1+{ stdenv
2+, buildPythonPackage
3+, fetchPypi
4+, setuptools_scm
5+, future
6+, isPy3k
7+, python
8+, hypothesis
9+}:
10+
11+buildPythonPackage rec {
12+ version = "0.1.1";
13+ pname = "backports.os";
14+ disabled = isPy3k;
15+
16+ src = fetchPypi {
17+ inherit pname version;
18+ sha256 = "b472c4933094306ca08ec90b2a8cbb50c34f1fb2767775169a1c1650b7b74630";
19+ };
20+
21+ buildInputs = [ setuptools_scm ];
22+ checkInputs = [ hypothesis ];
23+ propagatedBuildInputs = [ future ];
24+
25+ checkPhase = ''
26+ ${python.interpreter} -m unittest discover tests
27+ '';
28+
29+ meta = with stdenv.lib; {
30+ homepage = https://github.com/pjdelport/backports.os;
31+ description = "Backport of new features in Python's os module";
32+ license = licenses.mit;
33+ maintainers = [ maintainers.costrouc ];
34+ };
35+}
pkgs/development/python-modules/fs/default.nixnew file+53
@@ -0,0 +1,53 @@
1+{ pkgs
2+, buildPythonPackage
3+, fetchPypi
4+, six
5+, nose
6+, appdirs
7+, scandir
8+, backports_os
9+, typing
10+, pytz
11+, enum34
12+, pyftpdlib
13+, psutil
14+, mock
15+, pythonAtLeast
16+, isPy3k
17+}:
18+
19+buildPythonPackage rec {
20+ pname = "fs";
21+ version = "2.1.1";
22+
23+ src = fetchPypi {
24+ inherit pname version;
25+ sha256 = "b20a4aeac9079b194f0160957d4265bb6c99ce68f1b12e980b0fb96f74aafb70";
26+ };
27+
28+ buildInputs = [ pkgs.glibcLocales ];
29+ checkInputs = [ nose pyftpdlib mock psutil ];
30+ propagatedBuildInputs = [ six appdirs pytz ]
31+ ++ pkgs.lib.optionals (!isPy3k) [ backports_os ]
32+ ++ pkgs.lib.optionals (!pythonAtLeast "3.6") [ typing ]
33+ ++ pkgs.lib.optionals (!pythonAtLeast "3.5") [ scandir ]
34+ ++ pkgs.lib.optionals (!pythonAtLeast "3.5") [ enum34 ];
35+
36+ postPatch = ''
37+ # required for installation
38+ touch LICENSE
39+ # tests modify home directory results in (4 tests failing) / 1600
40+ rm tests/test_appfs.py tests/test_opener.py
41+ '';
42+
43+ LC_ALL="en_US.utf-8";
44+
45+ meta = with pkgs.lib; {
46+ description = "Filesystem abstraction";
47+ homepage = https://github.com/PyFilesystem/pyfilesystem2;
48+ license = licenses.bsd3;
49+ maintainers = with maintainers; [ lovek323 ];
50+ platforms = platforms.unix;
51+ };
52+
53+}
pkgs/development/python-modules/pyftpdlib/default.nixnew file+33
@@ -0,0 +1,33 @@
1+{ stdenv
2+, buildPythonPackage
3+, fetchPypi
4+, mock
5+, psutil
6+, pyopenssl
7+, pysendfile
8+, python
9+}:
10+
11+buildPythonPackage rec {
12+ version = "1.5.4";
13+ pname = "pyftpdlib";
14+
15+ src = fetchPypi {
16+ inherit pname version;
17+ sha256 = "e5fca613978743d41c3bfc68e25a811d646a3b8a9eee9eb07021daca89646a0f";
18+ };
19+
20+ checkInputs = [ mock psutil ];
21+ propagatedBuildInputs = [ pyopenssl pysendfile ];
22+
23+ checkPhase = ''
24+ ${python.interpreter} pyftpdlib/test/runner.py
25+ '';
26+
27+ meta = with stdenv.lib; {
28+ homepage = https://github.com/giampaolo/pyftpdlib/;
29+ description = "Very fast asynchronous FTP server library";
30+ license = licenses.mit;
31+ maintainers = [ maintainers.costrouc ];
32+ };
33+}
pkgs/top-level/python-packages.nix+5−31
@@ -827,6 +827,8 @@ in {
827827
828828 backports_functools_lru_cache = callPackage ../development/python-modules/backports_functools_lru_cache { };
829829
830+ backports_os = callPackage ../development/python-modules/backports_os { };
831+
830832 backports_shutil_get_terminal_size = callPackage ../development/python-modules/backports_shutil_get_terminal_size { };
831833
832834 backports_ssl_match_hostname = if !(pythonOlder "3.5") then null else
@@ -3555,6 +3557,8 @@ in {
35553557
35563558 pydotplus = callPackage ../development/python-modules/pydotplus { };
35573559
3560+ pyftpdlib = callPackage ../development/python-modules/pyftpdlib { };
3561+
35583562 pyfxa = callPackage ../development/python-modules/pyfxa { };
35593563
35603564 pyhomematic = callPackage ../development/python-modules/pyhomematic { };
@@ -5277,37 +5281,7 @@ in {
52775281 };
52785282 };
52795283
5280− fs = buildPythonPackage rec {
5281− name = "fs-0.5.4";
5282−
5283− src = pkgs.fetchurl {
5284− url = "mirror://pypi/f/fs/${name}.tar.gz";
5285− sha256 = "ba2cca8773435a7c86059d57cb4b8ea30fda40f8610941f7822d1ce3ffd36197";
5286− };
5287−
5288− LC_ALL = "en_US.UTF-8";
5289− buildInputs = [ pkgs.glibcLocales ];
5290− propagatedBuildInputs = [ self.six ];
5291−
5292− checkPhase = ''
5293− ${python.interpreter} -m unittest discover
5294− '';
5295−
5296− # Because 2to3 is used the tests in $out need to be run.
5297− # Both when using unittest and pytest this resulted in many errors,
5298− # some Python byte/str errors, and others specific to resources tested.
5299− # Failing tests due to the latter is to be expected with this type of package.
5300− # Tests are therefore disabled.
5301− doCheck = false;
5302−
5303− meta = {
5304− description = "Filesystem abstraction";
5305− homepage = https://pypi.python.org/pypi/fs;
5306− license = licenses.bsd3;
5307− maintainers = with maintainers; [ lovek323 ];
5308− platforms = platforms.unix;
5309− };
5310− };
5284+ fs = callPackage ../development/python-modules/fs { };
53115285
53125286 fusepy = buildPythonPackage rec {
53135287 name = "fusepy-2.0.4";