nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 76 lines 1.8 kB view raw
1{ 2 lib, 3 aniso8601, 4 blinker, 5 buildPythonPackage, 6 fetchPypi, 7 flask, 8 fetchpatch2, 9 mock, 10 pytest8_3CheckHook, 11 pytz, 12 six, 13 werkzeug, 14}: 15 16buildPythonPackage rec { 17 pname = "flask-restful"; 18 version = "0.3.10"; 19 format = "setuptools"; 20 21 src = fetchPypi { 22 pname = "Flask-RESTful"; 23 inherit version; 24 hash = "sha256-/kry7wAn34+bT3l6uiDFVmgBtq3plaxjtYir8aWc7Dc="; 25 }; 26 27 # conditional so that overrides are easier for web applications 28 patches = 29 lib.optionals (lib.versionAtLeast werkzeug.version "2.1.0") [ ./werkzeug-2.1.0-compat.patch ] 30 ++ lib.optionals (lib.versionAtLeast flask.version "3.0.0") [ ./flask-3.0-compat.patch ] 31 ++ [ 32 # replace use nose by pytest: https://github.com/flask-restful/flask-restful/pull/970 33 (fetchpatch2 { 34 url = "https://github.com/flask-restful/flask-restful/commit/6cc4b057e5450e0c84b3ee5f6f7a97e648a816d6.patch?full_index=1"; 35 hash = "sha256-kIjrkyL0OfX+gjoiYfchU0QYTPHz4JMCQcHLFH9oEF4="; 36 }) 37 ./fix-test-inputs.patch 38 ]; 39 40 propagatedBuildInputs = [ 41 aniso8601 42 flask 43 pytz 44 six 45 ]; 46 47 nativeCheckInputs = [ 48 blinker 49 mock 50 pytest8_3CheckHook 51 ]; 52 53 disabledTests = [ 54 # Broke in flask 2.2 upgrade 55 "test_exception_header_forwarded" 56 # Broke in werkzeug 2.3 upgrade 57 "test_media_types_method" 58 "test_media_types_q" 59 # time shenanigans 60 "test_iso8601_date_field_with_offset" 61 "test_rfc822_date_field_with_offset" 62 ]; 63 64 pythonImportsCheck = [ "flask_restful" ]; 65 66 meta = { 67 description = "Framework for creating REST APIs"; 68 homepage = "https://flask-restful.readthedocs.io"; 69 longDescription = '' 70 Flask-RESTful provides the building blocks for creating a great 71 REST API. 72 ''; 73 license = lib.licenses.bsd3; 74 maintainers = [ ]; 75 }; 76}