2022-12-28 21:21:41 +00:00
|
|
|
{ lib
|
2022-08-12 12:06:08 +00:00
|
|
|
, azure-storage-blob
|
|
|
|
, boto3
|
2024-04-21 15:54:59 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, cryptography
|
|
|
|
, django
|
2022-08-12 12:06:08 +00:00
|
|
|
, dropbox
|
2024-04-21 15:54:59 +00:00
|
|
|
, fetchFromGitHub
|
2022-08-12 12:06:08 +00:00
|
|
|
, google-cloud-storage
|
|
|
|
, libcloud
|
2023-11-16 04:20:00 +00:00
|
|
|
, moto
|
2024-04-21 15:54:59 +00:00
|
|
|
, paramiko
|
2023-11-16 04:20:00 +00:00
|
|
|
, pytestCheckHook
|
2024-04-21 15:54:59 +00:00
|
|
|
, pythonOlder
|
2023-11-16 04:20:00 +00:00
|
|
|
, rsa
|
2024-04-21 15:54:59 +00:00
|
|
|
, setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-storages";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.14.2";
|
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jschneier";
|
|
|
|
repo = "django-storages";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-V0uFZvnBi0B31b/j/u3Co6dd9XcdVefiSkl3XmCTJG4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
django
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
azure = [
|
|
|
|
azure-storage-blob
|
|
|
|
];
|
|
|
|
boto3 = [
|
|
|
|
boto3
|
|
|
|
];
|
|
|
|
dropbox = [
|
|
|
|
dropbox
|
|
|
|
];
|
|
|
|
google = [
|
|
|
|
google-cloud-storage
|
|
|
|
];
|
|
|
|
libcloud = [
|
|
|
|
libcloud
|
|
|
|
];
|
|
|
|
s3 = [
|
|
|
|
boto3
|
|
|
|
];
|
|
|
|
sftp = [
|
|
|
|
paramiko
|
|
|
|
];
|
|
|
|
};
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
cryptography
|
|
|
|
moto
|
|
|
|
pytestCheckHook
|
|
|
|
rsa
|
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"storages"
|
|
|
|
];
|
|
|
|
|
|
|
|
env.DJANGO_SETTINGS_MODULE = "tests.settings";
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# AttributeError: 'str' object has no attribute 'universe_domain'
|
|
|
|
"test_storage_save_gzip"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# ImportError: cannot import name 'mock_s3' from 'moto'
|
|
|
|
"tests/test_s3.py"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Collection of custom storage backends for Django";
|
2024-04-21 15:54:59 +00:00
|
|
|
changelog = "https://github.com/jschneier/django-storages/blob/${version}/CHANGELOG.rst";
|
2023-11-16 04:20:00 +00:00
|
|
|
downloadPage = "https://github.com/jschneier/django-storages/";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://django-storages.readthedocs.io";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ mmai ];
|
|
|
|
};
|
|
|
|
}
|