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.
This commit is contained in:
parent
64f7cb24d5
commit
09c04c7d35
|
@ -1,8 +1,16 @@
|
||||||
{ lib, buildPythonPackage, fetchPypi, pythonOlder,
|
{ lib, buildPythonPackage, fetchPypi, pythonOlder,
|
||||||
# Build inputs
|
# Build inputs
|
||||||
dateutil, six, text-unidecode, ipaddress ? null,
|
dateutil, six, text-unidecode, ipaddress ? null
|
||||||
# Test inputs
|
# Test inputs
|
||||||
email_validator, mock, ukpostcodeparser, pytestrunner, pytest}:
|
, email_validator
|
||||||
|
, freezegun
|
||||||
|
, mock
|
||||||
|
, more-itertools
|
||||||
|
, pytest
|
||||||
|
, pytestrunner
|
||||||
|
, random2
|
||||||
|
, ukpostcodeparser
|
||||||
|
}:
|
||||||
|
|
||||||
assert pythonOlder "3.3" -> ipaddress != null;
|
assert pythonOlder "3.3" -> ipaddress != null;
|
||||||
|
|
||||||
|
@ -18,9 +26,12 @@ buildPythonPackage rec {
|
||||||
buildInputs = [ pytestrunner ];
|
buildInputs = [ pytestrunner ];
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
email_validator
|
email_validator
|
||||||
|
freezegun
|
||||||
mock
|
mock
|
||||||
ukpostcodeparser
|
more-itertools
|
||||||
pytest
|
pytest
|
||||||
|
random2
|
||||||
|
ukpostcodeparser
|
||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
@ -30,8 +41,11 @@ buildPythonPackage rec {
|
||||||
] ++ lib.optional (pythonOlder "3.3") ipaddress;
|
] ++ lib.optional (pythonOlder "3.3") ipaddress;
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
find tests -type d -name "__pycache__" | xargs rm -r
|
|
||||||
substituteInPlace setup.py --replace "pytest>=3.8.0,<3.9" "pytest"
|
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; {
|
meta = with lib; {
|
||||||
|
|
Loading…
Reference in New Issue