about summary refs log tree commit diff
path: root/pkgs/development/python-modules/faker
diff options
context:
space:
mode:
authorManuel Mendez <mmendez534@gmail.com>2019-05-07 19:05:13 -0400
committerManuel Mendez <mmendez534@gmail.com>2019-05-07 21:34:55 -0400
commit09c04c7d35b626e40c1bef2d1e2238d23c043804 (patch)
tree06e33bf88e74b061d673d99569eb49c9e3bdba29 /pkgs/development/python-modules/faker
parent64f7cb24d5f9a3c6132e018befc2caec7400d114 (diff)
pythonPackages.faker: fix build and update test deps
Not sure why, but the `__pycache__` folder no longer exists by the time
`postPatch` runs which now causes the `rm` to error and fail the build.
Diffstat (limited to 'pkgs/development/python-modules/faker')
-rw-r--r--pkgs/development/python-modules/faker/default.nix22
1 files changed, 18 insertions, 4 deletions
diff --git a/pkgs/development/python-modules/faker/default.nix b/pkgs/development/python-modules/faker/default.nix
index 1828fb49de28a..b79999bba41f8 100644
--- a/pkgs/development/python-modules/faker/default.nix
+++ b/pkgs/development/python-modules/faker/default.nix
@@ -1,8 +1,16 @@
 { lib, buildPythonPackage, fetchPypi, pythonOlder,
   # Build inputs
-  dateutil, six, text-unidecode, ipaddress ? null,
+  dateutil, six, text-unidecode, ipaddress ? null
   # Test inputs
-  email_validator, mock, ukpostcodeparser, pytestrunner, pytest}:
+  , email_validator
+  , freezegun
+  , mock
+  , more-itertools
+  , pytest
+  , pytestrunner
+  , random2
+  , ukpostcodeparser
+}:
 
 assert pythonOlder "3.3" -> ipaddress != null;
 
@@ -18,9 +26,12 @@ buildPythonPackage rec {
   buildInputs = [ pytestrunner ];
   checkInputs = [
     email_validator
+    freezegun
     mock
-    ukpostcodeparser
+    more-itertools
     pytest
+    random2
+    ukpostcodeparser
   ];
 
   propagatedBuildInputs = [
@@ -30,8 +41,11 @@ buildPythonPackage rec {
   ] ++ lib.optional (pythonOlder "3.3") ipaddress;
 
   postPatch = ''
-    find tests -type d -name "__pycache__" | xargs rm -r
     substituteInPlace setup.py --replace "pytest>=3.8.0,<3.9" "pytest"
+
+    # see https://github.com/joke2k/faker/pull/911, fine since we pin correct
+    # versions for python2
+    substituteInPlace setup.py --replace "more-itertools<6.0.0" "more-itertools"
   '';
 
   meta = with lib; {