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.2"; 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-KSHRfGX6M/w09P35A68u7uzMKaRioytScPh0Sw8JBfw="; 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 pytestFlags = [ 64 "--benchmark-disable" 65 ]; 66 disabledTestPaths = [ 67 "tests/test_inputs.py::URLTest::test_check" 68 "tests/test_inputs.py::EmailTest::test_valid_value_check" 69 "tests/test_logging.py::LoggingTest::test_override_app_level" 70 ] 71 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 72 "tests/test_inputs.py::EmailTest::test_invalid_values_check" 73 ]; 74 75 disabledTests = [ 76 "test_specs_endpoint_host_and_subdomain" 77 # broken in werkzeug 2.3 upgrade 78 "test_media_types_method" 79 "test_media_types_q" 80 # erroneous use of pytz 81 # https://github.com/python-restx/flask-restx/issues/620 82 # two fixes are proposed: one fixing just tests, and one removing pytz altogether. 83 # we disable the tests in the meanwhile and let upstream decide 84 "test_rfc822_value" 85 "test_iso8601_value" 86 ]; 87 88 pythonImportsCheck = [ "flask_restx" ]; 89 90 meta = with lib; { 91 description = "Fully featured framework for fast, easy and documented API development with Flask"; 92 homepage = "https://github.com/python-restx/flask-restx"; 93 changelog = "https://github.com/python-restx/flask-restx/blob/${version}/CHANGELOG.rst"; 94 license = licenses.bsd3; 95 maintainers = [ ]; 96 }; 97}