1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 pythonOlder, 7 aniso8601, 8 jsonschema, 9 flask, 10 importlib-resources, 11 werkzeug, 12 pytz, 13 faker, 14 mock, 15 blinker, 16 py, 17 pytest-flask, 18 pytest-mock, 19 pytest-benchmark, 20 pytest-vcr, 21 pytestCheckHook, 22 setuptools, 23}: 24 25buildPythonPackage rec { 26 pname = "flask-restx"; 27 version = "1.3.0"; 28 pyproject = true; 29 30 disabled = pythonOlder "3.8"; 31 32 # Tests not included in PyPI tarball 33 src = fetchFromGitHub { 34 owner = "python-restx"; 35 repo = "flask-restx"; 36 tag = version; 37 hash = "sha256-CBReP/u96fsr28lMV1BfLjjdBMXEvsD03wvsxkIcteI="; 38 }; 39 40 build-system = [ setuptools ]; 41 42 dependencies = [ 43 aniso8601 44 flask 45 importlib-resources 46 jsonschema 47 pytz 48 werkzeug 49 ]; 50 51 nativeCheckInputs = [ 52 blinker 53 faker 54 mock 55 py 56 pytest-benchmark 57 pytest-flask 58 pytest-mock 59 pytest-vcr 60 pytestCheckHook 61 ]; 62 63 pytestFlagsArray = 64 [ 65 "--benchmark-disable" 66 "--deselect=tests/test_inputs.py::URLTest::test_check" 67 "--deselect=tests/test_inputs.py::EmailTest::test_valid_value_check" 68 "--deselect=tests/test_logging.py::LoggingTest::test_override_app_level" 69 ] 70 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 71 "--deselect=tests/test_inputs.py::EmailTest::test_invalid_values_check" 72 ]; 73 74 disabledTests = [ 75 "test_specs_endpoint_host_and_subdomain" 76 # broken in werkzeug 2.3 upgrade 77 "test_media_types_method" 78 "test_media_types_q" 79 # erroneous use of pytz 80 # https://github.com/python-restx/flask-restx/issues/620 81 # two fixes are proposed: one fixing just tests, and one removing pytz altogether. 82 # we disable the tests in the meanwhile and let upstream decide 83 "test_rfc822_value" 84 "test_iso8601_value" 85 ]; 86 87 pythonImportsCheck = [ "flask_restx" ]; 88 89 meta = with lib; { 90 description = "Fully featured framework for fast, easy and documented API development with Flask"; 91 homepage = "https://github.com/python-restx/flask-restx"; 92 changelog = "https://github.com/python-restx/flask-restx/blob/${version}/CHANGELOG.rst"; 93 license = licenses.bsd3; 94 maintainers = [ ]; 95 }; 96}