at 24.11-pre 77 lines 1.7 kB view raw
1{ 2 lib, 3 azure-storage-blob, 4 boto3, 5 buildPythonPackage, 6 cryptography, 7 django, 8 dropbox, 9 fetchFromGitHub, 10 google-cloud-storage, 11 libcloud, 12 moto, 13 paramiko, 14 pytestCheckHook, 15 pythonOlder, 16 rsa, 17 setuptools, 18}: 19 20buildPythonPackage rec { 21 pname = "django-storages"; 22 version = "1.14.2"; 23 pyproject = true; 24 25 disabled = pythonOlder "3.7"; 26 27 src = fetchFromGitHub { 28 owner = "jschneier"; 29 repo = "django-storages"; 30 rev = "refs/tags/${version}"; 31 hash = "sha256-V0uFZvnBi0B31b/j/u3Co6dd9XcdVefiSkl3XmCTJG4="; 32 }; 33 34 nativeBuildInputs = [ setuptools ]; 35 36 propagatedBuildInputs = [ django ]; 37 38 passthru.optional-dependencies = { 39 azure = [ azure-storage-blob ]; 40 boto3 = [ boto3 ]; 41 dropbox = [ dropbox ]; 42 google = [ google-cloud-storage ]; 43 libcloud = [ libcloud ]; 44 s3 = [ boto3 ]; 45 sftp = [ paramiko ]; 46 }; 47 48 nativeCheckInputs = [ 49 cryptography 50 moto 51 pytestCheckHook 52 rsa 53 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); 54 55 pythonImportsCheck = [ "storages" ]; 56 57 env.DJANGO_SETTINGS_MODULE = "tests.settings"; 58 59 disabledTests = [ 60 # AttributeError: 'str' object has no attribute 'universe_domain' 61 "test_storage_save_gzip" 62 ]; 63 64 disabledTestPaths = [ 65 # ImportError: cannot import name 'mock_s3' from 'moto' 66 "tests/test_s3.py" 67 ]; 68 69 meta = with lib; { 70 description = "Collection of custom storage backends for Django"; 71 changelog = "https://github.com/jschneier/django-storages/blob/${version}/CHANGELOG.rst"; 72 downloadPage = "https://github.com/jschneier/django-storages/"; 73 homepage = "https://django-storages.readthedocs.io"; 74 license = licenses.bsd3; 75 maintainers = with maintainers; [ mmai ]; 76 }; 77}