diff options
Diffstat (limited to 'pkgs/development/python-modules/python-multipart/default.nix')
-rw-r--r-- | pkgs/development/python-modules/python-multipart/default.nix | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/pkgs/development/python-modules/python-multipart/default.nix b/pkgs/development/python-modules/python-multipart/default.nix index ccac3e8b3cb2c..3bf07bd1d5097 100644 --- a/pkgs/development/python-modules/python-multipart/default.nix +++ b/pkgs/development/python-modules/python-multipart/default.nix @@ -1,8 +1,7 @@ { lib , buildPythonPackage , fetchPypi -, pytest -, pytest-cov +, pytestCheckHook , mock , pyyaml , six @@ -11,31 +10,37 @@ buildPythonPackage rec { pname = "python-multipart"; version = "0.0.5"; + format = "setuptools"; src = fetchPypi { inherit pname version; sha256 = "f7bb5f611fc600d15fa47b3974c8aa16e93724513b49b5f95c81e6624c83fa43"; }; - checkInputs = [ - pytest - pytest-cov - mock - pyyaml - ]; - propagatedBuildInputs = [ six ]; - checkPhase = '' - pytest + pythonImportsCheck = [ + "multipart" + ]; + + preCheck = '' + # https://github.com/andrew-d/python-multipart/issues/41 + substituteInPlace multipart/tests/test_multipart.py \ + --replace "yaml.load" "yaml.safe_load" ''; + checkInputs = [ + pytestCheckHook + mock + pyyaml + ]; + meta = with lib; { description = "A streaming multipart parser for Python"; homepage = "https://github.com/andrew-d/python-multipart"; license = licenses.asl20; - maintainers = [ maintainers.costrouc ]; + maintainers = with maintainers; [ costrouc ]; }; } |