mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
python3Packages.python-multipart: fix tests
This commit is contained in:
parent
741668e4b0
commit
033686d737
1 changed files with 17 additions and 12 deletions
|
@ -1,8 +1,7 @@
|
||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, pytest
|
, pytestCheckHook
|
||||||
, pytest-cov
|
|
||||||
, mock
|
, mock
|
||||||
, pyyaml
|
, pyyaml
|
||||||
, six
|
, six
|
||||||
|
@ -11,31 +10,37 @@
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "python-multipart";
|
pname = "python-multipart";
|
||||||
version = "0.0.5";
|
version = "0.0.5";
|
||||||
|
format = "setuptools";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "f7bb5f611fc600d15fa47b3974c8aa16e93724513b49b5f95c81e6624c83fa43";
|
sha256 = "f7bb5f611fc600d15fa47b3974c8aa16e93724513b49b5f95c81e6624c83fa43";
|
||||||
};
|
};
|
||||||
|
|
||||||
checkInputs = [
|
|
||||||
pytest
|
|
||||||
pytest-cov
|
|
||||||
mock
|
|
||||||
pyyaml
|
|
||||||
];
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
six
|
six
|
||||||
];
|
];
|
||||||
|
|
||||||
checkPhase = ''
|
pythonImportsCheck = [
|
||||||
pytest
|
"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; {
|
meta = with lib; {
|
||||||
description = "A streaming multipart parser for Python";
|
description = "A streaming multipart parser for Python";
|
||||||
homepage = "https://github.com/andrew-d/python-multipart";
|
homepage = "https://github.com/andrew-d/python-multipart";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = [ maintainers.costrouc ];
|
maintainers = with maintainers; [ costrouc ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue