about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/django-storages/default.nix
blob: 5b638aa05b347b7a3c3db58864da4172e0a84d61 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{ lib
, buildPythonPackage
, fetchPypi
, django
, azure-storage-blob
, boto3
, dropbox
, google-cloud-storage
, libcloud
, paramiko
}:

buildPythonPackage rec {
  pname = "django-storages";
  version = "1.13.2";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-y63RXJCc63JH1P/FA/Eqm+w2mZ340L73wx5XF31RJog=";
  };

  propagatedBuildInputs = [
    django
  ];

  preCheck = ''
    export DJANGO_SETTINGS_MODULE=tests.settings
    # timezone issues https://github.com/jschneier/django-storages/issues/1171
    substituteInPlace tests/test_sftp.py \
      --replace 'test_accessed_time' 'dont_test_accessed_time' \
      --replace 'test_modified_time' 'dont_test_modified_time'
  '';

  nativeCheckInputs = [
    azure-storage-blob
    boto3
    dropbox
    google-cloud-storage
    libcloud
    paramiko
  ];

  pythonImportsCheck = [
    "storages"
  ];

  meta = with lib; {
    description = "Collection of custom storage backends for Django";
    homepage = "https://django-storages.readthedocs.io";
    changelog = "https://github.com/jschneier/django-storages/blob/${version}/CHANGELOG.rst";
    license = licenses.bsd3;
    maintainers = with maintainers; [ mmai ];
  };
}