Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / prance / default.nix
blobf9d5b6f80b1fa87309301ba69efd45135a566bfb
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , chardet
5 , pyyaml
6 , requests
7 , six
8 , semver
9 , pytestCheckHook
10 , pytestcov
11 , pytestrunner
12 , openapi-spec-validator
15 buildPythonPackage rec {
16   pname = "prance";
17   version = "0.20.2";
19   src = fetchPypi {
20     inherit pname version;
21     sha256 = "4ffcddae6218cf6753a02af36ca9fb1c92eec4689441789ee2e9963230882388";
22   };
24   buildInputs = [
25     pytestrunner
26   ];
28   propagatedBuildInputs = [
29     chardet
30     pyyaml
31     requests
32     six
33     semver
34   ];
36   checkInputs = [
37     pytestCheckHook
38     pytestcov
39     openapi-spec-validator
40   ];
42   postPatch = ''
43     substituteInPlace setup.py \
44       --replace "tests_require = dev_require," "tests_require = None," \
45       --replace "chardet~=4.0" "" \
46       --replace "semver~=2.13" ""
47     substituteInPlace setup.cfg \
48       --replace "--cov-fail-under=90" ""
49   '';
51   # Disable tests that require network
52   disabledTestPaths = [
53     "tests/test_convert.py"
54   ];
55   disabledTests = [
56     "test_fetch_url_http"
57   ];
58   pythonImportsCheck = [ "prance" ];
60   meta = with lib; {
61     description = "Resolving Swagger/OpenAPI 2.0 and 3.0.0 Parser";
62     homepage = "https://github.com/jfinkhaeuser/prance";
63     license = licenses.mit;
64     maintainers = [ maintainers.costrouc ];
65   };