git.iko.soy/typeable/nixpkgs
on master help sign in
pythonPackages.fs: 0.5.4 -> 2.1.1 refactor move to python-modules
commit7f613c8d4992b980a97c8d06aa550e09ebc7dbd1 authorChris Ostrouchov <chris.ostrouchov@gmail.com> dateWed 10 Oct 2018, 15:01 (8 years ago) parent77c1ca8
2 files changed+54−31
pkgs/development/python-modules/fs/default.nix+53 pkgs/top-level/python-packages.nix+1−31
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/top-level/python-packages.nix+1−31
@@ -5581,37 +5581,7 @@ in {
55815581 };
55825582 };
55835583
5584− fs = buildPythonPackage rec {
5585− name = "fs-0.5.4";
5586−
5587− src = pkgs.fetchurl {
5588− url = "mirror://pypi/f/fs/${name}.tar.gz";
5589− sha256 = "ba2cca8773435a7c86059d57cb4b8ea30fda40f8610941f7822d1ce3ffd36197";
5590− };
5591−
5592− LC_ALL = "en_US.UTF-8";
5593− buildInputs = [ pkgs.glibcLocales ];
5594− propagatedBuildInputs = [ self.six ];
5595−
5596− checkPhase = ''
5597− ${python.interpreter} -m unittest discover
5598− '';
5599−
5600− # Because 2to3 is used the tests in $out need to be run.
5601− # Both when using unittest and pytest this resulted in many errors,
5602− # some Python byte/str errors, and others specific to resources tested.
5603− # Failing tests due to the latter is to be expected with this type of package.
5604− # Tests are therefore disabled.
5605− doCheck = false;
5606−
5607− meta = {
5608− description = "Filesystem abstraction";
5609− homepage = https://pypi.python.org/pypi/fs;
5610− license = licenses.bsd3;
5611− maintainers = with maintainers; [ lovek323 ];
5612− platforms = platforms.unix;
5613− };
5614− };
5584+ fs = callPackage ../development/python-modules/fs { };
56155585
56165586 fusepy = buildPythonPackage rec {
56175587 name = "fusepy-2.0.4";